generated-configure.sh revision 2460:b88023f46daa
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
707INCLUDE_DTRACE
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715HOTSPOT_SET_WARNINGS_AS_ERRORS
716WARNINGS_AS_ERRORS
717COMPILER_SUPPORTS_TARGET_BITS_FLAG
718ZERO_ARCHFLAG
719LDFLAGS_TESTEXE
720LDFLAGS_TESTLIB
721CXXFLAGS_TESTEXE
722CXXFLAGS_TESTLIB
723CFLAGS_TESTEXE
724CFLAGS_TESTLIB
725OPENJDK_BUILD_JVM_LIBS
726OPENJDK_BUILD_JVM_ASFLAGS
727OPENJDK_BUILD_JVM_LDFLAGS
728OPENJDK_BUILD_JVM_CFLAGS
729OPENJDK_BUILD_LDFLAGS_HASH_STYLE
730OPENJDK_BUILD_LDFLAGS_CXX_JDK
731OPENJDK_BUILD_JDKEXE_LIBS
732OPENJDK_BUILD_JDKLIB_LIBS
733OPENJDK_BUILD_LDFLAGS_JDKEXE
734OPENJDK_BUILD_LDFLAGS_JDKLIB
735OPENJDK_BUILD_CXXFLAGS_JDKEXE
736OPENJDK_BUILD_CXXFLAGS_JDKLIB
737OPENJDK_BUILD_CFLAGS_JDKEXE
738OPENJDK_BUILD_CFLAGS_JDKLIB
739OPENJDK_BUILD_CXXSTD_CXXFLAG
740JVM_LIBS
741JVM_ASFLAGS
742JVM_LDFLAGS
743JVM_CFLAGS
744LDFLAGS_HASH_STYLE
745LDFLAGS_CXX_JDK
746JDKEXE_LIBS
747JDKLIB_LIBS
748LDFLAGS_JDKEXE
749LDFLAGS_JDKLIB
750CXXFLAGS_JDKEXE
751CXXFLAGS_JDKLIB
752CFLAGS_JDKEXE
753CFLAGS_JDKLIB
754MACOSX_VERSION_MIN
755CXXSTD_CXXFLAG
756JDK_ARCH_ABI_PROP_NAME
757CXX_O_FLAG_SIZE
758CXX_O_FLAG_NONE
759CXX_O_FLAG_DEBUG
760CXX_O_FLAG_NORM
761CXX_O_FLAG_HI
762CXX_O_FLAG_HIGHEST
763CXX_O_FLAG_HIGHEST_JVM
764C_O_FLAG_SIZE
765C_O_FLAG_NONE
766C_O_FLAG_DEBUG
767C_O_FLAG_NORM
768C_O_FLAG_HI
769C_O_FLAG_HIGHEST
770C_O_FLAG_HIGHEST_JVM
771JVM_CFLAGS_SYMBOLS
772CXXFLAGS_DEBUG_SYMBOLS
773CFLAGS_DEBUG_SYMBOLS
774CXX_FLAG_DEPS
775C_FLAG_DEPS
776SHARED_LIBRARY_FLAGS
777SET_SHARED_LIBRARY_MAPFILE
778SET_SHARED_LIBRARY_NAME
779SET_SHARED_LIBRARY_ORIGIN
780SET_EXECUTABLE_ORIGIN
781CXX_FLAG_REORDER
782C_FLAG_REORDER
783JVM_RCFLAGS
784RC_FLAGS
785AR_OUT_OPTION
786LD_OUT_OPTION
787EXE_OUT_OPTION
788CC_OUT_OPTION
789STRIPFLAGS
790ARFLAGS
791COMPILER_BINDCMD_FILE_FLAG
792COMPILER_COMMAND_FILE_FLAG
793COMPILER_TARGET_BITS_FLAG
794JT_HOME
795JTREGEXE
796HOTSPOT_TOOLCHAIN_TYPE
797USING_BROKEN_SUSE_LD
798PACKAGE_PATH
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857EXE_SUFFIX
858OBJ_SUFFIX
859STATIC_LIBRARY
860SHARED_LIBRARY
861STATIC_LIBRARY_SUFFIX
862SHARED_LIBRARY_SUFFIX
863LIBRARY_PREFIX
864TOOLCHAIN_TYPE
865STATIC_BUILD
866IMPORT_MODULES_MAKE
867IMPORT_MODULES_SRC
868IMPORT_MODULES_MAN
869IMPORT_MODULES_LEGAL
870IMPORT_MODULES_CONF
871IMPORT_MODULES_LIBS
872IMPORT_MODULES_CMDS
873IMPORT_MODULES_CLASSES
874BUILD_OUTPUT
875JDK_TOPDIR
876NASHORN_TOPDIR
877HOTSPOT_TOPDIR
878JAXWS_TOPDIR
879JAXP_TOPDIR
880CORBA_TOPDIR
881LANGTOOLS_TOPDIR
882EXTERNAL_BUILDJDK
883BUILD_JDK
884CREATE_BUILDJDK
885JLINK
886JMOD
887BOOT_JDK_BITS
888JAVAC_FLAGS
889BOOT_JDK_MODULAR
890BOOT_JDK_SOURCETARGET
891JARSIGNER
892JAR
893JAVAH
894JAVAC
895JAVA
896BOOT_JDK
897JAVA_CHECK
898JAVAC_CHECK
899VERSION_IS_GA
900VERSION_SHORT
901VERSION_STRING
902VERSION_NUMBER_FOUR_POSITIONS
903VERSION_NUMBER
904VERSION_OPT
905VERSION_BUILD
906VERSION_PRE
907VERSION_PATCH
908VERSION_SECURITY
909VERSION_MINOR
910VERSION_MAJOR
911MACOSX_BUNDLE_ID_BASE
912MACOSX_BUNDLE_NAME_BASE
913HOTSPOT_VM_DISTRO
914COMPANY_NAME
915JDK_RC_PLATFORM_NAME
916PRODUCT_SUFFIX
917PRODUCT_NAME
918LAUNCHER_NAME
919JLINK_KEEP_PACKAGED_MODULES
920COPYRIGHT_YEAR
921COMPRESS_JARS
922INCLUDE_SA
923UNLIMITED_CRYPTO
924CACERTS_FILE
925ENABLE_HEADLESS_ONLY
926DEFAULT_MAKE_TARGET
927OS_VERSION_MICRO
928OS_VERSION_MINOR
929OS_VERSION_MAJOR
930PKG_CONFIG
931BASH_ARGS
932SETFILE
933CODESIGN
934XATTR
935DSYMUTIL
936IS_GNU_TIME
937PATCH
938DTRACE
939TIME
940STAT
941HG
942READELF
943OTOOL
944LDD
945ZIPEXE
946UNZIP
947TAR_SUPPORTS_TRANSFORM
948TAR_INCLUDE_PARAM
949TAR_CREATE_EXTRA_PARAM
950TAR_TYPE
951FIND_DELETE
952OUTPUT_SYNC
953OUTPUT_SYNC_SUPPORTED
954CHECK_TOOLSDIR_MAKE
955CHECK_TOOLSDIR_GMAKE
956CHECK_MAKE
957CHECK_GMAKE
958MAKE
959PKGHANDLER
960CONFIGURESUPPORT_OUTPUTDIR
961OUTPUT_ROOT
962CONF_NAME
963SPEC
964SDKROOT
965XCODEBUILD
966JVM_VARIANT_MAIN
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972USERNAME
973CANONICAL_TOPDIR
974ORIGINAL_TOPDIR
975TOPDIR
976PATH_SEP
977ZERO_ARCHDEF
978HOTSPOT_BUILD_CPU_DEFINE
979HOTSPOT_BUILD_CPU_ARCH
980HOTSPOT_BUILD_CPU
981HOTSPOT_BUILD_OS_TYPE
982HOTSPOT_BUILD_OS
983OPENJDK_BUILD_BUNDLE_PLATFORM
984OPENJDK_BUILD_CPU_BUNDLE
985OPENJDK_BUILD_OS_BUNDLE
986OPENJDK_BUILD_OS_EXPORT_DIR
987OPENJDK_BUILD_CPU_OSARCH
988OPENJDK_BUILD_CPU_ISADIR
989OPENJDK_BUILD_CPU_LEGACY_LIB
990OPENJDK_BUILD_CPU_LEGACY
991HOTSPOT_TARGET_CPU_DEFINE
992HOTSPOT_TARGET_CPU_ARCH
993HOTSPOT_TARGET_CPU
994HOTSPOT_TARGET_OS_TYPE
995HOTSPOT_TARGET_OS
996DEFINE_CROSS_COMPILE_ARCH
997LP64
998OPENJDK_TARGET_BUNDLE_PLATFORM
999OPENJDK_TARGET_CPU_BUNDLE
1000OPENJDK_TARGET_OS_BUNDLE
1001OPENJDK_TARGET_OS_EXPORT_DIR
1002OPENJDK_TARGET_CPU_OSARCH
1003OPENJDK_TARGET_CPU_ISADIR
1004OPENJDK_TARGET_CPU_LEGACY_LIB
1005OPENJDK_TARGET_CPU_LEGACY
1006REQUIRED_OS_VERSION
1007REQUIRED_OS_NAME
1008COMPILE_TYPE
1009OPENJDK_TARGET_CPU_ENDIAN
1010OPENJDK_TARGET_CPU_BITS
1011OPENJDK_TARGET_CPU_ARCH
1012OPENJDK_TARGET_CPU
1013OPENJDK_TARGET_OS_ENV
1014OPENJDK_TARGET_OS_TYPE
1015OPENJDK_TARGET_OS
1016OPENJDK_BUILD_CPU_ENDIAN
1017OPENJDK_BUILD_CPU_BITS
1018OPENJDK_BUILD_CPU_ARCH
1019OPENJDK_BUILD_CPU
1020OPENJDK_BUILD_OS_ENV
1021OPENJDK_BUILD_OS_TYPE
1022OPENJDK_BUILD_OS
1023OPENJDK_BUILD_AUTOCONF_NAME
1024OPENJDK_TARGET_AUTOCONF_NAME
1025target_os
1026target_vendor
1027target_cpu
1028target
1029host_os
1030host_vendor
1031host_cpu
1032host
1033build_os
1034build_vendor
1035build_cpu
1036build
1037NICE
1038CPIO
1039DF
1040READLINK
1041CYGPATH
1042SED
1043FGREP
1044EGREP
1045GREP
1046AWK
1047XARGS
1048WHICH
1049WC
1050UNIQ
1051UNAME
1052TR
1053TOUCH
1054TEE
1055TAR
1056TAIL
1057SORT
1058SH
1059RMDIR
1060RM
1061PRINTF
1062NAWK
1063MV
1064MKTEMP
1065MKDIR
1066LS
1067LN
1068GZIP
1069GUNZIP
1070HEAD
1071FIND
1072FILE
1073EXPR
1074ECHO
1075DIRNAME
1076DIFF
1077DATE
1078CUT
1079CP
1080COMM
1081CMP
1082CHMOD
1083CAT
1084BASH
1085BASENAME
1086DATE_WHEN_CONFIGURED
1087ORIGINAL_PATH
1088CONFIGURE_COMMAND_LINE
1089target_alias
1090host_alias
1091build_alias
1092LIBS
1093ECHO_T
1094ECHO_N
1095ECHO_C
1096DEFS
1097mandir
1098localedir
1099libdir
1100psdir
1101pdfdir
1102dvidir
1103htmldir
1104infodir
1105docdir
1106oldincludedir
1107includedir
1108localstatedir
1109sharedstatedir
1110sysconfdir
1111datadir
1112datarootdir
1113libexecdir
1114sbindir
1115bindir
1116program_transform_name
1117prefix
1118exec_prefix
1119PACKAGE_URL
1120PACKAGE_BUGREPORT
1121PACKAGE_STRING
1122PACKAGE_VERSION
1123PACKAGE_TARNAME
1124PACKAGE_NAME
1125PATH_SEPARATOR
1126SHELL'
1127ac_subst_files=''
1128ac_user_opts='
1129enable_option_checking
1130with_target_bits
1131enable_openjdk_only
1132with_custom_make_dir
1133with_jdk_variant
1134enable_debug
1135with_debug_level
1136with_jvm_variants
1137with_cpu_port
1138with_devkit
1139with_sys_root
1140with_sysroot
1141with_tools_dir
1142with_toolchain_path
1143with_extra_path
1144with_sdk_name
1145with_conf_name
1146with_output_sync
1147with_default_make_target
1148enable_headless_only
1149with_cacerts_file
1150enable_unlimited_crypto
1151with_copyright_year
1152enable_keep_packaged_modules
1153with_milestone
1154with_update_version
1155with_user_release_suffix
1156with_build_number
1157with_version_string
1158with_version_pre
1159with_version_opt
1160with_version_build
1161with_version_major
1162with_version_minor
1163with_version_security
1164with_version_patch
1165with_boot_jdk
1166with_build_jdk
1167with_add_source_root
1168with_override_source_root
1169with_adds_and_overrides
1170with_override_langtools
1171with_override_corba
1172with_override_jaxp
1173with_override_jaxws
1174with_override_hotspot
1175with_override_nashorn
1176with_override_jdk
1177with_import_hotspot
1178with_import_modules
1179enable_static_build
1180with_toolchain_type
1181with_extra_cflags
1182with_extra_cxxflags
1183with_extra_ldflags
1184with_toolchain_version
1185with_build_devkit
1186with_jtreg
1187with_abi_profile
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194enable_aot
1195enable_hotspot_gtest
1196with_stdc__lib
1197with_msvcr_dll
1198with_msvcp_dll
1199with_x
1200with_cups
1201with_cups_include
1202with_freetype
1203with_freetype_include
1204with_freetype_lib
1205with_freetype_src
1206enable_freetype_bundling
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213enable_libffi_bundling
1214with_libjpeg
1215with_giflib
1216with_libpng
1217with_zlib
1218with_lcms
1219with_dxsdk
1220with_dxsdk_lib
1221with_dxsdk_include
1222with_libelf
1223with_libelf_include
1224with_libelf_lib
1225with_jvm_features
1226with_jvm_interpreter
1227enable_jtreg_failure_handler
1228enable_generate_classlist
1229with_num_cores
1230with_memory_size
1231with_jobs
1232with_test_jobs
1233with_boot_jdk_jvmargs
1234with_sjavac_server_java
1235enable_sjavac
1236enable_javac_server
1237enable_icecc
1238enable_precompiled_headers
1239enable_ccache
1240with_ccache_dir
1241'
1242      ac_precious_vars='build_alias
1243host_alias
1244target_alias
1245BASENAME
1246BASH
1247CAT
1248CHMOD
1249CMP
1250COMM
1251CP
1252CUT
1253DATE
1254DIFF
1255DIRNAME
1256ECHO
1257EXPR
1258FILE
1259FIND
1260HEAD
1261GUNZIP
1262GZIP
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIPEXE
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ELF_CFLAGS
1352ELF_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --enable-headless-only  only build headless (no GUI) support [disabled]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-abi-profile      specify ABI profile for ARM builds
2129                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                          [toolchain dependent]
2132  --with-native-debug-symbols
2133                          set the native debug symbol configuration (none,
2134                          internal, external, zipped) [varying]
2135  --with-stdc++lib=<static>,<dynamic>,<default>
2136                          force linking of the C++ runtime on Linux to either
2137                          static or dynamic, default is static with dynamic as
2138                          fallback
2139  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2140                          (Windows only) [probed]
2141  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2142                          (Windows only) [probed]
2143  --with-x                use the X Window System
2144  --with-cups             specify prefix directory for the cups package
2145                          (expecting the headers under PATH/include)
2146  --with-cups-include     specify directory for the cups include files
2147  --with-freetype         specify prefix directory for the freetype package
2148                          (expecting the libraries under PATH/lib and the
2149                          headers under PATH/include)
2150  --with-freetype-include specify directory for the freetype include files
2151  --with-freetype-lib     specify directory for the freetype library
2152  --with-freetype-src     specify directory with freetype sources to
2153                          automatically build the library (experimental,
2154                          Windows-only)
2155  --with-alsa             specify prefix directory for the alsa package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-alsa-include     specify directory for the alsa include files
2159  --with-alsa-lib         specify directory for the alsa library
2160  --with-libffi           specify prefix directory for the libffi package
2161                          (expecting the libraries under PATH/lib and the
2162                          headers under PATH/include)
2163  --with-libffi-include   specify directory for the libffi include files
2164  --with-libffi-lib       specify directory for the libffi library
2165  --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-giflib           use giflib from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-libpng           use libpng from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-zlib             use zlib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-lcms             use lcms2 from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-dxsdk            Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-libelf           specify prefix directory for the libelf package
2182                          (expecting the libraries under PATH/lib and the
2183                          headers under PATH/include)
2184  --with-libelf-include   specify directory for the libelf include files
2185  --with-libelf-lib       specify directory for the libelf library
2186  --with-jvm-features     additional JVM features to enable (separated by
2187                          comma), use '--help' to show possible values [none]
2188  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-num-cores        number of cores in the build system, e.g.
2191                          --with-num-cores=8 [probed]
2192  --with-memory-size      memory (in MB) available in the build system, e.g.
2193                          --with-memory-size=1024 [probed]
2194  --with-jobs             number of parallel jobs to let make run [calculated
2195                          based on cores and memory]
2196  --with-test-jobs        number of parallel tests jobs to run [based on build
2197                          jobs]
2198  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2199                          invocations of boot JDK, overriding the default
2200                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2201                          -enableassertions"
2202  --with-sjavac-server-java
2203                          use this java binary for running the sjavac
2204                          background server [Boot JDK java]
2205  --with-ccache-dir       where to store ccache files [~/.ccache]
2206
2207Some influential environment variables:
2208  BASENAME    Override default value for BASENAME
2209  BASH        Override default value for BASH
2210  CAT         Override default value for CAT
2211  CHMOD       Override default value for CHMOD
2212  CMP         Override default value for CMP
2213  COMM        Override default value for COMM
2214  CP          Override default value for CP
2215  CUT         Override default value for CUT
2216  DATE        Override default value for DATE
2217  DIFF        Override default value for DIFF
2218  DIRNAME     Override default value for DIRNAME
2219  ECHO        Override default value for ECHO
2220  EXPR        Override default value for EXPR
2221  FILE        Override default value for FILE
2222  FIND        Override default value for FIND
2223  HEAD        Override default value for HEAD
2224  GUNZIP      Override default value for GUNZIP
2225  GZIP        Override default value for GZIP
2226  LN          Override default value for LN
2227  LS          Override default value for LS
2228  MKDIR       Override default value for MKDIR
2229  MKTEMP      Override default value for MKTEMP
2230  MV          Override default value for MV
2231  NAWK        Override default value for NAWK
2232  PRINTF      Override default value for PRINTF
2233  RM          Override default value for RM
2234  RMDIR       Override default value for RMDIR
2235  SH          Override default value for SH
2236  SORT        Override default value for SORT
2237  TAIL        Override default value for TAIL
2238  TAR         Override default value for TAR
2239  TEE         Override default value for TEE
2240  TOUCH       Override default value for TOUCH
2241  TR          Override default value for TR
2242  UNAME       Override default value for UNAME
2243  UNIQ        Override default value for UNIQ
2244  WC          Override default value for WC
2245  WHICH       Override default value for WHICH
2246  XARGS       Override default value for XARGS
2247  AWK         Override default value for AWK
2248  GREP        Override default value for GREP
2249  EGREP       Override default value for EGREP
2250  FGREP       Override default value for FGREP
2251  SED         Override default value for SED
2252  CYGPATH     Override default value for CYGPATH
2253  READLINK    Override default value for READLINK
2254  DF          Override default value for DF
2255  CPIO        Override default value for CPIO
2256  NICE        Override default value for NICE
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  HG          Override default value for HG
2264  STAT        Override default value for STAT
2265  TIME        Override default value for TIME
2266  DTRACE      Override default value for DTRACE
2267  PATCH       Override default value for PATCH
2268  DSYMUTIL    Override default value for DSYMUTIL
2269  XATTR       Override default value for XATTR
2270  CODESIGN    Override default value for CODESIGN
2271  SETFILE     Override default value for SETFILE
2272  PKG_CONFIG  path to pkg-config utility
2273  JAVA        Override default value for JAVA
2274  JAVAC       Override default value for JAVAC
2275  JAVAH       Override default value for JAVAH
2276  JAR         Override default value for JAR
2277  JARSIGNER   Override default value for JARSIGNER
2278  CC          C compiler command
2279  CFLAGS      C compiler flags
2280  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2281              nonstandard directory <lib dir>
2282  LIBS        libraries to pass to the linker, e.g. -l<library>
2283  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284              you have headers in a nonstandard directory <include dir>
2285  CXX         C++ compiler command
2286  CXXFLAGS    C++ compiler flags
2287  CPP         C preprocessor
2288  CXXCPP      C++ preprocessor
2289  AS          Override default value for AS
2290  AR          Override default value for AR
2291  LIPO        Override default value for LIPO
2292  STRIP       Override default value for STRIP
2293  NM          Override default value for NM
2294  GNM         Override default value for GNM
2295  OBJCOPY     Override default value for OBJCOPY
2296  OBJDUMP     Override default value for OBJDUMP
2297  BUILD_CC    Override default value for BUILD_CC
2298  BUILD_CXX   Override default value for BUILD_CXX
2299  BUILD_NM    Override default value for BUILD_NM
2300  BUILD_AR    Override default value for BUILD_AR
2301  BUILD_OBJCOPY
2302              Override default value for BUILD_OBJCOPY
2303  BUILD_STRIP Override default value for BUILD_STRIP
2304  JTREGEXE    Override default value for JTREGEXE
2305  XMKMF       Path to xmkmf, Makefile generator for X Window System
2306  FREETYPE_CFLAGS
2307              C compiler flags for FREETYPE, overriding pkg-config
2308  FREETYPE_LIBS
2309              linker flags for FREETYPE, overriding pkg-config
2310  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2311  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2312  LIBFFI_CFLAGS
2313              C compiler flags for LIBFFI, overriding pkg-config
2314  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2315  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2316  PNG_LIBS    linker flags for PNG, overriding pkg-config
2317  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2318  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2319  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2320  ELF_LIBS    linker flags for ELF, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($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_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  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
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# 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# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# Check if build directory is on local disk. If not possible to determine,
3737# we prefer to claim it's local.
3738# Argument 1: directory to test
3739# Argument 2: what to do if it is on local disk
3740# Argument 3: what to do otherwise (remote disk or failure)
3741
3742
3743# Check that source files have basic read permissions set. This might
3744# not be the case in cygwin in certain conditions.
3745
3746
3747
3748
3749# Check for support for specific options in bash
3750
3751
3752################################################################################
3753#
3754# Default make target
3755#
3756
3757
3758# Code to run after AC_OUTPUT
3759
3760
3761#
3762# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Helper function which possibly converts a path using DOS-style short mode.
3791# If so, the updated path is stored in $new_path.
3792# $1: The path to check
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3801# and could probably be heavily simplified. However, all changes in this
3802# area tend to need lot of testing in different scenarios, and in lack of
3803# proper unit testing, cleaning this up has not been deemed worth the effort
3804# at the moment.
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3815
3816
3817
3818
3819# ... then the rest
3820#
3821# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845########################################################################
3846# This file handles detection of the Boot JDK. The Boot JDK detection
3847# process has been developed as a response to solve a complex real-world
3848# problem. Initially, it was simple, but it has grown as platform after
3849# platform, idiosyncracy after idiosyncracy has been supported.
3850#
3851# The basic idea is this:
3852# 1) You need an acceptable *) JDK to use as a Boot JDK
3853# 2) There are several ways to locate a JDK, that are mostly platform
3854#    dependent **)
3855# 3) You can have multiple JDKs installed
3856# 4) If possible, configure should try to dig out an acceptable JDK
3857#    automatically, without having to resort to command-line options
3858#
3859# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3860#     javac) and not a JRE, etc.
3861#
3862# **) On Windows we typically use a well-known path.
3863#     On MacOSX we typically use the tool java_home.
3864#     On Linux we typically find javac in the $PATH, and then follow a
3865#     chain of symlinks that often ends up in a real JDK.
3866#
3867# This leads to the code where we check in different ways to locate a
3868# JDK, and if one is found, check if it is acceptable. If not, we print
3869# our reasons for rejecting it (useful when debugging non-working
3870# configure situations) and continue checking the next one.
3871########################################################################
3872
3873# Execute the check given as argument, and verify the result
3874# If the Boot JDK was previously found, do nothing
3875# $1 A command line (typically autoconf macro) to execute
3876
3877
3878# Test: Is bootjdk explicitly set by command line arguments?
3879
3880
3881# Test: Is $JAVA_HOME set?
3882
3883
3884# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3885
3886
3887# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3888# $1: Argument to the java_home binary (optional)
3889
3890
3891# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3892
3893
3894# Look for a jdk in the given path. If there are multiple, try to select the newest.
3895# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3896# $1 = Path to directory containing jdk installations.
3897# $2 = String to append to the found JDK directory to get the proper JDK home
3898
3899
3900# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3901# environmental variable as base for where to look.
3902# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3903
3904
3905# Test: Is there a JDK installed in default, well-known locations?
3906
3907
3908# Check that a command-line tool in the Boot JDK is correct
3909# $1 = name of variable to assign
3910# $2 = name of binary
3911
3912
3913###############################################################################
3914#
3915# We need a Boot JDK to bootstrap the build.
3916#
3917
3918
3919
3920
3921
3922# BUILD_JDK: the location of the latest JDK that can run
3923#   on the host system and supports the target class file version
3924#   generated in this JDK build.  This variable should only be
3925#   used after the launchers are built.
3926#
3927
3928# Execute the check given as argument, and verify the result.
3929# If the JDK was previously found, do nothing.
3930# $1 A command line (typically autoconf macro) to execute
3931
3932
3933# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3934# is different than the host system doing the build (e.g. cross-compilation),
3935# a special BUILD_JDK is built as part of the build process.  An external
3936# prebuilt BUILD_JDK can also be supplied.
3937
3938
3939#
3940# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Runs icecc-create-env once and prints the error if it fails
3983#
3984# $1: arguments to icecc-create-env
3985# $2: log file
3986#
3987
3988
3989################################################################################
3990#
3991# Optionally enable distributed compilation of native code using icecc/icecream
3992#
3993
3994
3995
3996
3997
3998
3999
4000#
4001# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4003#
4004# This code is free software; you can redistribute it and/or modify it
4005# under the terms of the GNU General Public License version 2 only, as
4006# published by the Free Software Foundation.  Oracle designates this
4007# particular file as subject to the "Classpath" exception as provided
4008# by Oracle in the LICENSE file that accompanied this code.
4009#
4010# This code is distributed in the hope that it will be useful, but WITHOUT
4011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4013# version 2 for more details (a copy is included in the LICENSE file that
4014# accompanied this code).
4015#
4016# You should have received a copy of the GNU General Public License version
4017# 2 along with this work; if not, write to the Free Software Foundation,
4018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4019#
4020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021# or visit www.oracle.com if you need additional information or have any
4022# questions.
4023#
4024
4025################################################################################
4026#
4027# Setup ABI profile (for arm)
4028#
4029
4030
4031# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4032# corresponding configure arguments instead
4033
4034
4035# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4036# that configure can use them while detecting compilers.
4037# TOOLCHAIN_TYPE is available here.
4038# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4039
4040
4041
4042
4043
4044
4045# Documentation on common flags used for solstudio in HIGHEST.
4046#
4047# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4048#          done with care, there are some assumptions below that need to
4049#          be understood about the use of pointers, and IEEE behavior.
4050#
4051# -fns: Use non-standard floating point mode (not IEEE 754)
4052# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4053# -fsingle: Use single precision floating point with 'float'
4054# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4055#   (Source with excessing pointer casting and data access with mixed
4056#    pointer types are not recommended)
4057# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4058#   (If you expect perfect errno behavior, do not use this)
4059# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4060# -xrestrict: Pointer parameters to functions do not overlap
4061#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4062#    If you pass in multiple pointers to the same data, do not use this)
4063# -xlibmil: Inline some library routines
4064#   (If you expect perfect errno behavior, do not use this)
4065# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4066#   (If you expect perfect errno behavior, do not use this)
4067#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4068
4069    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4070    # Bug?
4071    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4072    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4073    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4074    #fi
4075
4076
4077
4078
4079
4080
4081################################################################################
4082# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4083#      conditionals against.
4084# $2 - Optional prefix for each variable defined.
4085
4086
4087# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088#                                  IF_FALSE: [RUN-IF-FALSE])
4089# ------------------------------------------------------------
4090# Check that the C compiler supports an argument
4091
4092
4093
4094
4095# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096#                                    IF_FALSE: [RUN-IF-FALSE])
4097# ------------------------------------------------------------
4098# Check that the C++ compiler supports an argument
4099
4100
4101
4102
4103# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4104#                                IF_FALSE: [RUN-IF-FALSE])
4105# ------------------------------------------------------------
4106# Check that the C and C++ compilers support an argument
4107
4108
4109
4110
4111# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4112#                                   IF_FALSE: [RUN-IF-FALSE])
4113# ------------------------------------------------------------
4114# Check that the linker support an argument
4115
4116
4117
4118
4119
4120
4121# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4122# Arguments:
4123# $1 - Optional prefix for each variable defined.
4124
4125
4126#
4127# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151
4152
4153
4154
4155cygwin_help() {
4156  case $1 in
4157    unzip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    zip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    make)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    freetype)
4170      HELP_MSG="
4171The freetype library can now be build during the configure process.
4172Download the freetype sources and unpack them into an arbitrary directory:
4173
4174wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4175tar -xzf freetype-2.5.3.tar.gz
4176
4177Then run configure with '--with-freetype-src=<freetype_src>'. This will
4178automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4179builds or into '<freetype_src>/lib32' for 32-bit builds.
4180Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4181and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4182
4183Alternatively you can unpack the sources like this to use the default directory:
4184
4185tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4186      ;;
4187  esac
4188}
4189
4190msys_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194apt_help() {
4195  case $1 in
4196    reduced)
4197      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4198    devkit)
4199      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4200    openjdk)
4201      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4202    alsa)
4203      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4204    cups)
4205      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4206    freetype)
4207      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4208    ffi)
4209      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4210    x11)
4211      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4212    ccache)
4213      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4214    dtrace)
4215      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4216    elf)
4217      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4218  esac
4219}
4220
4221yum_help() {
4222  case $1 in
4223    devkit)
4224      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4225    openjdk)
4226      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4227    alsa)
4228      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4229    cups)
4230      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4231    freetype)
4232      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4233    x11)
4234      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4235    ccache)
4236      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4237    elf)
4238      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4239  esac
4240}
4241
4242brew_help() {
4243  case $1 in
4244    openjdk)
4245      PKGHANDLER_COMMAND="brew cask install java" ;;
4246    freetype)
4247      PKGHANDLER_COMMAND="brew install freetype" ;;
4248    ccache)
4249      PKGHANDLER_COMMAND="brew install ccache" ;;
4250  esac
4251}
4252
4253port_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgutil_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261pkgadd_help() {
4262  PKGHANDLER_COMMAND=""
4263}
4264
4265# This function will check if we're called from the "configure" wrapper while
4266# printing --help. If so, we will print out additional information that can
4267# only be extracted within the autoconf script, and then exit. This must be
4268# called at the very beginning in configure.ac.
4269
4270
4271
4272
4273
4274
4275#
4276# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4277# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4278#
4279# This code is free software; you can redistribute it and/or modify it
4280# under the terms of the GNU General Public License version 2 only, as
4281# published by the Free Software Foundation.  Oracle designates this
4282# particular file as subject to the "Classpath" exception as provided
4283# by Oracle in the LICENSE file that accompanied this code.
4284#
4285# This code is distributed in the hope that it will be useful, but WITHOUT
4286# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4287# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4288# version 2 for more details (a copy is included in the LICENSE file that
4289# accompanied this code).
4290#
4291# You should have received a copy of the GNU General Public License version
4292# 2 along with this work; if not, write to the Free Software Foundation,
4293# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4294#
4295# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4296# or visit www.oracle.com if you need additional information or have any
4297# questions.
4298#
4299
4300# All valid JVM features, regardless of platform
4301VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4302    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4303    static-build link-time-opt aot"
4304
4305# All valid JVM variants
4306VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4307
4308###############################################################################
4309# Check if the specified JVM variant should be built. To be used in shell if
4310# constructs, like this:
4311# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4312#
4313# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4314
4315# Definition kept in one line to allow inlining in if statements.
4316# Additional [] needed to keep m4 from mangling shell constructs.
4317
4318
4319###############################################################################
4320# Check if the specified JVM features are explicitly enabled. To be used in
4321# shell if constructs, like this:
4322# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4323#
4324# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4325
4326# Definition kept in one line to allow inlining in if statements.
4327# Additional [] needed to keep m4 from mangling shell constructs.
4328
4329
4330###############################################################################
4331# Check which variants of the JVM that we want to build. Available variants are:
4332#   server: normal interpreter, and a tiered C1/C2 compiler
4333#   client: normal interpreter, and C1 (no C2 compiler)
4334#   minimal: reduced form of client with optional features stripped out
4335#   core: normal interpreter only, no compiler
4336#   zero: C++ based interpreter only, no compiler
4337#   zeroshark: C++ based interpreter, and a llvm-based compiler
4338#   custom: baseline JVM with no default features
4339#
4340
4341
4342###############################################################################
4343# Check if dtrace should be enabled and has all prerequisites present.
4344#
4345
4346
4347################################################################################
4348# Check if AOT should be enabled
4349#
4350
4351
4352###############################################################################
4353# Set up all JVM features for each JVM variant.
4354#
4355
4356
4357###############################################################################
4358# Validate JVM features once all setup is complete, including custom setup.
4359#
4360
4361
4362################################################################################
4363#
4364# Specify which sources will be used to build the 64-bit ARM port
4365#
4366# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4367# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4368#
4369
4370
4371
4372################################################################################
4373# Check if gtest should be built
4374#
4375
4376
4377#
4378# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4380#
4381# This code is free software; you can redistribute it and/or modify it
4382# under the terms of the GNU General Public License version 2 only, as
4383# published by the Free Software Foundation.  Oracle designates this
4384# particular file as subject to the "Classpath" exception as provided
4385# by Oracle in the LICENSE file that accompanied this code.
4386#
4387# This code is distributed in the hope that it will be useful, but WITHOUT
4388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4390# version 2 for more details (a copy is included in the LICENSE file that
4391# accompanied this code).
4392#
4393# You should have received a copy of the GNU General Public License version
4394# 2 along with this work; if not, write to the Free Software Foundation,
4395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4396#
4397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4398# or visit www.oracle.com if you need additional information or have any
4399# questions.
4400#
4401
4402###############################################################################
4403# Check which variant of the JDK that we want to build.
4404# Currently we have:
4405#    normal:   standard edition
4406# but the custom make system may add other variants
4407#
4408# Effectively the JDK variant gives a name to a specific set of
4409# modules to compile into the JDK.
4410
4411
4412###############################################################################
4413# Set the debug level
4414#    release: no debug information, all optimizations, no asserts.
4415#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4416#    fastdebug: debug information (-g), all optimizations, all asserts
4417#    slowdebug: debug information (-g), no optimizations, all asserts
4418
4419
4420###############################################################################
4421#
4422# Should we build only OpenJDK even if closed sources are present?
4423#
4424
4425
4426
4427
4428###############################################################################
4429#
4430# Enable or disable the elliptic curve crypto implementation
4431#
4432
4433
4434
4435
4436################################################################################
4437#
4438# Gcov coverage data for hotspot
4439#
4440
4441
4442################################################################################
4443#
4444# Static build support.  When enabled will generate static
4445# libraries instead of shared libraries for all JDK libs.
4446#
4447
4448
4449################################################################################
4450#
4451# jlink options.
4452# We always keep packaged modules in JDK image.
4453#
4454
4455
4456################################################################################
4457#
4458# Check if building of the jtreg failure handler should be enabled.
4459#
4460
4461
4462################################################################################
4463#
4464# Enable or disable generation of the classlist at build time
4465#
4466
4467
4468#
4469# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4470# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4471#
4472# This code is free software; you can redistribute it and/or modify it
4473# under the terms of the GNU General Public License version 2 only, as
4474# published by the Free Software Foundation.  Oracle designates this
4475# particular file as subject to the "Classpath" exception as provided
4476# by Oracle in the LICENSE file that accompanied this code.
4477#
4478# This code is distributed in the hope that it will be useful, but WITHOUT
4479# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4480# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4481# version 2 for more details (a copy is included in the LICENSE file that
4482# accompanied this code).
4483#
4484# You should have received a copy of the GNU General Public License version
4485# 2 along with this work; if not, write to the Free Software Foundation,
4486# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4487#
4488# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4489# or visit www.oracle.com if you need additional information or have any
4490# questions.
4491#
4492
4493###############################################################################
4494#
4495# Setup version numbers
4496#
4497
4498# Verify that a given string represents a valid version number, and assign it
4499# to a variable.
4500
4501# Argument 1: the variable to assign to
4502# Argument 2: the value given by the user
4503
4504
4505
4506
4507#
4508# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4510#
4511# This code is free software; you can redistribute it and/or modify it
4512# under the terms of the GNU General Public License version 2 only, as
4513# published by the Free Software Foundation.  Oracle designates this
4514# particular file as subject to the "Classpath" exception as provided
4515# by Oracle in the LICENSE file that accompanied this code.
4516#
4517# This code is distributed in the hope that it will be useful, but WITHOUT
4518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4520# version 2 for more details (a copy is included in the LICENSE file that
4521# accompanied this code).
4522#
4523# You should have received a copy of the GNU General Public License version
4524# 2 along with this work; if not, write to the Free Software Foundation,
4525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4526#
4527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4528# or visit www.oracle.com if you need additional information or have any
4529# questions.
4530#
4531
4532# Major library component reside in separate files.
4533#
4534# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4536#
4537# This code is free software; you can redistribute it and/or modify it
4538# under the terms of the GNU General Public License version 2 only, as
4539# published by the Free Software Foundation.  Oracle designates this
4540# particular file as subject to the "Classpath" exception as provided
4541# by Oracle in the LICENSE file that accompanied this code.
4542#
4543# This code is distributed in the hope that it will be useful, but WITHOUT
4544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4546# version 2 for more details (a copy is included in the LICENSE file that
4547# accompanied this code).
4548#
4549# You should have received a copy of the GNU General Public License version
4550# 2 along with this work; if not, write to the Free Software Foundation,
4551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4552#
4553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4554# or visit www.oracle.com if you need additional information or have any
4555# questions.
4556#
4557
4558################################################################################
4559# Setup alsa (Advanced Linux Sound Architecture)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup bundled libraries.
4590#
4591# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4592# OpenJDK repository. Default is to use these libraries as bundled, but they
4593# might be replaced by en external version by the user.
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libjpeg
4599################################################################################
4600
4601
4602################################################################################
4603# Setup giflib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup libpng
4609################################################################################
4610
4611
4612################################################################################
4613# Setup zlib
4614################################################################################
4615
4616
4617################################################################################
4618# Setup lcms (Little CMS)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Setup cups (Common Unix Printing System)
4649################################################################################
4650
4651
4652#
4653# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4655#
4656# This code is free software; you can redistribute it and/or modify it
4657# under the terms of the GNU General Public License version 2 only, as
4658# published by the Free Software Foundation.  Oracle designates this
4659# particular file as subject to the "Classpath" exception as provided
4660# by Oracle in the LICENSE file that accompanied this code.
4661#
4662# This code is distributed in the hope that it will be useful, but WITHOUT
4663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4665# version 2 for more details (a copy is included in the LICENSE file that
4666# accompanied this code).
4667#
4668# You should have received a copy of the GNU General Public License version
4669# 2 along with this work; if not, write to the Free Software Foundation,
4670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4671#
4672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4673# or visit www.oracle.com if you need additional information or have any
4674# questions.
4675#
4676
4677################################################################################
4678# Setup libffi (Foreign Function Interface)
4679################################################################################
4680
4681
4682#
4683# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685#
4686# This code is free software; you can redistribute it and/or modify it
4687# under the terms of the GNU General Public License version 2 only, as
4688# published by the Free Software Foundation.  Oracle designates this
4689# particular file as subject to the "Classpath" exception as provided
4690# by Oracle in the LICENSE file that accompanied this code.
4691#
4692# This code is distributed in the hope that it will be useful, but WITHOUT
4693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695# version 2 for more details (a copy is included in the LICENSE file that
4696# accompanied this code).
4697#
4698# You should have received a copy of the GNU General Public License version
4699# 2 along with this work; if not, write to the Free Software Foundation,
4700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701#
4702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703# or visit www.oracle.com if you need additional information or have any
4704# questions.
4705#
4706
4707################################################################################
4708# Build the freetype lib from source
4709################################################################################
4710
4711
4712################################################################################
4713# Check if a potential freeype library match is correct and usable
4714################################################################################
4715
4716
4717################################################################################
4718# Setup freetype (The FreeType2 font rendering library)
4719################################################################################
4720
4721
4722#
4723# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4724# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4725#
4726# This code is free software; you can redistribute it and/or modify it
4727# under the terms of the GNU General Public License version 2 only, as
4728# published by the Free Software Foundation.  Oracle designates this
4729# particular file as subject to the "Classpath" exception as provided
4730# by Oracle in the LICENSE file that accompanied this code.
4731#
4732# This code is distributed in the hope that it will be useful, but WITHOUT
4733# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4734# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4735# version 2 for more details (a copy is included in the LICENSE file that
4736# accompanied this code).
4737#
4738# You should have received a copy of the GNU General Public License version
4739# 2 along with this work; if not, write to the Free Software Foundation,
4740# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4741#
4742# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4743# or visit www.oracle.com if you need additional information or have any
4744# questions.
4745#
4746
4747################################################################################
4748# Setup the standard C/C++ runtime libraries.
4749#
4750# Most importantly, determine if stdc++ should be linked statically or
4751# dynamically.
4752################################################################################
4753
4754
4755#
4756# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4757# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4758#
4759# This code is free software; you can redistribute it and/or modify it
4760# under the terms of the GNU General Public License version 2 only, as
4761# published by the Free Software Foundation.  Oracle designates this
4762# particular file as subject to the "Classpath" exception as provided
4763# by Oracle in the LICENSE file that accompanied this code.
4764#
4765# This code is distributed in the hope that it will be useful, but WITHOUT
4766# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4767# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4768# version 2 for more details (a copy is included in the LICENSE file that
4769# accompanied this code).
4770#
4771# You should have received a copy of the GNU General Public License version
4772# 2 along with this work; if not, write to the Free Software Foundation,
4773# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4774#
4775# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4776# or visit www.oracle.com if you need additional information or have any
4777# questions.
4778#
4779
4780################################################################################
4781# Setup X11 Windows system
4782################################################################################
4783
4784
4785#
4786# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4787# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4788#
4789# This code is free software; you can redistribute it and/or modify it
4790# under the terms of the GNU General Public License version 2 only, as
4791# published by the Free Software Foundation.  Oracle designates this
4792# particular file as subject to the "Classpath" exception as provided
4793# by Oracle in the LICENSE file that accompanied this code.
4794#
4795# This code is distributed in the hope that it will be useful, but WITHOUT
4796# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4797# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4798# version 2 for more details (a copy is included in the LICENSE file that
4799# accompanied this code).
4800#
4801# You should have received a copy of the GNU General Public License version
4802# 2 along with this work; if not, write to the Free Software Foundation,
4803# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4804#
4805# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4806# or visit www.oracle.com if you need additional information or have any
4807# questions.
4808#
4809
4810################################################################################
4811# Setup libelf (ELF library)
4812################################################################################
4813
4814
4815
4816################################################################################
4817# Determine which libraries are needed for this configuration
4818################################################################################
4819
4820
4821################################################################################
4822# Parse library options, and setup needed libraries
4823################################################################################
4824
4825
4826################################################################################
4827# Setup llvm (Low-Level VM)
4828################################################################################
4829
4830
4831################################################################################
4832# Setup various libraries, typically small system libraries
4833################################################################################
4834
4835
4836################################################################################
4837# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4838# redistribute it in the test image.
4839################################################################################
4840
4841
4842
4843#
4844# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4845# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4846#
4847# This code is free software; you can redistribute it and/or modify it
4848# under the terms of the GNU General Public License version 2 only, as
4849# published by the Free Software Foundation.  Oracle designates this
4850# particular file as subject to the "Classpath" exception as provided
4851# by Oracle in the LICENSE file that accompanied this code.
4852#
4853# This code is distributed in the hope that it will be useful, but WITHOUT
4854# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4855# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4856# version 2 for more details (a copy is included in the LICENSE file that
4857# accompanied this code).
4858#
4859# You should have received a copy of the GNU General Public License version
4860# 2 along with this work; if not, write to the Free Software Foundation,
4861# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4862#
4863# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4864# or visit www.oracle.com if you need additional information or have any
4865# questions.
4866#
4867
4868# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4869# Converts autoconf style CPU name to OpenJDK style, into
4870# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4871
4872
4873# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4874# Converts autoconf style OS name to OpenJDK style, into
4875# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4876
4877
4878# Expects $host_os $host_cpu $build_os and $build_cpu
4879# and $with_target_bits to have been setup!
4880#
4881# Translate the standard triplet(quadruplet) definition
4882# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4883# OPENJDK_BUILD_OS, etc.
4884
4885
4886# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4887# accordingly. Must be done after setting up build and target system, but before
4888# doing anything else with these values.
4889
4890
4891# Setup the legacy variables, for controlling the old makefiles.
4892#
4893
4894
4895# $1 - Either TARGET or BUILD to setup the variables for.
4896
4897
4898
4899
4900#%%% Build and target systems %%%
4901
4902
4903
4904
4905# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4906# Add -mX to various FLAGS variables.
4907
4908
4909
4910
4911
4912
4913#
4914# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4915# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4916#
4917# This code is free software; you can redistribute it and/or modify it
4918# under the terms of the GNU General Public License version 2 only, as
4919# published by the Free Software Foundation.  Oracle designates this
4920# particular file as subject to the "Classpath" exception as provided
4921# by Oracle in the LICENSE file that accompanied this code.
4922#
4923# This code is distributed in the hope that it will be useful, but WITHOUT
4924# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4925# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4926# version 2 for more details (a copy is included in the LICENSE file that
4927# accompanied this code).
4928#
4929# You should have received a copy of the GNU General Public License version
4930# 2 along with this work; if not, write to the Free Software Foundation,
4931# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4932#
4933# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4934# or visit www.oracle.com if you need additional information or have any
4935# questions.
4936#
4937
4938
4939
4940
4941
4942
4943
4944################################################################################
4945# Define a mechanism for importing extra prebuilt modules
4946#
4947
4948
4949
4950#
4951# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4952# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4953#
4954# This code is free software; you can redistribute it and/or modify it
4955# under the terms of the GNU General Public License version 2 only, as
4956# published by the Free Software Foundation.  Oracle designates this
4957# particular file as subject to the "Classpath" exception as provided
4958# by Oracle in the LICENSE file that accompanied this code.
4959#
4960# This code is distributed in the hope that it will be useful, but WITHOUT
4961# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4962# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4963# version 2 for more details (a copy is included in the LICENSE file that
4964# accompanied this code).
4965#
4966# You should have received a copy of the GNU General Public License version
4967# 2 along with this work; if not, write to the Free Software Foundation,
4968# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4969#
4970# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4971# or visit www.oracle.com if you need additional information or have any
4972# questions.
4973#
4974
4975########################################################################
4976# This file is responsible for detecting, verifying and setting up the
4977# toolchain, i.e. the compiler, linker and related utilities. It will setup
4978# proper paths to the binaries, but it will not setup any flags.
4979#
4980# The binaries used is determined by the toolchain type, which is the family of
4981# compilers and related tools that are used.
4982########################################################################
4983
4984
4985# All valid toolchains, regardless of platform (used by help.m4)
4986VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4987
4988# These toolchains are valid on different platforms
4989VALID_TOOLCHAINS_linux="gcc clang"
4990VALID_TOOLCHAINS_solaris="solstudio"
4991VALID_TOOLCHAINS_macosx="gcc clang"
4992VALID_TOOLCHAINS_aix="xlc"
4993VALID_TOOLCHAINS_windows="microsoft"
4994
4995# Toolchain descriptions
4996TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4997TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4998TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4999TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5000TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5001
5002# Minimum supported versions, empty means unspecified
5003TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5004TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5005TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5006TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5007TOOLCHAIN_MINIMUM_VERSION_xlc=""
5008
5009# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5010# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5011# $1 - optional variable prefix for compiler and version variables (BUILD_)
5012# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5013
5014
5015# Check if the configured compiler (C and C++) is of a specific version or
5016# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5017#
5018# Arguments:
5019#   VERSION:   The version string to check against the found version
5020#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5021#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5022#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5023
5024
5025
5026
5027# Setup a number of variables describing how native output files are
5028# named on this platform/toolchain.
5029
5030
5031# Determine which toolchain type to use, and make sure it is valid for this
5032# platform. Setup various information about the selected toolchain.
5033
5034
5035# Before we start detecting the toolchain executables, we might need some
5036# special setup, e.g. additional paths etc.
5037
5038
5039# Restore path, etc
5040
5041
5042# Check if a compiler is of the toolchain type we expect, and save the version
5043# information from it. If the compiler does not match the expected type,
5044# this function will abort using AC_MSG_ERROR. If it matches, the version will
5045# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5046# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5047#
5048# $1 = compiler to test (CC or CXX)
5049# $2 = human readable name of compiler (C or C++)
5050
5051
5052# Try to locate the given C or C++ compiler in the path, or otherwise.
5053#
5054# $1 = compiler to test (CC or CXX)
5055# $2 = human readable name of compiler (C or C++)
5056# $3 = list of compiler names to search for
5057
5058
5059# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5060# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5061# archiver (AR). Verify that the compilers are correct according to the
5062# toolchain type.
5063
5064
5065# Setup additional tools that is considered a part of the toolchain, but not the
5066# core part. Many of these are highly platform-specific and do not exist,
5067# and/or are not needed on all platforms.
5068
5069
5070# Setup the build tools (i.e, the compiler and linker used to build programs
5071# that should be run on the build platform, not the target platform, as a build
5072# helper). Since the non-cross-compile case uses the normal, target compilers
5073# for this, we can only do this after these have been setup.
5074
5075
5076# Do some additional checks on the detected tools.
5077
5078
5079# Setup the JTReg Regression Test Harness.
5080
5081
5082#
5083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5085#
5086# This code is free software; you can redistribute it and/or modify it
5087# under the terms of the GNU General Public License version 2 only, as
5088# published by the Free Software Foundation.  Oracle designates this
5089# particular file as subject to the "Classpath" exception as provided
5090# by Oracle in the LICENSE file that accompanied this code.
5091#
5092# This code is distributed in the hope that it will be useful, but WITHOUT
5093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5095# version 2 for more details (a copy is included in the LICENSE file that
5096# accompanied this code).
5097#
5098# You should have received a copy of the GNU General Public License version
5099# 2 along with this work; if not, write to the Free Software Foundation,
5100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5101#
5102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5103# or visit www.oracle.com if you need additional information or have any
5104# questions.
5105#
5106
5107################################################################################
5108# The order of these defines the priority by which we try to find them.
5109VALID_VS_VERSIONS="2013 2012 2010"
5110
5111VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5112VS_VERSION_INTERNAL_2010=100
5113VS_MSVCR_2010=msvcr100.dll
5114# We don't use msvcp on Visual Studio 2010
5115#VS_MSVCP_2010=msvcp100.dll
5116VS_ENVVAR_2010="VS100COMNTOOLS"
5117VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5118VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5119VS_VS_PLATFORM_NAME_2010="v100"
5120VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5121
5122VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5123VS_VERSION_INTERNAL_2012=110
5124VS_MSVCR_2012=msvcr110.dll
5125VS_MSVCP_2012=msvcp110.dll
5126VS_ENVVAR_2012="VS110COMNTOOLS"
5127VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5128VS_SDK_INSTALLDIR_2012=
5129VS_VS_PLATFORM_NAME_2012="v110"
5130VS_SDK_PLATFORM_NAME_2012=
5131
5132VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5133VS_VERSION_INTERNAL_2013=120
5134VS_MSVCR_2013=msvcr120.dll
5135VS_MSVCP_2013=msvcp120.dll
5136VS_ENVVAR_2013="VS120COMNTOOLS"
5137VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5138VS_SDK_INSTALLDIR_2013=
5139VS_VS_PLATFORM_NAME_2013="v120"
5140VS_SDK_PLATFORM_NAME_2013=
5141
5142################################################################################
5143
5144
5145
5146################################################################################
5147
5148
5149
5150################################################################################
5151# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5152# build environment and assigns it to VS_ENV_CMD
5153
5154
5155################################################################################
5156
5157
5158
5159################################################################################
5160# Check if the VS env variables were setup prior to running configure.
5161# If not, then find vcvarsall.bat and run it automatically, and integrate
5162# the set env variables into the spec file.
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177# This line needs to be here, verbatim, after all includes and the dummy hook
5178# definitions. It is replaced with custom functionality when building
5179# custom sources.
5180#CUSTOM_AUTOCONF_INCLUDE
5181
5182# Do not change or remove the following line, it is needed for consistency checks:
5183DATE_WHEN_GENERATED=1485508515
5184
5185###############################################################################
5186#
5187# Initialization / Boot-strapping
5188#
5189# The bootstrapping process needs to solve the "chicken or the egg" problem,
5190# thus it jumps back and forth, each time gaining something needed later on.
5191#
5192###############################################################################
5193
5194# If we are requested to print additional help, do that and then exit.
5195# This must be the very first call.
5196
5197  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5198
5199    # Print available toolchains
5200    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5201    $PRINTF "Which are valid to use depends on the build platform.\n"
5202    for toolchain in $VALID_TOOLCHAINS_all; do
5203      # Use indirect variable referencing
5204      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5205      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5206      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5207    done
5208    $PRINTF "\n"
5209
5210    # Print available jvm features
5211    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5212    $PRINTF "Which are valid to use depends on the target platform.\n  "
5213    $PRINTF "%s " $VALID_JVM_FEATURES
5214    $PRINTF "\n"
5215
5216    # And now exit directly
5217    exit 0
5218  fi
5219
5220
5221# Basic initialization that must happen first of all in the normal process.
5222
5223  # Save the original command line. This is passed to us by the wrapper configure script.
5224
5225  # Save the path variable before it gets changed
5226  ORIGINAL_PATH="$PATH"
5227
5228  DATE_WHEN_CONFIGURED=`LANG=C date`
5229
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5231$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5233$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5234
5235
5236  # Start with tools that do not need have cross compilation support
5237  # and can be expected to be found in the default PATH. These tools are
5238  # used by configure.
5239
5240  # First are all the simple required tools.
5241
5242
5243
5244  # Publish this variable in the help.
5245
5246
5247  if [ -z "${BASENAME+x}" ]; then
5248    # The variable is not set by user, try to locate tool using the code snippet
5249    for ac_prog in basename
5250do
5251  # Extract the first word of "$ac_prog", so it can be a program name with args.
5252set dummy $ac_prog; ac_word=$2
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5254$as_echo_n "checking for $ac_word... " >&6; }
5255if ${ac_cv_path_BASENAME+:} false; then :
5256  $as_echo_n "(cached) " >&6
5257else
5258  case $BASENAME in
5259  [\\/]* | ?:[\\/]*)
5260  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5261  ;;
5262  *)
5263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5264for as_dir in $PATH
5265do
5266  IFS=$as_save_IFS
5267  test -z "$as_dir" && as_dir=.
5268    for ac_exec_ext in '' $ac_executable_extensions; do
5269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5270    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5272    break 2
5273  fi
5274done
5275  done
5276IFS=$as_save_IFS
5277
5278  ;;
5279esac
5280fi
5281BASENAME=$ac_cv_path_BASENAME
5282if test -n "$BASENAME"; then
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5284$as_echo "$BASENAME" >&6; }
5285else
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5287$as_echo "no" >&6; }
5288fi
5289
5290
5291  test -n "$BASENAME" && break
5292done
5293
5294  else
5295    # The variable is set, but is it from the command line or the environment?
5296
5297    # Try to remove the string !BASENAME! from our list.
5298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5300      # If it failed, the variable was not from the command line. Ignore it,
5301      # but warn the user (except for BASH, which is always set by the calling BASH).
5302      if test "xBASENAME" != xBASH; then
5303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5304$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5305      fi
5306      # Try to locate tool using the code snippet
5307      for ac_prog in basename
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if ${ac_cv_path_BASENAME+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $BASENAME in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339BASENAME=$ac_cv_path_BASENAME
5340if test -n "$BASENAME"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5342$as_echo "$BASENAME" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$BASENAME" && break
5350done
5351
5352    else
5353      # If it succeeded, then it was overridden by the user. We will use it
5354      # for the tool.
5355
5356      # First remove it from the list of overridden variables, so we can test
5357      # for unknown variables in the end.
5358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5359
5360      # Check if we try to supply an empty value
5361      if test "x$BASENAME" = x; then
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5363$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5365$as_echo_n "checking for BASENAME... " >&6; }
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5367$as_echo "disabled" >&6; }
5368      else
5369        # Check if the provided tool contains a complete path.
5370        tool_specified="$BASENAME"
5371        tool_basename="${tool_specified##*/}"
5372        if test "x$tool_basename" = "x$tool_specified"; then
5373          # A command without a complete path is provided, search $PATH.
5374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5375$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5376          # Extract the first word of "$tool_basename", so it can be a program name with args.
5377set dummy $tool_basename; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_path_BASENAME+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  case $BASENAME in
5384  [\\/]* | ?:[\\/]*)
5385  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5386  ;;
5387  *)
5388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5389for as_dir in $PATH
5390do
5391  IFS=$as_save_IFS
5392  test -z "$as_dir" && as_dir=.
5393    for ac_exec_ext in '' $ac_executable_extensions; do
5394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5395    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5397    break 2
5398  fi
5399done
5400  done
5401IFS=$as_save_IFS
5402
5403  ;;
5404esac
5405fi
5406BASENAME=$ac_cv_path_BASENAME
5407if test -n "$BASENAME"; then
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5409$as_echo "$BASENAME" >&6; }
5410else
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
5413fi
5414
5415
5416          if test "x$BASENAME" = x; then
5417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5418          fi
5419        else
5420          # Otherwise we believe it is a complete path. Use it as it is.
5421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5422$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5424$as_echo_n "checking for BASENAME... " >&6; }
5425          if test ! -x "$tool_specified"; then
5426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5427$as_echo "not found" >&6; }
5428            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5429          fi
5430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5431$as_echo "$tool_specified" >&6; }
5432        fi
5433      fi
5434    fi
5435
5436  fi
5437
5438
5439
5440  if test "x$BASENAME" = x; then
5441    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5442  fi
5443
5444
5445
5446
5447
5448  # Publish this variable in the help.
5449
5450
5451  if [ -z "${BASH+x}" ]; then
5452    # The variable is not set by user, try to locate tool using the code snippet
5453    for ac_prog in bash
5454do
5455  # Extract the first word of "$ac_prog", so it can be a program name with args.
5456set dummy $ac_prog; ac_word=$2
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
5459if ${ac_cv_path_BASH+:} false; then :
5460  $as_echo_n "(cached) " >&6
5461else
5462  case $BASH in
5463  [\\/]* | ?:[\\/]*)
5464  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5465  ;;
5466  *)
5467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468for as_dir in $PATH
5469do
5470  IFS=$as_save_IFS
5471  test -z "$as_dir" && as_dir=.
5472    for ac_exec_ext in '' $ac_executable_extensions; do
5473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5474    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476    break 2
5477  fi
5478done
5479  done
5480IFS=$as_save_IFS
5481
5482  ;;
5483esac
5484fi
5485BASH=$ac_cv_path_BASH
5486if test -n "$BASH"; then
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5488$as_echo "$BASH" >&6; }
5489else
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491$as_echo "no" >&6; }
5492fi
5493
5494
5495  test -n "$BASH" && break
5496done
5497
5498  else
5499    # The variable is set, but is it from the command line or the environment?
5500
5501    # Try to remove the string !BASH! from our list.
5502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5504      # If it failed, the variable was not from the command line. Ignore it,
5505      # but warn the user (except for BASH, which is always set by the calling BASH).
5506      if test "xBASH" != xBASH; then
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5508$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5509      fi
5510      # Try to locate tool using the code snippet
5511      for ac_prog in bash
5512do
5513  # Extract the first word of "$ac_prog", so it can be a program name with args.
5514set dummy $ac_prog; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_BASH+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $BASH in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543BASH=$ac_cv_path_BASH
5544if test -n "$BASH"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5546$as_echo "$BASH" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  test -n "$BASH" && break
5554done
5555
5556    else
5557      # If it succeeded, then it was overridden by the user. We will use it
5558      # for the tool.
5559
5560      # First remove it from the list of overridden variables, so we can test
5561      # for unknown variables in the end.
5562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5563
5564      # Check if we try to supply an empty value
5565      if test "x$BASH" = x; then
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5567$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5569$as_echo_n "checking for BASH... " >&6; }
5570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5571$as_echo "disabled" >&6; }
5572      else
5573        # Check if the provided tool contains a complete path.
5574        tool_specified="$BASH"
5575        tool_basename="${tool_specified##*/}"
5576        if test "x$tool_basename" = "x$tool_specified"; then
5577          # A command without a complete path is provided, search $PATH.
5578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5579$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5580          # Extract the first word of "$tool_basename", so it can be a program name with args.
5581set dummy $tool_basename; ac_word=$2
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if ${ac_cv_path_BASH+:} false; then :
5585  $as_echo_n "(cached) " >&6
5586else
5587  case $BASH in
5588  [\\/]* | ?:[\\/]*)
5589  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5590  ;;
5591  *)
5592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595  IFS=$as_save_IFS
5596  test -z "$as_dir" && as_dir=.
5597    for ac_exec_ext in '' $ac_executable_extensions; do
5598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5599    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601    break 2
5602  fi
5603done
5604  done
5605IFS=$as_save_IFS
5606
5607  ;;
5608esac
5609fi
5610BASH=$ac_cv_path_BASH
5611if test -n "$BASH"; then
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5613$as_echo "$BASH" >&6; }
5614else
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616$as_echo "no" >&6; }
5617fi
5618
5619
5620          if test "x$BASH" = x; then
5621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5622          fi
5623        else
5624          # Otherwise we believe it is a complete path. Use it as it is.
5625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5626$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5628$as_echo_n "checking for BASH... " >&6; }
5629          if test ! -x "$tool_specified"; then
5630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5631$as_echo "not found" >&6; }
5632            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5633          fi
5634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5635$as_echo "$tool_specified" >&6; }
5636        fi
5637      fi
5638    fi
5639
5640  fi
5641
5642
5643
5644  if test "x$BASH" = x; then
5645    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5646  fi
5647
5648
5649
5650
5651
5652  # Publish this variable in the help.
5653
5654
5655  if [ -z "${CAT+x}" ]; then
5656    # The variable is not set by user, try to locate tool using the code snippet
5657    for ac_prog in cat
5658do
5659  # Extract the first word of "$ac_prog", so it can be a program name with args.
5660set dummy $ac_prog; ac_word=$2
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
5663if ${ac_cv_path_CAT+:} false; then :
5664  $as_echo_n "(cached) " >&6
5665else
5666  case $CAT in
5667  [\\/]* | ?:[\\/]*)
5668  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5669  ;;
5670  *)
5671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5672for as_dir in $PATH
5673do
5674  IFS=$as_save_IFS
5675  test -z "$as_dir" && as_dir=.
5676    for ac_exec_ext in '' $ac_executable_extensions; do
5677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5678    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5680    break 2
5681  fi
5682done
5683  done
5684IFS=$as_save_IFS
5685
5686  ;;
5687esac
5688fi
5689CAT=$ac_cv_path_CAT
5690if test -n "$CAT"; then
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5692$as_echo "$CAT" >&6; }
5693else
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
5696fi
5697
5698
5699  test -n "$CAT" && break
5700done
5701
5702  else
5703    # The variable is set, but is it from the command line or the environment?
5704
5705    # Try to remove the string !CAT! from our list.
5706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5708      # If it failed, the variable was not from the command line. Ignore it,
5709      # but warn the user (except for BASH, which is always set by the calling BASH).
5710      if test "xCAT" != xBASH; then
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5712$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5713      fi
5714      # Try to locate tool using the code snippet
5715      for ac_prog in cat
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CAT+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CAT in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CAT=$ac_cv_path_CAT
5748if test -n "$CAT"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5750$as_echo "$CAT" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CAT" && break
5758done
5759
5760    else
5761      # If it succeeded, then it was overridden by the user. We will use it
5762      # for the tool.
5763
5764      # First remove it from the list of overridden variables, so we can test
5765      # for unknown variables in the end.
5766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5767
5768      # Check if we try to supply an empty value
5769      if test "x$CAT" = x; then
5770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5771$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5773$as_echo_n "checking for CAT... " >&6; }
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5775$as_echo "disabled" >&6; }
5776      else
5777        # Check if the provided tool contains a complete path.
5778        tool_specified="$CAT"
5779        tool_basename="${tool_specified##*/}"
5780        if test "x$tool_basename" = "x$tool_specified"; then
5781          # A command without a complete path is provided, search $PATH.
5782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5783$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5784          # Extract the first word of "$tool_basename", so it can be a program name with args.
5785set dummy $tool_basename; ac_word=$2
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787$as_echo_n "checking for $ac_word... " >&6; }
5788if ${ac_cv_path_CAT+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  case $CAT in
5792  [\\/]* | ?:[\\/]*)
5793  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5794  ;;
5795  *)
5796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5803    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811  ;;
5812esac
5813fi
5814CAT=$ac_cv_path_CAT
5815if test -n "$CAT"; then
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5817$as_echo "$CAT" >&6; }
5818else
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
5821fi
5822
5823
5824          if test "x$CAT" = x; then
5825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5826          fi
5827        else
5828          # Otherwise we believe it is a complete path. Use it as it is.
5829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5830$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5832$as_echo_n "checking for CAT... " >&6; }
5833          if test ! -x "$tool_specified"; then
5834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5835$as_echo "not found" >&6; }
5836            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5837          fi
5838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5839$as_echo "$tool_specified" >&6; }
5840        fi
5841      fi
5842    fi
5843
5844  fi
5845
5846
5847
5848  if test "x$CAT" = x; then
5849    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5850  fi
5851
5852
5853
5854
5855
5856  # Publish this variable in the help.
5857
5858
5859  if [ -z "${CHMOD+x}" ]; then
5860    # The variable is not set by user, try to locate tool using the code snippet
5861    for ac_prog in chmod
5862do
5863  # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_path_CHMOD+:} false; then :
5868  $as_echo_n "(cached) " >&6
5869else
5870  case $CHMOD in
5871  [\\/]* | ?:[\\/]*)
5872  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5873  ;;
5874  *)
5875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5876for as_dir in $PATH
5877do
5878  IFS=$as_save_IFS
5879  test -z "$as_dir" && as_dir=.
5880    for ac_exec_ext in '' $ac_executable_extensions; do
5881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5882    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5884    break 2
5885  fi
5886done
5887  done
5888IFS=$as_save_IFS
5889
5890  ;;
5891esac
5892fi
5893CHMOD=$ac_cv_path_CHMOD
5894if test -n "$CHMOD"; then
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5896$as_echo "$CHMOD" >&6; }
5897else
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903  test -n "$CHMOD" && break
5904done
5905
5906  else
5907    # The variable is set, but is it from the command line or the environment?
5908
5909    # Try to remove the string !CHMOD! from our list.
5910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5912      # If it failed, the variable was not from the command line. Ignore it,
5913      # but warn the user (except for BASH, which is always set by the calling BASH).
5914      if test "xCHMOD" != xBASH; then
5915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5916$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5917      fi
5918      # Try to locate tool using the code snippet
5919      for ac_prog in chmod
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_CHMOD+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $CHMOD in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951CHMOD=$ac_cv_path_CHMOD
5952if test -n "$CHMOD"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5954$as_echo "$CHMOD" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$CHMOD" && break
5962done
5963
5964    else
5965      # If it succeeded, then it was overridden by the user. We will use it
5966      # for the tool.
5967
5968      # First remove it from the list of overridden variables, so we can test
5969      # for unknown variables in the end.
5970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5971
5972      # Check if we try to supply an empty value
5973      if test "x$CHMOD" = x; then
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5975$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5977$as_echo_n "checking for CHMOD... " >&6; }
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5979$as_echo "disabled" >&6; }
5980      else
5981        # Check if the provided tool contains a complete path.
5982        tool_specified="$CHMOD"
5983        tool_basename="${tool_specified##*/}"
5984        if test "x$tool_basename" = "x$tool_specified"; then
5985          # A command without a complete path is provided, search $PATH.
5986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5987$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5988          # Extract the first word of "$tool_basename", so it can be a program name with args.
5989set dummy $tool_basename; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_path_CHMOD+:} false; then :
5993  $as_echo_n "(cached) " >&6
5994else
5995  case $CHMOD in
5996  [\\/]* | ?:[\\/]*)
5997  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5998  ;;
5999  *)
6000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003  IFS=$as_save_IFS
6004  test -z "$as_dir" && as_dir=.
6005    for ac_exec_ext in '' $ac_executable_extensions; do
6006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6007    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009    break 2
6010  fi
6011done
6012  done
6013IFS=$as_save_IFS
6014
6015  ;;
6016esac
6017fi
6018CHMOD=$ac_cv_path_CHMOD
6019if test -n "$CHMOD"; then
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6021$as_echo "$CHMOD" >&6; }
6022else
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
6025fi
6026
6027
6028          if test "x$CHMOD" = x; then
6029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6030          fi
6031        else
6032          # Otherwise we believe it is a complete path. Use it as it is.
6033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6034$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6036$as_echo_n "checking for CHMOD... " >&6; }
6037          if test ! -x "$tool_specified"; then
6038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6039$as_echo "not found" >&6; }
6040            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6041          fi
6042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6043$as_echo "$tool_specified" >&6; }
6044        fi
6045      fi
6046    fi
6047
6048  fi
6049
6050
6051
6052  if test "x$CHMOD" = x; then
6053    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6054  fi
6055
6056
6057
6058
6059
6060  # Publish this variable in the help.
6061
6062
6063  if [ -z "${CMP+x}" ]; then
6064    # The variable is not set by user, try to locate tool using the code snippet
6065    for ac_prog in cmp
6066do
6067  # Extract the first word of "$ac_prog", so it can be a program name with args.
6068set dummy $ac_prog; ac_word=$2
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
6071if ${ac_cv_path_CMP+:} false; then :
6072  $as_echo_n "(cached) " >&6
6073else
6074  case $CMP in
6075  [\\/]* | ?:[\\/]*)
6076  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6077  ;;
6078  *)
6079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082  IFS=$as_save_IFS
6083  test -z "$as_dir" && as_dir=.
6084    for ac_exec_ext in '' $ac_executable_extensions; do
6085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6086    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6088    break 2
6089  fi
6090done
6091  done
6092IFS=$as_save_IFS
6093
6094  ;;
6095esac
6096fi
6097CMP=$ac_cv_path_CMP
6098if test -n "$CMP"; then
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6100$as_echo "$CMP" >&6; }
6101else
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107  test -n "$CMP" && break
6108done
6109
6110  else
6111    # The variable is set, but is it from the command line or the environment?
6112
6113    # Try to remove the string !CMP! from our list.
6114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6116      # If it failed, the variable was not from the command line. Ignore it,
6117      # but warn the user (except for BASH, which is always set by the calling BASH).
6118      if test "xCMP" != xBASH; then
6119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6120$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6121      fi
6122      # Try to locate tool using the code snippet
6123      for ac_prog in cmp
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_CMP+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $CMP in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155CMP=$ac_cv_path_CMP
6156if test -n "$CMP"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6158$as_echo "$CMP" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$CMP" && break
6166done
6167
6168    else
6169      # If it succeeded, then it was overridden by the user. We will use it
6170      # for the tool.
6171
6172      # First remove it from the list of overridden variables, so we can test
6173      # for unknown variables in the end.
6174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6175
6176      # Check if we try to supply an empty value
6177      if test "x$CMP" = x; then
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6179$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6181$as_echo_n "checking for CMP... " >&6; }
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6183$as_echo "disabled" >&6; }
6184      else
6185        # Check if the provided tool contains a complete path.
6186        tool_specified="$CMP"
6187        tool_basename="${tool_specified##*/}"
6188        if test "x$tool_basename" = "x$tool_specified"; then
6189          # A command without a complete path is provided, search $PATH.
6190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6191$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6192          # Extract the first word of "$tool_basename", so it can be a program name with args.
6193set dummy $tool_basename; ac_word=$2
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6195$as_echo_n "checking for $ac_word... " >&6; }
6196if ${ac_cv_path_CMP+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  case $CMP in
6200  [\\/]* | ?:[\\/]*)
6201  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6202  ;;
6203  *)
6204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207  IFS=$as_save_IFS
6208  test -z "$as_dir" && as_dir=.
6209    for ac_exec_ext in '' $ac_executable_extensions; do
6210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6211    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213    break 2
6214  fi
6215done
6216  done
6217IFS=$as_save_IFS
6218
6219  ;;
6220esac
6221fi
6222CMP=$ac_cv_path_CMP
6223if test -n "$CMP"; then
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6225$as_echo "$CMP" >&6; }
6226else
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229fi
6230
6231
6232          if test "x$CMP" = x; then
6233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6234          fi
6235        else
6236          # Otherwise we believe it is a complete path. Use it as it is.
6237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6238$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6240$as_echo_n "checking for CMP... " >&6; }
6241          if test ! -x "$tool_specified"; then
6242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6243$as_echo "not found" >&6; }
6244            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6245          fi
6246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6247$as_echo "$tool_specified" >&6; }
6248        fi
6249      fi
6250    fi
6251
6252  fi
6253
6254
6255
6256  if test "x$CMP" = x; then
6257    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6258  fi
6259
6260
6261
6262
6263
6264  # Publish this variable in the help.
6265
6266
6267  if [ -z "${COMM+x}" ]; then
6268    # The variable is not set by user, try to locate tool using the code snippet
6269    for ac_prog in comm
6270do
6271  # Extract the first word of "$ac_prog", so it can be a program name with args.
6272set dummy $ac_prog; ac_word=$2
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274$as_echo_n "checking for $ac_word... " >&6; }
6275if ${ac_cv_path_COMM+:} false; then :
6276  $as_echo_n "(cached) " >&6
6277else
6278  case $COMM in
6279  [\\/]* | ?:[\\/]*)
6280  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6281  ;;
6282  *)
6283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH
6285do
6286  IFS=$as_save_IFS
6287  test -z "$as_dir" && as_dir=.
6288    for ac_exec_ext in '' $ac_executable_extensions; do
6289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6290    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6292    break 2
6293  fi
6294done
6295  done
6296IFS=$as_save_IFS
6297
6298  ;;
6299esac
6300fi
6301COMM=$ac_cv_path_COMM
6302if test -n "$COMM"; then
6303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6304$as_echo "$COMM" >&6; }
6305else
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }
6308fi
6309
6310
6311  test -n "$COMM" && break
6312done
6313
6314  else
6315    # The variable is set, but is it from the command line or the environment?
6316
6317    # Try to remove the string !COMM! from our list.
6318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6320      # If it failed, the variable was not from the command line. Ignore it,
6321      # but warn the user (except for BASH, which is always set by the calling BASH).
6322      if test "xCOMM" != xBASH; then
6323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6324$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6325      fi
6326      # Try to locate tool using the code snippet
6327      for ac_prog in comm
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_path_COMM+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  case $COMM in
6337  [\\/]* | ?:[\\/]*)
6338  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6339  ;;
6340  *)
6341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342for as_dir in $PATH
6343do
6344  IFS=$as_save_IFS
6345  test -z "$as_dir" && as_dir=.
6346    for ac_exec_ext in '' $ac_executable_extensions; do
6347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6348    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6350    break 2
6351  fi
6352done
6353  done
6354IFS=$as_save_IFS
6355
6356  ;;
6357esac
6358fi
6359COMM=$ac_cv_path_COMM
6360if test -n "$COMM"; then
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6362$as_echo "$COMM" >&6; }
6363else
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369  test -n "$COMM" && break
6370done
6371
6372    else
6373      # If it succeeded, then it was overridden by the user. We will use it
6374      # for the tool.
6375
6376      # First remove it from the list of overridden variables, so we can test
6377      # for unknown variables in the end.
6378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6379
6380      # Check if we try to supply an empty value
6381      if test "x$COMM" = x; then
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6383$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6385$as_echo_n "checking for COMM... " >&6; }
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6387$as_echo "disabled" >&6; }
6388      else
6389        # Check if the provided tool contains a complete path.
6390        tool_specified="$COMM"
6391        tool_basename="${tool_specified##*/}"
6392        if test "x$tool_basename" = "x$tool_specified"; then
6393          # A command without a complete path is provided, search $PATH.
6394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6395$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6396          # Extract the first word of "$tool_basename", so it can be a program name with args.
6397set dummy $tool_basename; ac_word=$2
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if ${ac_cv_path_COMM+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  case $COMM in
6404  [\\/]* | ?:[\\/]*)
6405  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6406  ;;
6407  *)
6408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411  IFS=$as_save_IFS
6412  test -z "$as_dir" && as_dir=.
6413    for ac_exec_ext in '' $ac_executable_extensions; do
6414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6415    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6417    break 2
6418  fi
6419done
6420  done
6421IFS=$as_save_IFS
6422
6423  ;;
6424esac
6425fi
6426COMM=$ac_cv_path_COMM
6427if test -n "$COMM"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6429$as_echo "$COMM" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436          if test "x$COMM" = x; then
6437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6438          fi
6439        else
6440          # Otherwise we believe it is a complete path. Use it as it is.
6441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6442$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6444$as_echo_n "checking for COMM... " >&6; }
6445          if test ! -x "$tool_specified"; then
6446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6447$as_echo "not found" >&6; }
6448            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6449          fi
6450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6451$as_echo "$tool_specified" >&6; }
6452        fi
6453      fi
6454    fi
6455
6456  fi
6457
6458
6459
6460  if test "x$COMM" = x; then
6461    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6462  fi
6463
6464
6465
6466
6467
6468  # Publish this variable in the help.
6469
6470
6471  if [ -z "${CP+x}" ]; then
6472    # The variable is not set by user, try to locate tool using the code snippet
6473    for ac_prog in cp
6474do
6475  # Extract the first word of "$ac_prog", so it can be a program name with args.
6476set dummy $ac_prog; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_CP+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $CP in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505CP=$ac_cv_path_CP
6506if test -n "$CP"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6508$as_echo "$CP" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515  test -n "$CP" && break
6516done
6517
6518  else
6519    # The variable is set, but is it from the command line or the environment?
6520
6521    # Try to remove the string !CP! from our list.
6522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6524      # If it failed, the variable was not from the command line. Ignore it,
6525      # but warn the user (except for BASH, which is always set by the calling BASH).
6526      if test "xCP" != xBASH; then
6527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6528$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6529      fi
6530      # Try to locate tool using the code snippet
6531      for ac_prog in cp
6532do
6533  # Extract the first word of "$ac_prog", so it can be a program name with args.
6534set dummy $ac_prog; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_CP+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $CP in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563CP=$ac_cv_path_CP
6564if test -n "$CP"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6566$as_echo "$CP" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573  test -n "$CP" && break
6574done
6575
6576    else
6577      # If it succeeded, then it was overridden by the user. We will use it
6578      # for the tool.
6579
6580      # First remove it from the list of overridden variables, so we can test
6581      # for unknown variables in the end.
6582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6583
6584      # Check if we try to supply an empty value
6585      if test "x$CP" = x; then
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6587$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6589$as_echo_n "checking for CP... " >&6; }
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6591$as_echo "disabled" >&6; }
6592      else
6593        # Check if the provided tool contains a complete path.
6594        tool_specified="$CP"
6595        tool_basename="${tool_specified##*/}"
6596        if test "x$tool_basename" = "x$tool_specified"; then
6597          # A command without a complete path is provided, search $PATH.
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6599$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6600          # Extract the first word of "$tool_basename", so it can be a program name with args.
6601set dummy $tool_basename; ac_word=$2
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603$as_echo_n "checking for $ac_word... " >&6; }
6604if ${ac_cv_path_CP+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  case $CP in
6608  [\\/]* | ?:[\\/]*)
6609  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6610  ;;
6611  *)
6612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6613for as_dir in $PATH
6614do
6615  IFS=$as_save_IFS
6616  test -z "$as_dir" && as_dir=.
6617    for ac_exec_ext in '' $ac_executable_extensions; do
6618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6619    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6621    break 2
6622  fi
6623done
6624  done
6625IFS=$as_save_IFS
6626
6627  ;;
6628esac
6629fi
6630CP=$ac_cv_path_CP
6631if test -n "$CP"; then
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6633$as_echo "$CP" >&6; }
6634else
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6636$as_echo "no" >&6; }
6637fi
6638
6639
6640          if test "x$CP" = x; then
6641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6642          fi
6643        else
6644          # Otherwise we believe it is a complete path. Use it as it is.
6645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6646$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6648$as_echo_n "checking for CP... " >&6; }
6649          if test ! -x "$tool_specified"; then
6650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6651$as_echo "not found" >&6; }
6652            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6653          fi
6654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6655$as_echo "$tool_specified" >&6; }
6656        fi
6657      fi
6658    fi
6659
6660  fi
6661
6662
6663
6664  if test "x$CP" = x; then
6665    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6666  fi
6667
6668
6669
6670
6671
6672  # Publish this variable in the help.
6673
6674
6675  if [ -z "${CUT+x}" ]; then
6676    # The variable is not set by user, try to locate tool using the code snippet
6677    for ac_prog in cut
6678do
6679  # Extract the first word of "$ac_prog", so it can be a program name with args.
6680set dummy $ac_prog; ac_word=$2
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6682$as_echo_n "checking for $ac_word... " >&6; }
6683if ${ac_cv_path_CUT+:} false; then :
6684  $as_echo_n "(cached) " >&6
6685else
6686  case $CUT in
6687  [\\/]* | ?:[\\/]*)
6688  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6689  ;;
6690  *)
6691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692for as_dir in $PATH
6693do
6694  IFS=$as_save_IFS
6695  test -z "$as_dir" && as_dir=.
6696    for ac_exec_ext in '' $ac_executable_extensions; do
6697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6698    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700    break 2
6701  fi
6702done
6703  done
6704IFS=$as_save_IFS
6705
6706  ;;
6707esac
6708fi
6709CUT=$ac_cv_path_CUT
6710if test -n "$CUT"; then
6711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6712$as_echo "$CUT" >&6; }
6713else
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718
6719  test -n "$CUT" && break
6720done
6721
6722  else
6723    # The variable is set, but is it from the command line or the environment?
6724
6725    # Try to remove the string !CUT! from our list.
6726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6728      # If it failed, the variable was not from the command line. Ignore it,
6729      # but warn the user (except for BASH, which is always set by the calling BASH).
6730      if test "xCUT" != xBASH; then
6731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6732$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6733      fi
6734      # Try to locate tool using the code snippet
6735      for ac_prog in cut
6736do
6737  # Extract the first word of "$ac_prog", so it can be a program name with args.
6738set dummy $ac_prog; ac_word=$2
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740$as_echo_n "checking for $ac_word... " >&6; }
6741if ${ac_cv_path_CUT+:} false; then :
6742  $as_echo_n "(cached) " >&6
6743else
6744  case $CUT in
6745  [\\/]* | ?:[\\/]*)
6746  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6747  ;;
6748  *)
6749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764  ;;
6765esac
6766fi
6767CUT=$ac_cv_path_CUT
6768if test -n "$CUT"; then
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6770$as_echo "$CUT" >&6; }
6771else
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773$as_echo "no" >&6; }
6774fi
6775
6776
6777  test -n "$CUT" && break
6778done
6779
6780    else
6781      # If it succeeded, then it was overridden by the user. We will use it
6782      # for the tool.
6783
6784      # First remove it from the list of overridden variables, so we can test
6785      # for unknown variables in the end.
6786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6787
6788      # Check if we try to supply an empty value
6789      if test "x$CUT" = x; then
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6791$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6793$as_echo_n "checking for CUT... " >&6; }
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6795$as_echo "disabled" >&6; }
6796      else
6797        # Check if the provided tool contains a complete path.
6798        tool_specified="$CUT"
6799        tool_basename="${tool_specified##*/}"
6800        if test "x$tool_basename" = "x$tool_specified"; then
6801          # A command without a complete path is provided, search $PATH.
6802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6803$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6804          # Extract the first word of "$tool_basename", so it can be a program name with args.
6805set dummy $tool_basename; ac_word=$2
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if ${ac_cv_path_CUT+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  case $CUT in
6812  [\\/]* | ?:[\\/]*)
6813  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6814  ;;
6815  *)
6816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831  ;;
6832esac
6833fi
6834CUT=$ac_cv_path_CUT
6835if test -n "$CUT"; then
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6837$as_echo "$CUT" >&6; }
6838else
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6840$as_echo "no" >&6; }
6841fi
6842
6843
6844          if test "x$CUT" = x; then
6845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6846          fi
6847        else
6848          # Otherwise we believe it is a complete path. Use it as it is.
6849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6850$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6852$as_echo_n "checking for CUT... " >&6; }
6853          if test ! -x "$tool_specified"; then
6854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6855$as_echo "not found" >&6; }
6856            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6857          fi
6858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6859$as_echo "$tool_specified" >&6; }
6860        fi
6861      fi
6862    fi
6863
6864  fi
6865
6866
6867
6868  if test "x$CUT" = x; then
6869    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6870  fi
6871
6872
6873
6874
6875
6876  # Publish this variable in the help.
6877
6878
6879  if [ -z "${DATE+x}" ]; then
6880    # The variable is not set by user, try to locate tool using the code snippet
6881    for ac_prog in date
6882do
6883  # Extract the first word of "$ac_prog", so it can be a program name with args.
6884set dummy $ac_prog; ac_word=$2
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886$as_echo_n "checking for $ac_word... " >&6; }
6887if ${ac_cv_path_DATE+:} false; then :
6888  $as_echo_n "(cached) " >&6
6889else
6890  case $DATE in
6891  [\\/]* | ?:[\\/]*)
6892  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6893  ;;
6894  *)
6895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896for as_dir in $PATH
6897do
6898  IFS=$as_save_IFS
6899  test -z "$as_dir" && as_dir=.
6900    for ac_exec_ext in '' $ac_executable_extensions; do
6901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904    break 2
6905  fi
6906done
6907  done
6908IFS=$as_save_IFS
6909
6910  ;;
6911esac
6912fi
6913DATE=$ac_cv_path_DATE
6914if test -n "$DATE"; then
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6916$as_echo "$DATE" >&6; }
6917else
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919$as_echo "no" >&6; }
6920fi
6921
6922
6923  test -n "$DATE" && break
6924done
6925
6926  else
6927    # The variable is set, but is it from the command line or the environment?
6928
6929    # Try to remove the string !DATE! from our list.
6930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6932      # If it failed, the variable was not from the command line. Ignore it,
6933      # but warn the user (except for BASH, which is always set by the calling BASH).
6934      if test "xDATE" != xBASH; then
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6936$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6937      fi
6938      # Try to locate tool using the code snippet
6939      for ac_prog in date
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_DATE+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $DATE in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971DATE=$ac_cv_path_DATE
6972if test -n "$DATE"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6974$as_echo "$DATE" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$DATE" && break
6982done
6983
6984    else
6985      # If it succeeded, then it was overridden by the user. We will use it
6986      # for the tool.
6987
6988      # First remove it from the list of overridden variables, so we can test
6989      # for unknown variables in the end.
6990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6991
6992      # Check if we try to supply an empty value
6993      if test "x$DATE" = x; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6995$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6997$as_echo_n "checking for DATE... " >&6; }
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6999$as_echo "disabled" >&6; }
7000      else
7001        # Check if the provided tool contains a complete path.
7002        tool_specified="$DATE"
7003        tool_basename="${tool_specified##*/}"
7004        if test "x$tool_basename" = "x$tool_specified"; then
7005          # A command without a complete path is provided, search $PATH.
7006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7007$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7008          # Extract the first word of "$tool_basename", so it can be a program name with args.
7009set dummy $tool_basename; ac_word=$2
7010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7011$as_echo_n "checking for $ac_word... " >&6; }
7012if ${ac_cv_path_DATE+:} false; then :
7013  $as_echo_n "(cached) " >&6
7014else
7015  case $DATE in
7016  [\\/]* | ?:[\\/]*)
7017  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7018  ;;
7019  *)
7020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7021for as_dir in $PATH
7022do
7023  IFS=$as_save_IFS
7024  test -z "$as_dir" && as_dir=.
7025    for ac_exec_ext in '' $ac_executable_extensions; do
7026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7027    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7029    break 2
7030  fi
7031done
7032  done
7033IFS=$as_save_IFS
7034
7035  ;;
7036esac
7037fi
7038DATE=$ac_cv_path_DATE
7039if test -n "$DATE"; then
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7041$as_echo "$DATE" >&6; }
7042else
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044$as_echo "no" >&6; }
7045fi
7046
7047
7048          if test "x$DATE" = x; then
7049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7050          fi
7051        else
7052          # Otherwise we believe it is a complete path. Use it as it is.
7053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7054$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7056$as_echo_n "checking for DATE... " >&6; }
7057          if test ! -x "$tool_specified"; then
7058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7059$as_echo "not found" >&6; }
7060            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7061          fi
7062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7063$as_echo "$tool_specified" >&6; }
7064        fi
7065      fi
7066    fi
7067
7068  fi
7069
7070
7071
7072  if test "x$DATE" = x; then
7073    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7074  fi
7075
7076
7077
7078
7079
7080  # Publish this variable in the help.
7081
7082
7083  if [ -z "${DIFF+x}" ]; then
7084    # The variable is not set by user, try to locate tool using the code snippet
7085    for ac_prog in gdiff diff
7086do
7087  # Extract the first word of "$ac_prog", so it can be a program name with args.
7088set dummy $ac_prog; ac_word=$2
7089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7090$as_echo_n "checking for $ac_word... " >&6; }
7091if ${ac_cv_path_DIFF+:} false; then :
7092  $as_echo_n "(cached) " >&6
7093else
7094  case $DIFF in
7095  [\\/]* | ?:[\\/]*)
7096  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7097  ;;
7098  *)
7099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7100for as_dir in $PATH
7101do
7102  IFS=$as_save_IFS
7103  test -z "$as_dir" && as_dir=.
7104    for ac_exec_ext in '' $ac_executable_extensions; do
7105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7106    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7108    break 2
7109  fi
7110done
7111  done
7112IFS=$as_save_IFS
7113
7114  ;;
7115esac
7116fi
7117DIFF=$ac_cv_path_DIFF
7118if test -n "$DIFF"; then
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7120$as_echo "$DIFF" >&6; }
7121else
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7123$as_echo "no" >&6; }
7124fi
7125
7126
7127  test -n "$DIFF" && break
7128done
7129
7130  else
7131    # The variable is set, but is it from the command line or the environment?
7132
7133    # Try to remove the string !DIFF! from our list.
7134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7136      # If it failed, the variable was not from the command line. Ignore it,
7137      # but warn the user (except for BASH, which is always set by the calling BASH).
7138      if test "xDIFF" != xBASH; then
7139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7140$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7141      fi
7142      # Try to locate tool using the code snippet
7143      for ac_prog in gdiff diff
7144do
7145  # Extract the first word of "$ac_prog", so it can be a program name with args.
7146set dummy $ac_prog; ac_word=$2
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7148$as_echo_n "checking for $ac_word... " >&6; }
7149if ${ac_cv_path_DIFF+:} false; then :
7150  $as_echo_n "(cached) " >&6
7151else
7152  case $DIFF in
7153  [\\/]* | ?:[\\/]*)
7154  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7155  ;;
7156  *)
7157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158for as_dir in $PATH
7159do
7160  IFS=$as_save_IFS
7161  test -z "$as_dir" && as_dir=.
7162    for ac_exec_ext in '' $ac_executable_extensions; do
7163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7164    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7166    break 2
7167  fi
7168done
7169  done
7170IFS=$as_save_IFS
7171
7172  ;;
7173esac
7174fi
7175DIFF=$ac_cv_path_DIFF
7176if test -n "$DIFF"; then
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7178$as_echo "$DIFF" >&6; }
7179else
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
7182fi
7183
7184
7185  test -n "$DIFF" && break
7186done
7187
7188    else
7189      # If it succeeded, then it was overridden by the user. We will use it
7190      # for the tool.
7191
7192      # First remove it from the list of overridden variables, so we can test
7193      # for unknown variables in the end.
7194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7195
7196      # Check if we try to supply an empty value
7197      if test "x$DIFF" = x; then
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7199$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7201$as_echo_n "checking for DIFF... " >&6; }
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7203$as_echo "disabled" >&6; }
7204      else
7205        # Check if the provided tool contains a complete path.
7206        tool_specified="$DIFF"
7207        tool_basename="${tool_specified##*/}"
7208        if test "x$tool_basename" = "x$tool_specified"; then
7209          # A command without a complete path is provided, search $PATH.
7210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7211$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7212          # Extract the first word of "$tool_basename", so it can be a program name with args.
7213set dummy $tool_basename; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_DIFF+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $DIFF in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242DIFF=$ac_cv_path_DIFF
7243if test -n "$DIFF"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7245$as_echo "$DIFF" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252          if test "x$DIFF" = x; then
7253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7254          fi
7255        else
7256          # Otherwise we believe it is a complete path. Use it as it is.
7257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7258$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7260$as_echo_n "checking for DIFF... " >&6; }
7261          if test ! -x "$tool_specified"; then
7262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7263$as_echo "not found" >&6; }
7264            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7265          fi
7266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7267$as_echo "$tool_specified" >&6; }
7268        fi
7269      fi
7270    fi
7271
7272  fi
7273
7274
7275
7276  if test "x$DIFF" = x; then
7277    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7278  fi
7279
7280
7281
7282
7283
7284  # Publish this variable in the help.
7285
7286
7287  if [ -z "${DIRNAME+x}" ]; then
7288    # The variable is not set by user, try to locate tool using the code snippet
7289    for ac_prog in dirname
7290do
7291  # Extract the first word of "$ac_prog", so it can be a program name with args.
7292set dummy $ac_prog; ac_word=$2
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
7295if ${ac_cv_path_DIRNAME+:} false; then :
7296  $as_echo_n "(cached) " >&6
7297else
7298  case $DIRNAME in
7299  [\\/]* | ?:[\\/]*)
7300  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7301  ;;
7302  *)
7303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  test -z "$as_dir" && as_dir=.
7308    for ac_exec_ext in '' $ac_executable_extensions; do
7309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312    break 2
7313  fi
7314done
7315  done
7316IFS=$as_save_IFS
7317
7318  ;;
7319esac
7320fi
7321DIRNAME=$ac_cv_path_DIRNAME
7322if test -n "$DIRNAME"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7324$as_echo "$DIRNAME" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331  test -n "$DIRNAME" && break
7332done
7333
7334  else
7335    # The variable is set, but is it from the command line or the environment?
7336
7337    # Try to remove the string !DIRNAME! from our list.
7338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7340      # If it failed, the variable was not from the command line. Ignore it,
7341      # but warn the user (except for BASH, which is always set by the calling BASH).
7342      if test "xDIRNAME" != xBASH; then
7343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7344$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7345      fi
7346      # Try to locate tool using the code snippet
7347      for ac_prog in dirname
7348do
7349  # Extract the first word of "$ac_prog", so it can be a program name with args.
7350set dummy $ac_prog; ac_word=$2
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
7353if ${ac_cv_path_DIRNAME+:} false; then :
7354  $as_echo_n "(cached) " >&6
7355else
7356  case $DIRNAME in
7357  [\\/]* | ?:[\\/]*)
7358  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7359  ;;
7360  *)
7361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364  IFS=$as_save_IFS
7365  test -z "$as_dir" && as_dir=.
7366    for ac_exec_ext in '' $ac_executable_extensions; do
7367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7368    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7370    break 2
7371  fi
7372done
7373  done
7374IFS=$as_save_IFS
7375
7376  ;;
7377esac
7378fi
7379DIRNAME=$ac_cv_path_DIRNAME
7380if test -n "$DIRNAME"; then
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7382$as_echo "$DIRNAME" >&6; }
7383else
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
7386fi
7387
7388
7389  test -n "$DIRNAME" && break
7390done
7391
7392    else
7393      # If it succeeded, then it was overridden by the user. We will use it
7394      # for the tool.
7395
7396      # First remove it from the list of overridden variables, so we can test
7397      # for unknown variables in the end.
7398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7399
7400      # Check if we try to supply an empty value
7401      if test "x$DIRNAME" = x; then
7402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7403$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7405$as_echo_n "checking for DIRNAME... " >&6; }
7406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7407$as_echo "disabled" >&6; }
7408      else
7409        # Check if the provided tool contains a complete path.
7410        tool_specified="$DIRNAME"
7411        tool_basename="${tool_specified##*/}"
7412        if test "x$tool_basename" = "x$tool_specified"; then
7413          # A command without a complete path is provided, search $PATH.
7414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7415$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7416          # Extract the first word of "$tool_basename", so it can be a program name with args.
7417set dummy $tool_basename; ac_word=$2
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419$as_echo_n "checking for $ac_word... " >&6; }
7420if ${ac_cv_path_DIRNAME+:} false; then :
7421  $as_echo_n "(cached) " >&6
7422else
7423  case $DIRNAME in
7424  [\\/]* | ?:[\\/]*)
7425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7426  ;;
7427  *)
7428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429for as_dir in $PATH
7430do
7431  IFS=$as_save_IFS
7432  test -z "$as_dir" && as_dir=.
7433    for ac_exec_ext in '' $ac_executable_extensions; do
7434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7437    break 2
7438  fi
7439done
7440  done
7441IFS=$as_save_IFS
7442
7443  ;;
7444esac
7445fi
7446DIRNAME=$ac_cv_path_DIRNAME
7447if test -n "$DIRNAME"; then
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7449$as_echo "$DIRNAME" >&6; }
7450else
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452$as_echo "no" >&6; }
7453fi
7454
7455
7456          if test "x$DIRNAME" = x; then
7457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7458          fi
7459        else
7460          # Otherwise we believe it is a complete path. Use it as it is.
7461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7462$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7464$as_echo_n "checking for DIRNAME... " >&6; }
7465          if test ! -x "$tool_specified"; then
7466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7467$as_echo "not found" >&6; }
7468            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7469          fi
7470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7471$as_echo "$tool_specified" >&6; }
7472        fi
7473      fi
7474    fi
7475
7476  fi
7477
7478
7479
7480  if test "x$DIRNAME" = x; then
7481    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7482  fi
7483
7484
7485
7486
7487
7488  # Publish this variable in the help.
7489
7490
7491  if [ -z "${ECHO+x}" ]; then
7492    # The variable is not set by user, try to locate tool using the code snippet
7493    for ac_prog in echo
7494do
7495  # Extract the first word of "$ac_prog", so it can be a program name with args.
7496set dummy $ac_prog; ac_word=$2
7497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7498$as_echo_n "checking for $ac_word... " >&6; }
7499if ${ac_cv_path_ECHO+:} false; then :
7500  $as_echo_n "(cached) " >&6
7501else
7502  case $ECHO in
7503  [\\/]* | ?:[\\/]*)
7504  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7505  ;;
7506  *)
7507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508for as_dir in $PATH
7509do
7510  IFS=$as_save_IFS
7511  test -z "$as_dir" && as_dir=.
7512    for ac_exec_ext in '' $ac_executable_extensions; do
7513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7514    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7516    break 2
7517  fi
7518done
7519  done
7520IFS=$as_save_IFS
7521
7522  ;;
7523esac
7524fi
7525ECHO=$ac_cv_path_ECHO
7526if test -n "$ECHO"; then
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7528$as_echo "$ECHO" >&6; }
7529else
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
7532fi
7533
7534
7535  test -n "$ECHO" && break
7536done
7537
7538  else
7539    # The variable is set, but is it from the command line or the environment?
7540
7541    # Try to remove the string !ECHO! from our list.
7542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7544      # If it failed, the variable was not from the command line. Ignore it,
7545      # but warn the user (except for BASH, which is always set by the calling BASH).
7546      if test "xECHO" != xBASH; then
7547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7548$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7549      fi
7550      # Try to locate tool using the code snippet
7551      for ac_prog in echo
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_ECHO+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $ECHO in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583ECHO=$ac_cv_path_ECHO
7584if test -n "$ECHO"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7586$as_echo "$ECHO" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$ECHO" && break
7594done
7595
7596    else
7597      # If it succeeded, then it was overridden by the user. We will use it
7598      # for the tool.
7599
7600      # First remove it from the list of overridden variables, so we can test
7601      # for unknown variables in the end.
7602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7603
7604      # Check if we try to supply an empty value
7605      if test "x$ECHO" = x; then
7606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7607$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7609$as_echo_n "checking for ECHO... " >&6; }
7610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7611$as_echo "disabled" >&6; }
7612      else
7613        # Check if the provided tool contains a complete path.
7614        tool_specified="$ECHO"
7615        tool_basename="${tool_specified##*/}"
7616        if test "x$tool_basename" = "x$tool_specified"; then
7617          # A command without a complete path is provided, search $PATH.
7618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7619$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7620          # Extract the first word of "$tool_basename", so it can be a program name with args.
7621set dummy $tool_basename; ac_word=$2
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
7624if ${ac_cv_path_ECHO+:} false; then :
7625  $as_echo_n "(cached) " >&6
7626else
7627  case $ECHO in
7628  [\\/]* | ?:[\\/]*)
7629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7630  ;;
7631  *)
7632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633for as_dir in $PATH
7634do
7635  IFS=$as_save_IFS
7636  test -z "$as_dir" && as_dir=.
7637    for ac_exec_ext in '' $ac_executable_extensions; do
7638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7641    break 2
7642  fi
7643done
7644  done
7645IFS=$as_save_IFS
7646
7647  ;;
7648esac
7649fi
7650ECHO=$ac_cv_path_ECHO
7651if test -n "$ECHO"; then
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7653$as_echo "$ECHO" >&6; }
7654else
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
7657fi
7658
7659
7660          if test "x$ECHO" = x; then
7661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7662          fi
7663        else
7664          # Otherwise we believe it is a complete path. Use it as it is.
7665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7666$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7668$as_echo_n "checking for ECHO... " >&6; }
7669          if test ! -x "$tool_specified"; then
7670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7671$as_echo "not found" >&6; }
7672            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7673          fi
7674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7675$as_echo "$tool_specified" >&6; }
7676        fi
7677      fi
7678    fi
7679
7680  fi
7681
7682
7683
7684  if test "x$ECHO" = x; then
7685    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7686  fi
7687
7688
7689
7690
7691
7692  # Publish this variable in the help.
7693
7694
7695  if [ -z "${EXPR+x}" ]; then
7696    # The variable is not set by user, try to locate tool using the code snippet
7697    for ac_prog in expr
7698do
7699  # Extract the first word of "$ac_prog", so it can be a program name with args.
7700set dummy $ac_prog; ac_word=$2
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7702$as_echo_n "checking for $ac_word... " >&6; }
7703if ${ac_cv_path_EXPR+:} false; then :
7704  $as_echo_n "(cached) " >&6
7705else
7706  case $EXPR in
7707  [\\/]* | ?:[\\/]*)
7708  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7709  ;;
7710  *)
7711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7712for as_dir in $PATH
7713do
7714  IFS=$as_save_IFS
7715  test -z "$as_dir" && as_dir=.
7716    for ac_exec_ext in '' $ac_executable_extensions; do
7717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7718    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7720    break 2
7721  fi
7722done
7723  done
7724IFS=$as_save_IFS
7725
7726  ;;
7727esac
7728fi
7729EXPR=$ac_cv_path_EXPR
7730if test -n "$EXPR"; then
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7732$as_echo "$EXPR" >&6; }
7733else
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738
7739  test -n "$EXPR" && break
7740done
7741
7742  else
7743    # The variable is set, but is it from the command line or the environment?
7744
7745    # Try to remove the string !EXPR! from our list.
7746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7748      # If it failed, the variable was not from the command line. Ignore it,
7749      # but warn the user (except for BASH, which is always set by the calling BASH).
7750      if test "xEXPR" != xBASH; then
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7752$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7753      fi
7754      # Try to locate tool using the code snippet
7755      for ac_prog in expr
7756do
7757  # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7760$as_echo_n "checking for $ac_word... " >&6; }
7761if ${ac_cv_path_EXPR+:} false; then :
7762  $as_echo_n "(cached) " >&6
7763else
7764  case $EXPR in
7765  [\\/]* | ?:[\\/]*)
7766  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7767  ;;
7768  *)
7769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784  ;;
7785esac
7786fi
7787EXPR=$ac_cv_path_EXPR
7788if test -n "$EXPR"; then
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7790$as_echo "$EXPR" >&6; }
7791else
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7793$as_echo "no" >&6; }
7794fi
7795
7796
7797  test -n "$EXPR" && break
7798done
7799
7800    else
7801      # If it succeeded, then it was overridden by the user. We will use it
7802      # for the tool.
7803
7804      # First remove it from the list of overridden variables, so we can test
7805      # for unknown variables in the end.
7806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7807
7808      # Check if we try to supply an empty value
7809      if test "x$EXPR" = x; then
7810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7811$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7813$as_echo_n "checking for EXPR... " >&6; }
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7815$as_echo "disabled" >&6; }
7816      else
7817        # Check if the provided tool contains a complete path.
7818        tool_specified="$EXPR"
7819        tool_basename="${tool_specified##*/}"
7820        if test "x$tool_basename" = "x$tool_specified"; then
7821          # A command without a complete path is provided, search $PATH.
7822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7823$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7824          # Extract the first word of "$tool_basename", so it can be a program name with args.
7825set dummy $tool_basename; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_EXPR+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $EXPR in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854EXPR=$ac_cv_path_EXPR
7855if test -n "$EXPR"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7857$as_echo "$EXPR" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864          if test "x$EXPR" = x; then
7865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7866          fi
7867        else
7868          # Otherwise we believe it is a complete path. Use it as it is.
7869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7870$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7872$as_echo_n "checking for EXPR... " >&6; }
7873          if test ! -x "$tool_specified"; then
7874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7875$as_echo "not found" >&6; }
7876            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7877          fi
7878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7879$as_echo "$tool_specified" >&6; }
7880        fi
7881      fi
7882    fi
7883
7884  fi
7885
7886
7887
7888  if test "x$EXPR" = x; then
7889    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7890  fi
7891
7892
7893
7894
7895
7896  # Publish this variable in the help.
7897
7898
7899  if [ -z "${FILE+x}" ]; then
7900    # The variable is not set by user, try to locate tool using the code snippet
7901    for ac_prog in file
7902do
7903  # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_path_FILE+:} false; then :
7908  $as_echo_n "(cached) " >&6
7909else
7910  case $FILE in
7911  [\\/]* | ?:[\\/]*)
7912  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7913  ;;
7914  *)
7915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916for as_dir in $PATH
7917do
7918  IFS=$as_save_IFS
7919  test -z "$as_dir" && as_dir=.
7920    for ac_exec_ext in '' $ac_executable_extensions; do
7921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924    break 2
7925  fi
7926done
7927  done
7928IFS=$as_save_IFS
7929
7930  ;;
7931esac
7932fi
7933FILE=$ac_cv_path_FILE
7934if test -n "$FILE"; then
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7936$as_echo "$FILE" >&6; }
7937else
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939$as_echo "no" >&6; }
7940fi
7941
7942
7943  test -n "$FILE" && break
7944done
7945
7946  else
7947    # The variable is set, but is it from the command line or the environment?
7948
7949    # Try to remove the string !FILE! from our list.
7950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952      # If it failed, the variable was not from the command line. Ignore it,
7953      # but warn the user (except for BASH, which is always set by the calling BASH).
7954      if test "xFILE" != xBASH; then
7955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7956$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7957      fi
7958      # Try to locate tool using the code snippet
7959      for ac_prog in file
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_FILE+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $FILE in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991FILE=$ac_cv_path_FILE
7992if test -n "$FILE"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7994$as_echo "$FILE" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$FILE" && break
8002done
8003
8004    else
8005      # If it succeeded, then it was overridden by the user. We will use it
8006      # for the tool.
8007
8008      # First remove it from the list of overridden variables, so we can test
8009      # for unknown variables in the end.
8010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011
8012      # Check if we try to supply an empty value
8013      if test "x$FILE" = x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8015$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8017$as_echo_n "checking for FILE... " >&6; }
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8019$as_echo "disabled" >&6; }
8020      else
8021        # Check if the provided tool contains a complete path.
8022        tool_specified="$FILE"
8023        tool_basename="${tool_specified##*/}"
8024        if test "x$tool_basename" = "x$tool_specified"; then
8025          # A command without a complete path is provided, search $PATH.
8026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8027$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8028          # Extract the first word of "$tool_basename", so it can be a program name with args.
8029set dummy $tool_basename; ac_word=$2
8030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
8032if ${ac_cv_path_FILE+:} false; then :
8033  $as_echo_n "(cached) " >&6
8034else
8035  case $FILE in
8036  [\\/]* | ?:[\\/]*)
8037  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8038  ;;
8039  *)
8040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043  IFS=$as_save_IFS
8044  test -z "$as_dir" && as_dir=.
8045    for ac_exec_ext in '' $ac_executable_extensions; do
8046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8047    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8049    break 2
8050  fi
8051done
8052  done
8053IFS=$as_save_IFS
8054
8055  ;;
8056esac
8057fi
8058FILE=$ac_cv_path_FILE
8059if test -n "$FILE"; then
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8061$as_echo "$FILE" >&6; }
8062else
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
8065fi
8066
8067
8068          if test "x$FILE" = x; then
8069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8070          fi
8071        else
8072          # Otherwise we believe it is a complete path. Use it as it is.
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8074$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8076$as_echo_n "checking for FILE... " >&6; }
8077          if test ! -x "$tool_specified"; then
8078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8079$as_echo "not found" >&6; }
8080            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8081          fi
8082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8083$as_echo "$tool_specified" >&6; }
8084        fi
8085      fi
8086    fi
8087
8088  fi
8089
8090
8091
8092  if test "x$FILE" = x; then
8093    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8094  fi
8095
8096
8097
8098
8099
8100  # Publish this variable in the help.
8101
8102
8103  if [ -z "${FIND+x}" ]; then
8104    # The variable is not set by user, try to locate tool using the code snippet
8105    for ac_prog in find
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_FIND+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $FIND in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137FIND=$ac_cv_path_FIND
8138if test -n "$FIND"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8140$as_echo "$FIND" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$FIND" && break
8148done
8149
8150  else
8151    # The variable is set, but is it from the command line or the environment?
8152
8153    # Try to remove the string !FIND! from our list.
8154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8156      # If it failed, the variable was not from the command line. Ignore it,
8157      # but warn the user (except for BASH, which is always set by the calling BASH).
8158      if test "xFIND" != xBASH; then
8159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8160$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8161      fi
8162      # Try to locate tool using the code snippet
8163      for ac_prog in find
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_FIND+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $FIND in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195FIND=$ac_cv_path_FIND
8196if test -n "$FIND"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8198$as_echo "$FIND" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$FIND" && break
8206done
8207
8208    else
8209      # If it succeeded, then it was overridden by the user. We will use it
8210      # for the tool.
8211
8212      # First remove it from the list of overridden variables, so we can test
8213      # for unknown variables in the end.
8214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8215
8216      # Check if we try to supply an empty value
8217      if test "x$FIND" = x; then
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8219$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8221$as_echo_n "checking for FIND... " >&6; }
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8223$as_echo "disabled" >&6; }
8224      else
8225        # Check if the provided tool contains a complete path.
8226        tool_specified="$FIND"
8227        tool_basename="${tool_specified##*/}"
8228        if test "x$tool_basename" = "x$tool_specified"; then
8229          # A command without a complete path is provided, search $PATH.
8230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8231$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8232          # Extract the first word of "$tool_basename", so it can be a program name with args.
8233set dummy $tool_basename; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_FIND+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $FIND in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262FIND=$ac_cv_path_FIND
8263if test -n "$FIND"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8265$as_echo "$FIND" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272          if test "x$FIND" = x; then
8273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8274          fi
8275        else
8276          # Otherwise we believe it is a complete path. Use it as it is.
8277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8278$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8280$as_echo_n "checking for FIND... " >&6; }
8281          if test ! -x "$tool_specified"; then
8282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8283$as_echo "not found" >&6; }
8284            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8285          fi
8286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8287$as_echo "$tool_specified" >&6; }
8288        fi
8289      fi
8290    fi
8291
8292  fi
8293
8294
8295
8296  if test "x$FIND" = x; then
8297    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8298  fi
8299
8300
8301
8302
8303
8304  # Publish this variable in the help.
8305
8306
8307  if [ -z "${HEAD+x}" ]; then
8308    # The variable is not set by user, try to locate tool using the code snippet
8309    for ac_prog in head
8310do
8311  # Extract the first word of "$ac_prog", so it can be a program name with args.
8312set dummy $ac_prog; ac_word=$2
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8314$as_echo_n "checking for $ac_word... " >&6; }
8315if ${ac_cv_path_HEAD+:} false; then :
8316  $as_echo_n "(cached) " >&6
8317else
8318  case $HEAD in
8319  [\\/]* | ?:[\\/]*)
8320  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8321  ;;
8322  *)
8323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8324for as_dir in $PATH
8325do
8326  IFS=$as_save_IFS
8327  test -z "$as_dir" && as_dir=.
8328    for ac_exec_ext in '' $ac_executable_extensions; do
8329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8330    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8332    break 2
8333  fi
8334done
8335  done
8336IFS=$as_save_IFS
8337
8338  ;;
8339esac
8340fi
8341HEAD=$ac_cv_path_HEAD
8342if test -n "$HEAD"; then
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8344$as_echo "$HEAD" >&6; }
8345else
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347$as_echo "no" >&6; }
8348fi
8349
8350
8351  test -n "$HEAD" && break
8352done
8353
8354  else
8355    # The variable is set, but is it from the command line or the environment?
8356
8357    # Try to remove the string !HEAD! from our list.
8358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8360      # If it failed, the variable was not from the command line. Ignore it,
8361      # but warn the user (except for BASH, which is always set by the calling BASH).
8362      if test "xHEAD" != xBASH; then
8363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8364$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8365      fi
8366      # Try to locate tool using the code snippet
8367      for ac_prog in head
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_HEAD+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $HEAD in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399HEAD=$ac_cv_path_HEAD
8400if test -n "$HEAD"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8402$as_echo "$HEAD" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$HEAD" && break
8410done
8411
8412    else
8413      # If it succeeded, then it was overridden by the user. We will use it
8414      # for the tool.
8415
8416      # First remove it from the list of overridden variables, so we can test
8417      # for unknown variables in the end.
8418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8419
8420      # Check if we try to supply an empty value
8421      if test "x$HEAD" = x; then
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8423$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8425$as_echo_n "checking for HEAD... " >&6; }
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8427$as_echo "disabled" >&6; }
8428      else
8429        # Check if the provided tool contains a complete path.
8430        tool_specified="$HEAD"
8431        tool_basename="${tool_specified##*/}"
8432        if test "x$tool_basename" = "x$tool_specified"; then
8433          # A command without a complete path is provided, search $PATH.
8434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8435$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8436          # Extract the first word of "$tool_basename", so it can be a program name with args.
8437set dummy $tool_basename; ac_word=$2
8438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8439$as_echo_n "checking for $ac_word... " >&6; }
8440if ${ac_cv_path_HEAD+:} false; then :
8441  $as_echo_n "(cached) " >&6
8442else
8443  case $HEAD in
8444  [\\/]* | ?:[\\/]*)
8445  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8446  ;;
8447  *)
8448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8449for as_dir in $PATH
8450do
8451  IFS=$as_save_IFS
8452  test -z "$as_dir" && as_dir=.
8453    for ac_exec_ext in '' $ac_executable_extensions; do
8454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8455    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8457    break 2
8458  fi
8459done
8460  done
8461IFS=$as_save_IFS
8462
8463  ;;
8464esac
8465fi
8466HEAD=$ac_cv_path_HEAD
8467if test -n "$HEAD"; then
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8469$as_echo "$HEAD" >&6; }
8470else
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
8473fi
8474
8475
8476          if test "x$HEAD" = x; then
8477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8478          fi
8479        else
8480          # Otherwise we believe it is a complete path. Use it as it is.
8481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8482$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8484$as_echo_n "checking for HEAD... " >&6; }
8485          if test ! -x "$tool_specified"; then
8486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8487$as_echo "not found" >&6; }
8488            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8489          fi
8490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8491$as_echo "$tool_specified" >&6; }
8492        fi
8493      fi
8494    fi
8495
8496  fi
8497
8498
8499
8500  if test "x$HEAD" = x; then
8501    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8502  fi
8503
8504
8505
8506
8507
8508  # Publish this variable in the help.
8509
8510
8511  if [ -z "${GUNZIP+x}" ]; then
8512    # The variable is not set by user, try to locate tool using the code snippet
8513    for ac_prog in gunzip
8514do
8515  # Extract the first word of "$ac_prog", so it can be a program name with args.
8516set dummy $ac_prog; ac_word=$2
8517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8518$as_echo_n "checking for $ac_word... " >&6; }
8519if ${ac_cv_path_GUNZIP+:} false; then :
8520  $as_echo_n "(cached) " >&6
8521else
8522  case $GUNZIP in
8523  [\\/]* | ?:[\\/]*)
8524  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8525  ;;
8526  *)
8527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8528for as_dir in $PATH
8529do
8530  IFS=$as_save_IFS
8531  test -z "$as_dir" && as_dir=.
8532    for ac_exec_ext in '' $ac_executable_extensions; do
8533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8534    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8536    break 2
8537  fi
8538done
8539  done
8540IFS=$as_save_IFS
8541
8542  ;;
8543esac
8544fi
8545GUNZIP=$ac_cv_path_GUNZIP
8546if test -n "$GUNZIP"; then
8547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8548$as_echo "$GUNZIP" >&6; }
8549else
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551$as_echo "no" >&6; }
8552fi
8553
8554
8555  test -n "$GUNZIP" && break
8556done
8557
8558  else
8559    # The variable is set, but is it from the command line or the environment?
8560
8561    # Try to remove the string !GUNZIP! from our list.
8562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8564      # If it failed, the variable was not from the command line. Ignore it,
8565      # but warn the user (except for BASH, which is always set by the calling BASH).
8566      if test "xGUNZIP" != xBASH; then
8567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8568$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8569      fi
8570      # Try to locate tool using the code snippet
8571      for ac_prog in gunzip
8572do
8573  # Extract the first word of "$ac_prog", so it can be a program name with args.
8574set dummy $ac_prog; ac_word=$2
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8576$as_echo_n "checking for $ac_word... " >&6; }
8577if ${ac_cv_path_GUNZIP+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  case $GUNZIP in
8581  [\\/]* | ?:[\\/]*)
8582  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8583  ;;
8584  *)
8585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8586for as_dir in $PATH
8587do
8588  IFS=$as_save_IFS
8589  test -z "$as_dir" && as_dir=.
8590    for ac_exec_ext in '' $ac_executable_extensions; do
8591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8592    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8594    break 2
8595  fi
8596done
8597  done
8598IFS=$as_save_IFS
8599
8600  ;;
8601esac
8602fi
8603GUNZIP=$ac_cv_path_GUNZIP
8604if test -n "$GUNZIP"; then
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8606$as_echo "$GUNZIP" >&6; }
8607else
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609$as_echo "no" >&6; }
8610fi
8611
8612
8613  test -n "$GUNZIP" && break
8614done
8615
8616    else
8617      # If it succeeded, then it was overridden by the user. We will use it
8618      # for the tool.
8619
8620      # First remove it from the list of overridden variables, so we can test
8621      # for unknown variables in the end.
8622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8623
8624      # Check if we try to supply an empty value
8625      if test "x$GUNZIP" = x; then
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8627$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8629$as_echo_n "checking for GUNZIP... " >&6; }
8630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8631$as_echo "disabled" >&6; }
8632      else
8633        # Check if the provided tool contains a complete path.
8634        tool_specified="$GUNZIP"
8635        tool_basename="${tool_specified##*/}"
8636        if test "x$tool_basename" = "x$tool_specified"; then
8637          # A command without a complete path is provided, search $PATH.
8638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8639$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8640          # Extract the first word of "$tool_basename", so it can be a program name with args.
8641set dummy $tool_basename; ac_word=$2
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8643$as_echo_n "checking for $ac_word... " >&6; }
8644if ${ac_cv_path_GUNZIP+:} false; then :
8645  $as_echo_n "(cached) " >&6
8646else
8647  case $GUNZIP in
8648  [\\/]* | ?:[\\/]*)
8649  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8650  ;;
8651  *)
8652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8653for as_dir in $PATH
8654do
8655  IFS=$as_save_IFS
8656  test -z "$as_dir" && as_dir=.
8657    for ac_exec_ext in '' $ac_executable_extensions; do
8658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8659    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8661    break 2
8662  fi
8663done
8664  done
8665IFS=$as_save_IFS
8666
8667  ;;
8668esac
8669fi
8670GUNZIP=$ac_cv_path_GUNZIP
8671if test -n "$GUNZIP"; then
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8673$as_echo "$GUNZIP" >&6; }
8674else
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676$as_echo "no" >&6; }
8677fi
8678
8679
8680          if test "x$GUNZIP" = x; then
8681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8682          fi
8683        else
8684          # Otherwise we believe it is a complete path. Use it as it is.
8685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8686$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8688$as_echo_n "checking for GUNZIP... " >&6; }
8689          if test ! -x "$tool_specified"; then
8690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8691$as_echo "not found" >&6; }
8692            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8693          fi
8694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8695$as_echo "$tool_specified" >&6; }
8696        fi
8697      fi
8698    fi
8699
8700  fi
8701
8702
8703
8704  if test "x$GUNZIP" = x; then
8705    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8706  fi
8707
8708
8709
8710
8711
8712  # Publish this variable in the help.
8713
8714
8715  if [ -z "${GZIP+x}" ]; then
8716    # The variable is not set by user, try to locate tool using the code snippet
8717    for ac_prog in pigz gzip
8718do
8719  # Extract the first word of "$ac_prog", so it can be a program name with args.
8720set dummy $ac_prog; ac_word=$2
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8722$as_echo_n "checking for $ac_word... " >&6; }
8723if ${ac_cv_path_GZIP+:} false; then :
8724  $as_echo_n "(cached) " >&6
8725else
8726  case $GZIP in
8727  [\\/]* | ?:[\\/]*)
8728  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8729  ;;
8730  *)
8731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734  IFS=$as_save_IFS
8735  test -z "$as_dir" && as_dir=.
8736    for ac_exec_ext in '' $ac_executable_extensions; do
8737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740    break 2
8741  fi
8742done
8743  done
8744IFS=$as_save_IFS
8745
8746  ;;
8747esac
8748fi
8749GZIP=$ac_cv_path_GZIP
8750if test -n "$GZIP"; then
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8752$as_echo "$GZIP" >&6; }
8753else
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8755$as_echo "no" >&6; }
8756fi
8757
8758
8759  test -n "$GZIP" && break
8760done
8761
8762  else
8763    # The variable is set, but is it from the command line or the environment?
8764
8765    # Try to remove the string !GZIP! from our list.
8766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8768      # If it failed, the variable was not from the command line. Ignore it,
8769      # but warn the user (except for BASH, which is always set by the calling BASH).
8770      if test "xGZIP" != xBASH; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8772$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8773      fi
8774      # Try to locate tool using the code snippet
8775      for ac_prog in pigz gzip
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_GZIP+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $GZIP in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807GZIP=$ac_cv_path_GZIP
8808if test -n "$GZIP"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8810$as_echo "$GZIP" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$GZIP" && break
8818done
8819
8820    else
8821      # If it succeeded, then it was overridden by the user. We will use it
8822      # for the tool.
8823
8824      # First remove it from the list of overridden variables, so we can test
8825      # for unknown variables in the end.
8826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8827
8828      # Check if we try to supply an empty value
8829      if test "x$GZIP" = x; then
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8831$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8833$as_echo_n "checking for GZIP... " >&6; }
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8835$as_echo "disabled" >&6; }
8836      else
8837        # Check if the provided tool contains a complete path.
8838        tool_specified="$GZIP"
8839        tool_basename="${tool_specified##*/}"
8840        if test "x$tool_basename" = "x$tool_specified"; then
8841          # A command without a complete path is provided, search $PATH.
8842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8843$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8844          # Extract the first word of "$tool_basename", so it can be a program name with args.
8845set dummy $tool_basename; ac_word=$2
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8847$as_echo_n "checking for $ac_word... " >&6; }
8848if ${ac_cv_path_GZIP+:} false; then :
8849  $as_echo_n "(cached) " >&6
8850else
8851  case $GZIP in
8852  [\\/]* | ?:[\\/]*)
8853  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8854  ;;
8855  *)
8856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8857for as_dir in $PATH
8858do
8859  IFS=$as_save_IFS
8860  test -z "$as_dir" && as_dir=.
8861    for ac_exec_ext in '' $ac_executable_extensions; do
8862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8863    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8865    break 2
8866  fi
8867done
8868  done
8869IFS=$as_save_IFS
8870
8871  ;;
8872esac
8873fi
8874GZIP=$ac_cv_path_GZIP
8875if test -n "$GZIP"; then
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8877$as_echo "$GZIP" >&6; }
8878else
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
8881fi
8882
8883
8884          if test "x$GZIP" = x; then
8885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8886          fi
8887        else
8888          # Otherwise we believe it is a complete path. Use it as it is.
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8890$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8892$as_echo_n "checking for GZIP... " >&6; }
8893          if test ! -x "$tool_specified"; then
8894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8895$as_echo "not found" >&6; }
8896            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8897          fi
8898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8899$as_echo "$tool_specified" >&6; }
8900        fi
8901      fi
8902    fi
8903
8904  fi
8905
8906
8907
8908  if test "x$GZIP" = x; then
8909    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8910  fi
8911
8912
8913
8914
8915
8916  # Publish this variable in the help.
8917
8918
8919  if [ -z "${LN+x}" ]; then
8920    # The variable is not set by user, try to locate tool using the code snippet
8921    for ac_prog in ln
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_LN+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $LN in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953LN=$ac_cv_path_LN
8954if test -n "$LN"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8956$as_echo "$LN" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$LN" && break
8964done
8965
8966  else
8967    # The variable is set, but is it from the command line or the environment?
8968
8969    # Try to remove the string !LN! from our list.
8970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8972      # If it failed, the variable was not from the command line. Ignore it,
8973      # but warn the user (except for BASH, which is always set by the calling BASH).
8974      if test "xLN" != xBASH; then
8975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8976$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8977      fi
8978      # Try to locate tool using the code snippet
8979      for ac_prog in ln
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_LN+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $LN in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011LN=$ac_cv_path_LN
9012if test -n "$LN"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9014$as_echo "$LN" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$LN" && break
9022done
9023
9024    else
9025      # If it succeeded, then it was overridden by the user. We will use it
9026      # for the tool.
9027
9028      # First remove it from the list of overridden variables, so we can test
9029      # for unknown variables in the end.
9030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9031
9032      # Check if we try to supply an empty value
9033      if test "x$LN" = x; then
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9035$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9037$as_echo_n "checking for LN... " >&6; }
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9039$as_echo "disabled" >&6; }
9040      else
9041        # Check if the provided tool contains a complete path.
9042        tool_specified="$LN"
9043        tool_basename="${tool_specified##*/}"
9044        if test "x$tool_basename" = "x$tool_specified"; then
9045          # A command without a complete path is provided, search $PATH.
9046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9047$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9048          # Extract the first word of "$tool_basename", so it can be a program name with args.
9049set dummy $tool_basename; ac_word=$2
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9051$as_echo_n "checking for $ac_word... " >&6; }
9052if ${ac_cv_path_LN+:} false; then :
9053  $as_echo_n "(cached) " >&6
9054else
9055  case $LN in
9056  [\\/]* | ?:[\\/]*)
9057  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9058  ;;
9059  *)
9060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9061for as_dir in $PATH
9062do
9063  IFS=$as_save_IFS
9064  test -z "$as_dir" && as_dir=.
9065    for ac_exec_ext in '' $ac_executable_extensions; do
9066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9067    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9069    break 2
9070  fi
9071done
9072  done
9073IFS=$as_save_IFS
9074
9075  ;;
9076esac
9077fi
9078LN=$ac_cv_path_LN
9079if test -n "$LN"; then
9080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9081$as_echo "$LN" >&6; }
9082else
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
9085fi
9086
9087
9088          if test "x$LN" = x; then
9089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9090          fi
9091        else
9092          # Otherwise we believe it is a complete path. Use it as it is.
9093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9094$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9096$as_echo_n "checking for LN... " >&6; }
9097          if test ! -x "$tool_specified"; then
9098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9099$as_echo "not found" >&6; }
9100            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9101          fi
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9103$as_echo "$tool_specified" >&6; }
9104        fi
9105      fi
9106    fi
9107
9108  fi
9109
9110
9111
9112  if test "x$LN" = x; then
9113    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9114  fi
9115
9116
9117
9118
9119
9120  # Publish this variable in the help.
9121
9122
9123  if [ -z "${LS+x}" ]; then
9124    # The variable is not set by user, try to locate tool using the code snippet
9125    for ac_prog in ls
9126do
9127  # Extract the first word of "$ac_prog", so it can be a program name with args.
9128set dummy $ac_prog; ac_word=$2
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
9131if ${ac_cv_path_LS+:} false; then :
9132  $as_echo_n "(cached) " >&6
9133else
9134  case $LS in
9135  [\\/]* | ?:[\\/]*)
9136  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9137  ;;
9138  *)
9139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142  IFS=$as_save_IFS
9143  test -z "$as_dir" && as_dir=.
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9146    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154  ;;
9155esac
9156fi
9157LS=$ac_cv_path_LS
9158if test -n "$LS"; then
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9160$as_echo "$LS" >&6; }
9161else
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
9165
9166
9167  test -n "$LS" && break
9168done
9169
9170  else
9171    # The variable is set, but is it from the command line or the environment?
9172
9173    # Try to remove the string !LS! from our list.
9174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9176      # If it failed, the variable was not from the command line. Ignore it,
9177      # but warn the user (except for BASH, which is always set by the calling BASH).
9178      if test "xLS" != xBASH; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9180$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9181      fi
9182      # Try to locate tool using the code snippet
9183      for ac_prog in ls
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_LS+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $LS in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215LS=$ac_cv_path_LS
9216if test -n "$LS"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9218$as_echo "$LS" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$LS" && break
9226done
9227
9228    else
9229      # If it succeeded, then it was overridden by the user. We will use it
9230      # for the tool.
9231
9232      # First remove it from the list of overridden variables, so we can test
9233      # for unknown variables in the end.
9234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9235
9236      # Check if we try to supply an empty value
9237      if test "x$LS" = x; then
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9239$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9241$as_echo_n "checking for LS... " >&6; }
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9243$as_echo "disabled" >&6; }
9244      else
9245        # Check if the provided tool contains a complete path.
9246        tool_specified="$LS"
9247        tool_basename="${tool_specified##*/}"
9248        if test "x$tool_basename" = "x$tool_specified"; then
9249          # A command without a complete path is provided, search $PATH.
9250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9251$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9252          # Extract the first word of "$tool_basename", so it can be a program name with args.
9253set dummy $tool_basename; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_LS+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $LS in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282LS=$ac_cv_path_LS
9283if test -n "$LS"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9285$as_echo "$LS" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292          if test "x$LS" = x; then
9293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9294          fi
9295        else
9296          # Otherwise we believe it is a complete path. Use it as it is.
9297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9298$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9300$as_echo_n "checking for LS... " >&6; }
9301          if test ! -x "$tool_specified"; then
9302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9303$as_echo "not found" >&6; }
9304            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9305          fi
9306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9307$as_echo "$tool_specified" >&6; }
9308        fi
9309      fi
9310    fi
9311
9312  fi
9313
9314
9315
9316  if test "x$LS" = x; then
9317    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9318  fi
9319
9320
9321
9322
9323
9324  # Publish this variable in the help.
9325
9326
9327  if [ -z "${MKDIR+x}" ]; then
9328    # The variable is not set by user, try to locate tool using the code snippet
9329    for ac_prog in mkdir
9330do
9331  # Extract the first word of "$ac_prog", so it can be a program name with args.
9332set dummy $ac_prog; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_MKDIR+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $MKDIR in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361MKDIR=$ac_cv_path_MKDIR
9362if test -n "$MKDIR"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9364$as_echo "$MKDIR" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371  test -n "$MKDIR" && break
9372done
9373
9374  else
9375    # The variable is set, but is it from the command line or the environment?
9376
9377    # Try to remove the string !MKDIR! from our list.
9378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9380      # If it failed, the variable was not from the command line. Ignore it,
9381      # but warn the user (except for BASH, which is always set by the calling BASH).
9382      if test "xMKDIR" != xBASH; then
9383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9384$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9385      fi
9386      # Try to locate tool using the code snippet
9387      for ac_prog in mkdir
9388do
9389  # Extract the first word of "$ac_prog", so it can be a program name with args.
9390set dummy $ac_prog; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_MKDIR+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $MKDIR in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419MKDIR=$ac_cv_path_MKDIR
9420if test -n "$MKDIR"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9422$as_echo "$MKDIR" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429  test -n "$MKDIR" && break
9430done
9431
9432    else
9433      # If it succeeded, then it was overridden by the user. We will use it
9434      # for the tool.
9435
9436      # First remove it from the list of overridden variables, so we can test
9437      # for unknown variables in the end.
9438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9439
9440      # Check if we try to supply an empty value
9441      if test "x$MKDIR" = x; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9443$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9445$as_echo_n "checking for MKDIR... " >&6; }
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9447$as_echo "disabled" >&6; }
9448      else
9449        # Check if the provided tool contains a complete path.
9450        tool_specified="$MKDIR"
9451        tool_basename="${tool_specified##*/}"
9452        if test "x$tool_basename" = "x$tool_specified"; then
9453          # A command without a complete path is provided, search $PATH.
9454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9455$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9456          # Extract the first word of "$tool_basename", so it can be a program name with args.
9457set dummy $tool_basename; ac_word=$2
9458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9459$as_echo_n "checking for $ac_word... " >&6; }
9460if ${ac_cv_path_MKDIR+:} false; then :
9461  $as_echo_n "(cached) " >&6
9462else
9463  case $MKDIR in
9464  [\\/]* | ?:[\\/]*)
9465  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9466  ;;
9467  *)
9468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9469for as_dir in $PATH
9470do
9471  IFS=$as_save_IFS
9472  test -z "$as_dir" && as_dir=.
9473    for ac_exec_ext in '' $ac_executable_extensions; do
9474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9475    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9477    break 2
9478  fi
9479done
9480  done
9481IFS=$as_save_IFS
9482
9483  ;;
9484esac
9485fi
9486MKDIR=$ac_cv_path_MKDIR
9487if test -n "$MKDIR"; then
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9489$as_echo "$MKDIR" >&6; }
9490else
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9492$as_echo "no" >&6; }
9493fi
9494
9495
9496          if test "x$MKDIR" = x; then
9497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9498          fi
9499        else
9500          # Otherwise we believe it is a complete path. Use it as it is.
9501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9502$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9504$as_echo_n "checking for MKDIR... " >&6; }
9505          if test ! -x "$tool_specified"; then
9506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9507$as_echo "not found" >&6; }
9508            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9509          fi
9510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9511$as_echo "$tool_specified" >&6; }
9512        fi
9513      fi
9514    fi
9515
9516  fi
9517
9518
9519
9520  if test "x$MKDIR" = x; then
9521    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9522  fi
9523
9524
9525
9526
9527
9528  # Publish this variable in the help.
9529
9530
9531  if [ -z "${MKTEMP+x}" ]; then
9532    # The variable is not set by user, try to locate tool using the code snippet
9533    for ac_prog in mktemp
9534do
9535  # Extract the first word of "$ac_prog", so it can be a program name with args.
9536set dummy $ac_prog; ac_word=$2
9537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9538$as_echo_n "checking for $ac_word... " >&6; }
9539if ${ac_cv_path_MKTEMP+:} false; then :
9540  $as_echo_n "(cached) " >&6
9541else
9542  case $MKTEMP in
9543  [\\/]* | ?:[\\/]*)
9544  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9545  ;;
9546  *)
9547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9548for as_dir in $PATH
9549do
9550  IFS=$as_save_IFS
9551  test -z "$as_dir" && as_dir=.
9552    for ac_exec_ext in '' $ac_executable_extensions; do
9553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9554    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9556    break 2
9557  fi
9558done
9559  done
9560IFS=$as_save_IFS
9561
9562  ;;
9563esac
9564fi
9565MKTEMP=$ac_cv_path_MKTEMP
9566if test -n "$MKTEMP"; then
9567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9568$as_echo "$MKTEMP" >&6; }
9569else
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
9572fi
9573
9574
9575  test -n "$MKTEMP" && break
9576done
9577
9578  else
9579    # The variable is set, but is it from the command line or the environment?
9580
9581    # Try to remove the string !MKTEMP! from our list.
9582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9584      # If it failed, the variable was not from the command line. Ignore it,
9585      # but warn the user (except for BASH, which is always set by the calling BASH).
9586      if test "xMKTEMP" != xBASH; then
9587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9588$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9589      fi
9590      # Try to locate tool using the code snippet
9591      for ac_prog in mktemp
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_MKTEMP+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $MKTEMP in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623MKTEMP=$ac_cv_path_MKTEMP
9624if test -n "$MKTEMP"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9626$as_echo "$MKTEMP" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$MKTEMP" && break
9634done
9635
9636    else
9637      # If it succeeded, then it was overridden by the user. We will use it
9638      # for the tool.
9639
9640      # First remove it from the list of overridden variables, so we can test
9641      # for unknown variables in the end.
9642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9643
9644      # Check if we try to supply an empty value
9645      if test "x$MKTEMP" = x; then
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9647$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9649$as_echo_n "checking for MKTEMP... " >&6; }
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9651$as_echo "disabled" >&6; }
9652      else
9653        # Check if the provided tool contains a complete path.
9654        tool_specified="$MKTEMP"
9655        tool_basename="${tool_specified##*/}"
9656        if test "x$tool_basename" = "x$tool_specified"; then
9657          # A command without a complete path is provided, search $PATH.
9658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9659$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9660          # Extract the first word of "$tool_basename", so it can be a program name with args.
9661set dummy $tool_basename; ac_word=$2
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9663$as_echo_n "checking for $ac_word... " >&6; }
9664if ${ac_cv_path_MKTEMP+:} false; then :
9665  $as_echo_n "(cached) " >&6
9666else
9667  case $MKTEMP in
9668  [\\/]* | ?:[\\/]*)
9669  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9670  ;;
9671  *)
9672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9673for as_dir in $PATH
9674do
9675  IFS=$as_save_IFS
9676  test -z "$as_dir" && as_dir=.
9677    for ac_exec_ext in '' $ac_executable_extensions; do
9678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9679    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9681    break 2
9682  fi
9683done
9684  done
9685IFS=$as_save_IFS
9686
9687  ;;
9688esac
9689fi
9690MKTEMP=$ac_cv_path_MKTEMP
9691if test -n "$MKTEMP"; then
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9693$as_echo "$MKTEMP" >&6; }
9694else
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
9697fi
9698
9699
9700          if test "x$MKTEMP" = x; then
9701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9702          fi
9703        else
9704          # Otherwise we believe it is a complete path. Use it as it is.
9705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9706$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9708$as_echo_n "checking for MKTEMP... " >&6; }
9709          if test ! -x "$tool_specified"; then
9710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9711$as_echo "not found" >&6; }
9712            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9713          fi
9714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9715$as_echo "$tool_specified" >&6; }
9716        fi
9717      fi
9718    fi
9719
9720  fi
9721
9722
9723
9724  if test "x$MKTEMP" = x; then
9725    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9726  fi
9727
9728
9729
9730
9731
9732  # Publish this variable in the help.
9733
9734
9735  if [ -z "${MV+x}" ]; then
9736    # The variable is not set by user, try to locate tool using the code snippet
9737    for ac_prog in mv
9738do
9739  # Extract the first word of "$ac_prog", so it can be a program name with args.
9740set dummy $ac_prog; ac_word=$2
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9742$as_echo_n "checking for $ac_word... " >&6; }
9743if ${ac_cv_path_MV+:} false; then :
9744  $as_echo_n "(cached) " >&6
9745else
9746  case $MV in
9747  [\\/]* | ?:[\\/]*)
9748  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9749  ;;
9750  *)
9751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754  IFS=$as_save_IFS
9755  test -z "$as_dir" && as_dir=.
9756    for ac_exec_ext in '' $ac_executable_extensions; do
9757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9758    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760    break 2
9761  fi
9762done
9763  done
9764IFS=$as_save_IFS
9765
9766  ;;
9767esac
9768fi
9769MV=$ac_cv_path_MV
9770if test -n "$MV"; then
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9772$as_echo "$MV" >&6; }
9773else
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775$as_echo "no" >&6; }
9776fi
9777
9778
9779  test -n "$MV" && break
9780done
9781
9782  else
9783    # The variable is set, but is it from the command line or the environment?
9784
9785    # Try to remove the string !MV! from our list.
9786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9788      # If it failed, the variable was not from the command line. Ignore it,
9789      # but warn the user (except for BASH, which is always set by the calling BASH).
9790      if test "xMV" != xBASH; then
9791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9792$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9793      fi
9794      # Try to locate tool using the code snippet
9795      for ac_prog in mv
9796do
9797  # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if ${ac_cv_path_MV+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804  case $MV in
9805  [\\/]* | ?:[\\/]*)
9806  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9807  ;;
9808  *)
9809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812  IFS=$as_save_IFS
9813  test -z "$as_dir" && as_dir=.
9814    for ac_exec_ext in '' $ac_executable_extensions; do
9815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818    break 2
9819  fi
9820done
9821  done
9822IFS=$as_save_IFS
9823
9824  ;;
9825esac
9826fi
9827MV=$ac_cv_path_MV
9828if test -n "$MV"; then
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9830$as_echo "$MV" >&6; }
9831else
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834fi
9835
9836
9837  test -n "$MV" && break
9838done
9839
9840    else
9841      # If it succeeded, then it was overridden by the user. We will use it
9842      # for the tool.
9843
9844      # First remove it from the list of overridden variables, so we can test
9845      # for unknown variables in the end.
9846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9847
9848      # Check if we try to supply an empty value
9849      if test "x$MV" = x; then
9850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9851$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9853$as_echo_n "checking for MV... " >&6; }
9854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9855$as_echo "disabled" >&6; }
9856      else
9857        # Check if the provided tool contains a complete path.
9858        tool_specified="$MV"
9859        tool_basename="${tool_specified##*/}"
9860        if test "x$tool_basename" = "x$tool_specified"; then
9861          # A command without a complete path is provided, search $PATH.
9862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9863$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9864          # Extract the first word of "$tool_basename", so it can be a program name with args.
9865set dummy $tool_basename; ac_word=$2
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867$as_echo_n "checking for $ac_word... " >&6; }
9868if ${ac_cv_path_MV+:} false; then :
9869  $as_echo_n "(cached) " >&6
9870else
9871  case $MV in
9872  [\\/]* | ?:[\\/]*)
9873  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9874  ;;
9875  *)
9876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9877for as_dir in $PATH
9878do
9879  IFS=$as_save_IFS
9880  test -z "$as_dir" && as_dir=.
9881    for ac_exec_ext in '' $ac_executable_extensions; do
9882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9883    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9885    break 2
9886  fi
9887done
9888  done
9889IFS=$as_save_IFS
9890
9891  ;;
9892esac
9893fi
9894MV=$ac_cv_path_MV
9895if test -n "$MV"; then
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9897$as_echo "$MV" >&6; }
9898else
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901fi
9902
9903
9904          if test "x$MV" = x; then
9905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9906          fi
9907        else
9908          # Otherwise we believe it is a complete path. Use it as it is.
9909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9910$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9912$as_echo_n "checking for MV... " >&6; }
9913          if test ! -x "$tool_specified"; then
9914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9915$as_echo "not found" >&6; }
9916            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9917          fi
9918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9919$as_echo "$tool_specified" >&6; }
9920        fi
9921      fi
9922    fi
9923
9924  fi
9925
9926
9927
9928  if test "x$MV" = x; then
9929    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9930  fi
9931
9932
9933
9934
9935
9936  # Publish this variable in the help.
9937
9938
9939  if [ -z "${NAWK+x}" ]; then
9940    # The variable is not set by user, try to locate tool using the code snippet
9941    for ac_prog in nawk gawk awk
9942do
9943  # Extract the first word of "$ac_prog", so it can be a program name with args.
9944set dummy $ac_prog; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_NAWK+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $NAWK in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9962    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973NAWK=$ac_cv_path_NAWK
9974if test -n "$NAWK"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9976$as_echo "$NAWK" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983  test -n "$NAWK" && break
9984done
9985
9986  else
9987    # The variable is set, but is it from the command line or the environment?
9988
9989    # Try to remove the string !NAWK! from our list.
9990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9992      # If it failed, the variable was not from the command line. Ignore it,
9993      # but warn the user (except for BASH, which is always set by the calling BASH).
9994      if test "xNAWK" != xBASH; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9996$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9997      fi
9998      # Try to locate tool using the code snippet
9999      for ac_prog in nawk gawk awk
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_NAWK+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $NAWK in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10020    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031NAWK=$ac_cv_path_NAWK
10032if test -n "$NAWK"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10034$as_echo "$NAWK" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$NAWK" && break
10042done
10043
10044    else
10045      # If it succeeded, then it was overridden by the user. We will use it
10046      # for the tool.
10047
10048      # First remove it from the list of overridden variables, so we can test
10049      # for unknown variables in the end.
10050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10051
10052      # Check if we try to supply an empty value
10053      if test "x$NAWK" = x; then
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10055$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10057$as_echo_n "checking for NAWK... " >&6; }
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10059$as_echo "disabled" >&6; }
10060      else
10061        # Check if the provided tool contains a complete path.
10062        tool_specified="$NAWK"
10063        tool_basename="${tool_specified##*/}"
10064        if test "x$tool_basename" = "x$tool_specified"; then
10065          # A command without a complete path is provided, search $PATH.
10066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10067$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10068          # Extract the first word of "$tool_basename", so it can be a program name with args.
10069set dummy $tool_basename; ac_word=$2
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10071$as_echo_n "checking for $ac_word... " >&6; }
10072if ${ac_cv_path_NAWK+:} false; then :
10073  $as_echo_n "(cached) " >&6
10074else
10075  case $NAWK in
10076  [\\/]* | ?:[\\/]*)
10077  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10078  ;;
10079  *)
10080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10081for as_dir in $PATH
10082do
10083  IFS=$as_save_IFS
10084  test -z "$as_dir" && as_dir=.
10085    for ac_exec_ext in '' $ac_executable_extensions; do
10086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10087    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10089    break 2
10090  fi
10091done
10092  done
10093IFS=$as_save_IFS
10094
10095  ;;
10096esac
10097fi
10098NAWK=$ac_cv_path_NAWK
10099if test -n "$NAWK"; then
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10101$as_echo "$NAWK" >&6; }
10102else
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108          if test "x$NAWK" = x; then
10109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10110          fi
10111        else
10112          # Otherwise we believe it is a complete path. Use it as it is.
10113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10114$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10116$as_echo_n "checking for NAWK... " >&6; }
10117          if test ! -x "$tool_specified"; then
10118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10119$as_echo "not found" >&6; }
10120            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10121          fi
10122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10123$as_echo "$tool_specified" >&6; }
10124        fi
10125      fi
10126    fi
10127
10128  fi
10129
10130
10131
10132  if test "x$NAWK" = x; then
10133    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10134  fi
10135
10136
10137
10138
10139
10140  # Publish this variable in the help.
10141
10142
10143  if [ -z "${PRINTF+x}" ]; then
10144    # The variable is not set by user, try to locate tool using the code snippet
10145    for ac_prog in printf
10146do
10147  # Extract the first word of "$ac_prog", so it can be a program name with args.
10148set dummy $ac_prog; ac_word=$2
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10150$as_echo_n "checking for $ac_word... " >&6; }
10151if ${ac_cv_path_PRINTF+:} false; then :
10152  $as_echo_n "(cached) " >&6
10153else
10154  case $PRINTF in
10155  [\\/]* | ?:[\\/]*)
10156  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10157  ;;
10158  *)
10159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10160for as_dir in $PATH
10161do
10162  IFS=$as_save_IFS
10163  test -z "$as_dir" && as_dir=.
10164    for ac_exec_ext in '' $ac_executable_extensions; do
10165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10166    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10168    break 2
10169  fi
10170done
10171  done
10172IFS=$as_save_IFS
10173
10174  ;;
10175esac
10176fi
10177PRINTF=$ac_cv_path_PRINTF
10178if test -n "$PRINTF"; then
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10180$as_echo "$PRINTF" >&6; }
10181else
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187  test -n "$PRINTF" && break
10188done
10189
10190  else
10191    # The variable is set, but is it from the command line or the environment?
10192
10193    # Try to remove the string !PRINTF! from our list.
10194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10196      # If it failed, the variable was not from the command line. Ignore it,
10197      # but warn the user (except for BASH, which is always set by the calling BASH).
10198      if test "xPRINTF" != xBASH; then
10199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10200$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10201      fi
10202      # Try to locate tool using the code snippet
10203      for ac_prog in printf
10204do
10205  # Extract the first word of "$ac_prog", so it can be a program name with args.
10206set dummy $ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_PRINTF+:} false; then :
10210  $as_echo_n "(cached) " >&6
10211else
10212  case $PRINTF in
10213  [\\/]* | ?:[\\/]*)
10214  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10215  ;;
10216  *)
10217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220  IFS=$as_save_IFS
10221  test -z "$as_dir" && as_dir=.
10222    for ac_exec_ext in '' $ac_executable_extensions; do
10223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226    break 2
10227  fi
10228done
10229  done
10230IFS=$as_save_IFS
10231
10232  ;;
10233esac
10234fi
10235PRINTF=$ac_cv_path_PRINTF
10236if test -n "$PRINTF"; then
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10238$as_echo "$PRINTF" >&6; }
10239else
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245  test -n "$PRINTF" && break
10246done
10247
10248    else
10249      # If it succeeded, then it was overridden by the user. We will use it
10250      # for the tool.
10251
10252      # First remove it from the list of overridden variables, so we can test
10253      # for unknown variables in the end.
10254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10255
10256      # Check if we try to supply an empty value
10257      if test "x$PRINTF" = x; then
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10259$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10261$as_echo_n "checking for PRINTF... " >&6; }
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10263$as_echo "disabled" >&6; }
10264      else
10265        # Check if the provided tool contains a complete path.
10266        tool_specified="$PRINTF"
10267        tool_basename="${tool_specified##*/}"
10268        if test "x$tool_basename" = "x$tool_specified"; then
10269          # A command without a complete path is provided, search $PATH.
10270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10271$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10272          # Extract the first word of "$tool_basename", so it can be a program name with args.
10273set dummy $tool_basename; ac_word=$2
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275$as_echo_n "checking for $ac_word... " >&6; }
10276if ${ac_cv_path_PRINTF+:} false; then :
10277  $as_echo_n "(cached) " >&6
10278else
10279  case $PRINTF in
10280  [\\/]* | ?:[\\/]*)
10281  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10282  ;;
10283  *)
10284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285for as_dir in $PATH
10286do
10287  IFS=$as_save_IFS
10288  test -z "$as_dir" && as_dir=.
10289    for ac_exec_ext in '' $ac_executable_extensions; do
10290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10291    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293    break 2
10294  fi
10295done
10296  done
10297IFS=$as_save_IFS
10298
10299  ;;
10300esac
10301fi
10302PRINTF=$ac_cv_path_PRINTF
10303if test -n "$PRINTF"; then
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10305$as_echo "$PRINTF" >&6; }
10306else
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312          if test "x$PRINTF" = x; then
10313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10314          fi
10315        else
10316          # Otherwise we believe it is a complete path. Use it as it is.
10317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10318$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10320$as_echo_n "checking for PRINTF... " >&6; }
10321          if test ! -x "$tool_specified"; then
10322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10323$as_echo "not found" >&6; }
10324            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10325          fi
10326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10327$as_echo "$tool_specified" >&6; }
10328        fi
10329      fi
10330    fi
10331
10332  fi
10333
10334
10335
10336  if test "x$PRINTF" = x; then
10337    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10338  fi
10339
10340
10341
10342
10343
10344  # Publish this variable in the help.
10345
10346
10347  if [ -z "${RM+x}" ]; then
10348    # The variable is not set by user, try to locate tool using the code snippet
10349    for ac_prog in rm
10350do
10351  # Extract the first word of "$ac_prog", so it can be a program name with args.
10352set dummy $ac_prog; ac_word=$2
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10354$as_echo_n "checking for $ac_word... " >&6; }
10355if ${ac_cv_path_RM+:} false; then :
10356  $as_echo_n "(cached) " >&6
10357else
10358  case $RM in
10359  [\\/]* | ?:[\\/]*)
10360  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10361  ;;
10362  *)
10363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10364for as_dir in $PATH
10365do
10366  IFS=$as_save_IFS
10367  test -z "$as_dir" && as_dir=.
10368    for ac_exec_ext in '' $ac_executable_extensions; do
10369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10370    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10372    break 2
10373  fi
10374done
10375  done
10376IFS=$as_save_IFS
10377
10378  ;;
10379esac
10380fi
10381RM=$ac_cv_path_RM
10382if test -n "$RM"; then
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10384$as_echo "$RM" >&6; }
10385else
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
10388fi
10389
10390
10391  test -n "$RM" && break
10392done
10393
10394  else
10395    # The variable is set, but is it from the command line or the environment?
10396
10397    # Try to remove the string !RM! from our list.
10398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10400      # If it failed, the variable was not from the command line. Ignore it,
10401      # but warn the user (except for BASH, which is always set by the calling BASH).
10402      if test "xRM" != xBASH; then
10403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10404$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10405      fi
10406      # Try to locate tool using the code snippet
10407      for ac_prog in rm
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_RM+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $RM in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439RM=$ac_cv_path_RM
10440if test -n "$RM"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10442$as_echo "$RM" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$RM" && break
10450done
10451
10452    else
10453      # If it succeeded, then it was overridden by the user. We will use it
10454      # for the tool.
10455
10456      # First remove it from the list of overridden variables, so we can test
10457      # for unknown variables in the end.
10458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10459
10460      # Check if we try to supply an empty value
10461      if test "x$RM" = x; then
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10463$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10465$as_echo_n "checking for RM... " >&6; }
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10467$as_echo "disabled" >&6; }
10468      else
10469        # Check if the provided tool contains a complete path.
10470        tool_specified="$RM"
10471        tool_basename="${tool_specified##*/}"
10472        if test "x$tool_basename" = "x$tool_specified"; then
10473          # A command without a complete path is provided, search $PATH.
10474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10475$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10476          # Extract the first word of "$tool_basename", so it can be a program name with args.
10477set dummy $tool_basename; ac_word=$2
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479$as_echo_n "checking for $ac_word... " >&6; }
10480if ${ac_cv_path_RM+:} false; then :
10481  $as_echo_n "(cached) " >&6
10482else
10483  case $RM in
10484  [\\/]* | ?:[\\/]*)
10485  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10486  ;;
10487  *)
10488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489for as_dir in $PATH
10490do
10491  IFS=$as_save_IFS
10492  test -z "$as_dir" && as_dir=.
10493    for ac_exec_ext in '' $ac_executable_extensions; do
10494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497    break 2
10498  fi
10499done
10500  done
10501IFS=$as_save_IFS
10502
10503  ;;
10504esac
10505fi
10506RM=$ac_cv_path_RM
10507if test -n "$RM"; then
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10509$as_echo "$RM" >&6; }
10510else
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
10513fi
10514
10515
10516          if test "x$RM" = x; then
10517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10518          fi
10519        else
10520          # Otherwise we believe it is a complete path. Use it as it is.
10521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10522$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10524$as_echo_n "checking for RM... " >&6; }
10525          if test ! -x "$tool_specified"; then
10526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10527$as_echo "not found" >&6; }
10528            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10529          fi
10530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10531$as_echo "$tool_specified" >&6; }
10532        fi
10533      fi
10534    fi
10535
10536  fi
10537
10538
10539
10540  if test "x$RM" = x; then
10541    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10542  fi
10543
10544
10545
10546
10547
10548  # Publish this variable in the help.
10549
10550
10551  if [ -z "${RMDIR+x}" ]; then
10552    # The variable is not set by user, try to locate tool using the code snippet
10553    for ac_prog in rmdir
10554do
10555  # Extract the first word of "$ac_prog", so it can be a program name with args.
10556set dummy $ac_prog; ac_word=$2
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10558$as_echo_n "checking for $ac_word... " >&6; }
10559if ${ac_cv_path_RMDIR+:} false; then :
10560  $as_echo_n "(cached) " >&6
10561else
10562  case $RMDIR in
10563  [\\/]* | ?:[\\/]*)
10564  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10565  ;;
10566  *)
10567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568for as_dir in $PATH
10569do
10570  IFS=$as_save_IFS
10571  test -z "$as_dir" && as_dir=.
10572    for ac_exec_ext in '' $ac_executable_extensions; do
10573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10574    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10576    break 2
10577  fi
10578done
10579  done
10580IFS=$as_save_IFS
10581
10582  ;;
10583esac
10584fi
10585RMDIR=$ac_cv_path_RMDIR
10586if test -n "$RMDIR"; then
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10588$as_echo "$RMDIR" >&6; }
10589else
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592fi
10593
10594
10595  test -n "$RMDIR" && break
10596done
10597
10598  else
10599    # The variable is set, but is it from the command line or the environment?
10600
10601    # Try to remove the string !RMDIR! from our list.
10602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10604      # If it failed, the variable was not from the command line. Ignore it,
10605      # but warn the user (except for BASH, which is always set by the calling BASH).
10606      if test "xRMDIR" != xBASH; then
10607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10608$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10609      fi
10610      # Try to locate tool using the code snippet
10611      for ac_prog in rmdir
10612do
10613  # Extract the first word of "$ac_prog", so it can be a program name with args.
10614set dummy $ac_prog; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
10617if ${ac_cv_path_RMDIR+:} false; then :
10618  $as_echo_n "(cached) " >&6
10619else
10620  case $RMDIR in
10621  [\\/]* | ?:[\\/]*)
10622  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10623  ;;
10624  *)
10625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640  ;;
10641esac
10642fi
10643RMDIR=$ac_cv_path_RMDIR
10644if test -n "$RMDIR"; then
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10646$as_echo "$RMDIR" >&6; }
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652
10653  test -n "$RMDIR" && break
10654done
10655
10656    else
10657      # If it succeeded, then it was overridden by the user. We will use it
10658      # for the tool.
10659
10660      # First remove it from the list of overridden variables, so we can test
10661      # for unknown variables in the end.
10662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10663
10664      # Check if we try to supply an empty value
10665      if test "x$RMDIR" = x; then
10666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10667$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10669$as_echo_n "checking for RMDIR... " >&6; }
10670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10671$as_echo "disabled" >&6; }
10672      else
10673        # Check if the provided tool contains a complete path.
10674        tool_specified="$RMDIR"
10675        tool_basename="${tool_specified##*/}"
10676        if test "x$tool_basename" = "x$tool_specified"; then
10677          # A command without a complete path is provided, search $PATH.
10678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10679$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10680          # Extract the first word of "$tool_basename", so it can be a program name with args.
10681set dummy $tool_basename; ac_word=$2
10682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10683$as_echo_n "checking for $ac_word... " >&6; }
10684if ${ac_cv_path_RMDIR+:} false; then :
10685  $as_echo_n "(cached) " >&6
10686else
10687  case $RMDIR in
10688  [\\/]* | ?:[\\/]*)
10689  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10690  ;;
10691  *)
10692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10693for as_dir in $PATH
10694do
10695  IFS=$as_save_IFS
10696  test -z "$as_dir" && as_dir=.
10697    for ac_exec_ext in '' $ac_executable_extensions; do
10698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10699    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10701    break 2
10702  fi
10703done
10704  done
10705IFS=$as_save_IFS
10706
10707  ;;
10708esac
10709fi
10710RMDIR=$ac_cv_path_RMDIR
10711if test -n "$RMDIR"; then
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10713$as_echo "$RMDIR" >&6; }
10714else
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
10717fi
10718
10719
10720          if test "x$RMDIR" = x; then
10721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10722          fi
10723        else
10724          # Otherwise we believe it is a complete path. Use it as it is.
10725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10726$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10728$as_echo_n "checking for RMDIR... " >&6; }
10729          if test ! -x "$tool_specified"; then
10730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10731$as_echo "not found" >&6; }
10732            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10733          fi
10734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10735$as_echo "$tool_specified" >&6; }
10736        fi
10737      fi
10738    fi
10739
10740  fi
10741
10742
10743
10744  if test "x$RMDIR" = x; then
10745    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if [ -z "${SH+x}" ]; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in sh
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_SH+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $SH in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789SH=$ac_cv_path_SH
10790if test -n "$SH"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10792$as_echo "$SH" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$SH" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !SH! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xSH" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in sh
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_SH+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $SH in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847SH=$ac_cv_path_SH
10848if test -n "$SH"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10850$as_echo "$SH" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$SH" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if we try to supply an empty value
10869      if test "x$SH" = x; then
10870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10871$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10873$as_echo_n "checking for SH... " >&6; }
10874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10875$as_echo "disabled" >&6; }
10876      else
10877        # Check if the provided tool contains a complete path.
10878        tool_specified="$SH"
10879        tool_basename="${tool_specified##*/}"
10880        if test "x$tool_basename" = "x$tool_specified"; then
10881          # A command without a complete path is provided, search $PATH.
10882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10883$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10884          # Extract the first word of "$tool_basename", so it can be a program name with args.
10885set dummy $tool_basename; ac_word=$2
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887$as_echo_n "checking for $ac_word... " >&6; }
10888if ${ac_cv_path_SH+:} false; then :
10889  $as_echo_n "(cached) " >&6
10890else
10891  case $SH in
10892  [\\/]* | ?:[\\/]*)
10893  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10894  ;;
10895  *)
10896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897for as_dir in $PATH
10898do
10899  IFS=$as_save_IFS
10900  test -z "$as_dir" && as_dir=.
10901    for ac_exec_ext in '' $ac_executable_extensions; do
10902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905    break 2
10906  fi
10907done
10908  done
10909IFS=$as_save_IFS
10910
10911  ;;
10912esac
10913fi
10914SH=$ac_cv_path_SH
10915if test -n "$SH"; then
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10917$as_echo "$SH" >&6; }
10918else
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921fi
10922
10923
10924          if test "x$SH" = x; then
10925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10926          fi
10927        else
10928          # Otherwise we believe it is a complete path. Use it as it is.
10929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10930$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10932$as_echo_n "checking for SH... " >&6; }
10933          if test ! -x "$tool_specified"; then
10934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10935$as_echo "not found" >&6; }
10936            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10937          fi
10938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10939$as_echo "$tool_specified" >&6; }
10940        fi
10941      fi
10942    fi
10943
10944  fi
10945
10946
10947
10948  if test "x$SH" = x; then
10949    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10950  fi
10951
10952
10953
10954
10955
10956  # Publish this variable in the help.
10957
10958
10959  if [ -z "${SORT+x}" ]; then
10960    # The variable is not set by user, try to locate tool using the code snippet
10961    for ac_prog in sort
10962do
10963  # Extract the first word of "$ac_prog", so it can be a program name with args.
10964set dummy $ac_prog; ac_word=$2
10965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10966$as_echo_n "checking for $ac_word... " >&6; }
10967if ${ac_cv_path_SORT+:} false; then :
10968  $as_echo_n "(cached) " >&6
10969else
10970  case $SORT in
10971  [\\/]* | ?:[\\/]*)
10972  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10973  ;;
10974  *)
10975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10976for as_dir in $PATH
10977do
10978  IFS=$as_save_IFS
10979  test -z "$as_dir" && as_dir=.
10980    for ac_exec_ext in '' $ac_executable_extensions; do
10981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10982    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10984    break 2
10985  fi
10986done
10987  done
10988IFS=$as_save_IFS
10989
10990  ;;
10991esac
10992fi
10993SORT=$ac_cv_path_SORT
10994if test -n "$SORT"; then
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10996$as_echo "$SORT" >&6; }
10997else
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
11000fi
11001
11002
11003  test -n "$SORT" && break
11004done
11005
11006  else
11007    # The variable is set, but is it from the command line or the environment?
11008
11009    # Try to remove the string !SORT! from our list.
11010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11012      # If it failed, the variable was not from the command line. Ignore it,
11013      # but warn the user (except for BASH, which is always set by the calling BASH).
11014      if test "xSORT" != xBASH; then
11015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11016$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11017      fi
11018      # Try to locate tool using the code snippet
11019      for ac_prog in sort
11020do
11021  # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
11025if ${ac_cv_path_SORT+:} false; then :
11026  $as_echo_n "(cached) " >&6
11027else
11028  case $SORT in
11029  [\\/]* | ?:[\\/]*)
11030  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11031  ;;
11032  *)
11033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036  IFS=$as_save_IFS
11037  test -z "$as_dir" && as_dir=.
11038    for ac_exec_ext in '' $ac_executable_extensions; do
11039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11040    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042    break 2
11043  fi
11044done
11045  done
11046IFS=$as_save_IFS
11047
11048  ;;
11049esac
11050fi
11051SORT=$ac_cv_path_SORT
11052if test -n "$SORT"; then
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11054$as_echo "$SORT" >&6; }
11055else
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058fi
11059
11060
11061  test -n "$SORT" && break
11062done
11063
11064    else
11065      # If it succeeded, then it was overridden by the user. We will use it
11066      # for the tool.
11067
11068      # First remove it from the list of overridden variables, so we can test
11069      # for unknown variables in the end.
11070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11071
11072      # Check if we try to supply an empty value
11073      if test "x$SORT" = x; then
11074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11075$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11077$as_echo_n "checking for SORT... " >&6; }
11078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11079$as_echo "disabled" >&6; }
11080      else
11081        # Check if the provided tool contains a complete path.
11082        tool_specified="$SORT"
11083        tool_basename="${tool_specified##*/}"
11084        if test "x$tool_basename" = "x$tool_specified"; then
11085          # A command without a complete path is provided, search $PATH.
11086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11087$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11088          # Extract the first word of "$tool_basename", so it can be a program name with args.
11089set dummy $tool_basename; ac_word=$2
11090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11091$as_echo_n "checking for $ac_word... " >&6; }
11092if ${ac_cv_path_SORT+:} false; then :
11093  $as_echo_n "(cached) " >&6
11094else
11095  case $SORT in
11096  [\\/]* | ?:[\\/]*)
11097  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11098  ;;
11099  *)
11100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11101for as_dir in $PATH
11102do
11103  IFS=$as_save_IFS
11104  test -z "$as_dir" && as_dir=.
11105    for ac_exec_ext in '' $ac_executable_extensions; do
11106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11107    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11109    break 2
11110  fi
11111done
11112  done
11113IFS=$as_save_IFS
11114
11115  ;;
11116esac
11117fi
11118SORT=$ac_cv_path_SORT
11119if test -n "$SORT"; then
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11121$as_echo "$SORT" >&6; }
11122else
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
11125fi
11126
11127
11128          if test "x$SORT" = x; then
11129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11130          fi
11131        else
11132          # Otherwise we believe it is a complete path. Use it as it is.
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11134$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11136$as_echo_n "checking for SORT... " >&6; }
11137          if test ! -x "$tool_specified"; then
11138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11139$as_echo "not found" >&6; }
11140            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11141          fi
11142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11143$as_echo "$tool_specified" >&6; }
11144        fi
11145      fi
11146    fi
11147
11148  fi
11149
11150
11151
11152  if test "x$SORT" = x; then
11153    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11154  fi
11155
11156
11157
11158
11159
11160  # Publish this variable in the help.
11161
11162
11163  if [ -z "${TAIL+x}" ]; then
11164    # The variable is not set by user, try to locate tool using the code snippet
11165    for ac_prog in tail
11166do
11167  # Extract the first word of "$ac_prog", so it can be a program name with args.
11168set dummy $ac_prog; ac_word=$2
11169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11170$as_echo_n "checking for $ac_word... " >&6; }
11171if ${ac_cv_path_TAIL+:} false; then :
11172  $as_echo_n "(cached) " >&6
11173else
11174  case $TAIL in
11175  [\\/]* | ?:[\\/]*)
11176  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11177  ;;
11178  *)
11179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11180for as_dir in $PATH
11181do
11182  IFS=$as_save_IFS
11183  test -z "$as_dir" && as_dir=.
11184    for ac_exec_ext in '' $ac_executable_extensions; do
11185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11186    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11188    break 2
11189  fi
11190done
11191  done
11192IFS=$as_save_IFS
11193
11194  ;;
11195esac
11196fi
11197TAIL=$ac_cv_path_TAIL
11198if test -n "$TAIL"; then
11199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11200$as_echo "$TAIL" >&6; }
11201else
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11203$as_echo "no" >&6; }
11204fi
11205
11206
11207  test -n "$TAIL" && break
11208done
11209
11210  else
11211    # The variable is set, but is it from the command line or the environment?
11212
11213    # Try to remove the string !TAIL! from our list.
11214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11216      # If it failed, the variable was not from the command line. Ignore it,
11217      # but warn the user (except for BASH, which is always set by the calling BASH).
11218      if test "xTAIL" != xBASH; then
11219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11220$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11221      fi
11222      # Try to locate tool using the code snippet
11223      for ac_prog in tail
11224do
11225  # Extract the first word of "$ac_prog", so it can be a program name with args.
11226set dummy $ac_prog; ac_word=$2
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11228$as_echo_n "checking for $ac_word... " >&6; }
11229if ${ac_cv_path_TAIL+:} false; then :
11230  $as_echo_n "(cached) " >&6
11231else
11232  case $TAIL in
11233  [\\/]* | ?:[\\/]*)
11234  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11235  ;;
11236  *)
11237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11238for as_dir in $PATH
11239do
11240  IFS=$as_save_IFS
11241  test -z "$as_dir" && as_dir=.
11242    for ac_exec_ext in '' $ac_executable_extensions; do
11243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11244    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11246    break 2
11247  fi
11248done
11249  done
11250IFS=$as_save_IFS
11251
11252  ;;
11253esac
11254fi
11255TAIL=$ac_cv_path_TAIL
11256if test -n "$TAIL"; then
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11258$as_echo "$TAIL" >&6; }
11259else
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
11262fi
11263
11264
11265  test -n "$TAIL" && break
11266done
11267
11268    else
11269      # If it succeeded, then it was overridden by the user. We will use it
11270      # for the tool.
11271
11272      # First remove it from the list of overridden variables, so we can test
11273      # for unknown variables in the end.
11274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11275
11276      # Check if we try to supply an empty value
11277      if test "x$TAIL" = x; then
11278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11279$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11281$as_echo_n "checking for TAIL... " >&6; }
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11283$as_echo "disabled" >&6; }
11284      else
11285        # Check if the provided tool contains a complete path.
11286        tool_specified="$TAIL"
11287        tool_basename="${tool_specified##*/}"
11288        if test "x$tool_basename" = "x$tool_specified"; then
11289          # A command without a complete path is provided, search $PATH.
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11291$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11292          # Extract the first word of "$tool_basename", so it can be a program name with args.
11293set dummy $tool_basename; ac_word=$2
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11295$as_echo_n "checking for $ac_word... " >&6; }
11296if ${ac_cv_path_TAIL+:} false; then :
11297  $as_echo_n "(cached) " >&6
11298else
11299  case $TAIL in
11300  [\\/]* | ?:[\\/]*)
11301  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11302  ;;
11303  *)
11304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11305for as_dir in $PATH
11306do
11307  IFS=$as_save_IFS
11308  test -z "$as_dir" && as_dir=.
11309    for ac_exec_ext in '' $ac_executable_extensions; do
11310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11311    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11313    break 2
11314  fi
11315done
11316  done
11317IFS=$as_save_IFS
11318
11319  ;;
11320esac
11321fi
11322TAIL=$ac_cv_path_TAIL
11323if test -n "$TAIL"; then
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11325$as_echo "$TAIL" >&6; }
11326else
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
11329fi
11330
11331
11332          if test "x$TAIL" = x; then
11333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11334          fi
11335        else
11336          # Otherwise we believe it is a complete path. Use it as it is.
11337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11338$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11340$as_echo_n "checking for TAIL... " >&6; }
11341          if test ! -x "$tool_specified"; then
11342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11343$as_echo "not found" >&6; }
11344            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11345          fi
11346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11347$as_echo "$tool_specified" >&6; }
11348        fi
11349      fi
11350    fi
11351
11352  fi
11353
11354
11355
11356  if test "x$TAIL" = x; then
11357    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11358  fi
11359
11360
11361
11362
11363
11364  # Publish this variable in the help.
11365
11366
11367  if [ -z "${TAR+x}" ]; then
11368    # The variable is not set by user, try to locate tool using the code snippet
11369    for ac_prog in gtar tar
11370do
11371  # Extract the first word of "$ac_prog", so it can be a program name with args.
11372set dummy $ac_prog; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_TAR+:} false; then :
11376  $as_echo_n "(cached) " >&6
11377else
11378  case $TAR in
11379  [\\/]* | ?:[\\/]*)
11380  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11381  ;;
11382  *)
11383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386  IFS=$as_save_IFS
11387  test -z "$as_dir" && as_dir=.
11388    for ac_exec_ext in '' $ac_executable_extensions; do
11389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392    break 2
11393  fi
11394done
11395  done
11396IFS=$as_save_IFS
11397
11398  ;;
11399esac
11400fi
11401TAR=$ac_cv_path_TAR
11402if test -n "$TAR"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11404$as_echo "$TAR" >&6; }
11405else
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
11408fi
11409
11410
11411  test -n "$TAR" && break
11412done
11413
11414  else
11415    # The variable is set, but is it from the command line or the environment?
11416
11417    # Try to remove the string !TAR! from our list.
11418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11420      # If it failed, the variable was not from the command line. Ignore it,
11421      # but warn the user (except for BASH, which is always set by the calling BASH).
11422      if test "xTAR" != xBASH; then
11423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11424$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11425      fi
11426      # Try to locate tool using the code snippet
11427      for ac_prog in gtar tar
11428do
11429  # Extract the first word of "$ac_prog", so it can be a program name with args.
11430set dummy $ac_prog; ac_word=$2
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11432$as_echo_n "checking for $ac_word... " >&6; }
11433if ${ac_cv_path_TAR+:} false; then :
11434  $as_echo_n "(cached) " >&6
11435else
11436  case $TAR in
11437  [\\/]* | ?:[\\/]*)
11438  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11439  ;;
11440  *)
11441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456  ;;
11457esac
11458fi
11459TAR=$ac_cv_path_TAR
11460if test -n "$TAR"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11462$as_echo "$TAR" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$TAR" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if we try to supply an empty value
11481      if test "x$TAR" = x; then
11482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11483$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11485$as_echo_n "checking for TAR... " >&6; }
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11487$as_echo "disabled" >&6; }
11488      else
11489        # Check if the provided tool contains a complete path.
11490        tool_specified="$TAR"
11491        tool_basename="${tool_specified##*/}"
11492        if test "x$tool_basename" = "x$tool_specified"; then
11493          # A command without a complete path is provided, search $PATH.
11494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11495$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11496          # Extract the first word of "$tool_basename", so it can be a program name with args.
11497set dummy $tool_basename; ac_word=$2
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11499$as_echo_n "checking for $ac_word... " >&6; }
11500if ${ac_cv_path_TAR+:} false; then :
11501  $as_echo_n "(cached) " >&6
11502else
11503  case $TAR in
11504  [\\/]* | ?:[\\/]*)
11505  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11506  ;;
11507  *)
11508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11509for as_dir in $PATH
11510do
11511  IFS=$as_save_IFS
11512  test -z "$as_dir" && as_dir=.
11513    for ac_exec_ext in '' $ac_executable_extensions; do
11514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11515    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11517    break 2
11518  fi
11519done
11520  done
11521IFS=$as_save_IFS
11522
11523  ;;
11524esac
11525fi
11526TAR=$ac_cv_path_TAR
11527if test -n "$TAR"; then
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11529$as_echo "$TAR" >&6; }
11530else
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533fi
11534
11535
11536          if test "x$TAR" = x; then
11537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11538          fi
11539        else
11540          # Otherwise we believe it is a complete path. Use it as it is.
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11542$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11544$as_echo_n "checking for TAR... " >&6; }
11545          if test ! -x "$tool_specified"; then
11546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11547$as_echo "not found" >&6; }
11548            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11549          fi
11550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11551$as_echo "$tool_specified" >&6; }
11552        fi
11553      fi
11554    fi
11555
11556  fi
11557
11558
11559
11560  if test "x$TAR" = x; then
11561    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11562  fi
11563
11564
11565
11566
11567
11568  # Publish this variable in the help.
11569
11570
11571  if [ -z "${TEE+x}" ]; then
11572    # The variable is not set by user, try to locate tool using the code snippet
11573    for ac_prog in tee
11574do
11575  # Extract the first word of "$ac_prog", so it can be a program name with args.
11576set dummy $ac_prog; ac_word=$2
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11578$as_echo_n "checking for $ac_word... " >&6; }
11579if ${ac_cv_path_TEE+:} false; then :
11580  $as_echo_n "(cached) " >&6
11581else
11582  case $TEE in
11583  [\\/]* | ?:[\\/]*)
11584  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11585  ;;
11586  *)
11587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11588for as_dir in $PATH
11589do
11590  IFS=$as_save_IFS
11591  test -z "$as_dir" && as_dir=.
11592    for ac_exec_ext in '' $ac_executable_extensions; do
11593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11594    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11596    break 2
11597  fi
11598done
11599  done
11600IFS=$as_save_IFS
11601
11602  ;;
11603esac
11604fi
11605TEE=$ac_cv_path_TEE
11606if test -n "$TEE"; then
11607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11608$as_echo "$TEE" >&6; }
11609else
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612fi
11613
11614
11615  test -n "$TEE" && break
11616done
11617
11618  else
11619    # The variable is set, but is it from the command line or the environment?
11620
11621    # Try to remove the string !TEE! from our list.
11622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11624      # If it failed, the variable was not from the command line. Ignore it,
11625      # but warn the user (except for BASH, which is always set by the calling BASH).
11626      if test "xTEE" != xBASH; then
11627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11628$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11629      fi
11630      # Try to locate tool using the code snippet
11631      for ac_prog in tee
11632do
11633  # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
11637if ${ac_cv_path_TEE+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  case $TEE in
11641  [\\/]* | ?:[\\/]*)
11642  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11643  ;;
11644  *)
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11652    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11654    break 2
11655  fi
11656done
11657  done
11658IFS=$as_save_IFS
11659
11660  ;;
11661esac
11662fi
11663TEE=$ac_cv_path_TEE
11664if test -n "$TEE"; then
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11666$as_echo "$TEE" >&6; }
11667else
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670fi
11671
11672
11673  test -n "$TEE" && break
11674done
11675
11676    else
11677      # If it succeeded, then it was overridden by the user. We will use it
11678      # for the tool.
11679
11680      # First remove it from the list of overridden variables, so we can test
11681      # for unknown variables in the end.
11682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11683
11684      # Check if we try to supply an empty value
11685      if test "x$TEE" = x; then
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11687$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11689$as_echo_n "checking for TEE... " >&6; }
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11691$as_echo "disabled" >&6; }
11692      else
11693        # Check if the provided tool contains a complete path.
11694        tool_specified="$TEE"
11695        tool_basename="${tool_specified##*/}"
11696        if test "x$tool_basename" = "x$tool_specified"; then
11697          # A command without a complete path is provided, search $PATH.
11698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11699$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11700          # Extract the first word of "$tool_basename", so it can be a program name with args.
11701set dummy $tool_basename; ac_word=$2
11702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11703$as_echo_n "checking for $ac_word... " >&6; }
11704if ${ac_cv_path_TEE+:} false; then :
11705  $as_echo_n "(cached) " >&6
11706else
11707  case $TEE in
11708  [\\/]* | ?:[\\/]*)
11709  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11710  ;;
11711  *)
11712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11713for as_dir in $PATH
11714do
11715  IFS=$as_save_IFS
11716  test -z "$as_dir" && as_dir=.
11717    for ac_exec_ext in '' $ac_executable_extensions; do
11718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11719    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11721    break 2
11722  fi
11723done
11724  done
11725IFS=$as_save_IFS
11726
11727  ;;
11728esac
11729fi
11730TEE=$ac_cv_path_TEE
11731if test -n "$TEE"; then
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11733$as_echo "$TEE" >&6; }
11734else
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
11737fi
11738
11739
11740          if test "x$TEE" = x; then
11741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11742          fi
11743        else
11744          # Otherwise we believe it is a complete path. Use it as it is.
11745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11746$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11748$as_echo_n "checking for TEE... " >&6; }
11749          if test ! -x "$tool_specified"; then
11750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11751$as_echo "not found" >&6; }
11752            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11753          fi
11754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11755$as_echo "$tool_specified" >&6; }
11756        fi
11757      fi
11758    fi
11759
11760  fi
11761
11762
11763
11764  if test "x$TEE" = x; then
11765    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11766  fi
11767
11768
11769
11770
11771
11772  # Publish this variable in the help.
11773
11774
11775  if [ -z "${TOUCH+x}" ]; then
11776    # The variable is not set by user, try to locate tool using the code snippet
11777    for ac_prog in touch
11778do
11779  # Extract the first word of "$ac_prog", so it can be a program name with args.
11780set dummy $ac_prog; ac_word=$2
11781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11782$as_echo_n "checking for $ac_word... " >&6; }
11783if ${ac_cv_path_TOUCH+:} false; then :
11784  $as_echo_n "(cached) " >&6
11785else
11786  case $TOUCH in
11787  [\\/]* | ?:[\\/]*)
11788  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11789  ;;
11790  *)
11791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11792for as_dir in $PATH
11793do
11794  IFS=$as_save_IFS
11795  test -z "$as_dir" && as_dir=.
11796    for ac_exec_ext in '' $ac_executable_extensions; do
11797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11798    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11800    break 2
11801  fi
11802done
11803  done
11804IFS=$as_save_IFS
11805
11806  ;;
11807esac
11808fi
11809TOUCH=$ac_cv_path_TOUCH
11810if test -n "$TOUCH"; then
11811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11812$as_echo "$TOUCH" >&6; }
11813else
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
11816fi
11817
11818
11819  test -n "$TOUCH" && break
11820done
11821
11822  else
11823    # The variable is set, but is it from the command line or the environment?
11824
11825    # Try to remove the string !TOUCH! from our list.
11826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11828      # If it failed, the variable was not from the command line. Ignore it,
11829      # but warn the user (except for BASH, which is always set by the calling BASH).
11830      if test "xTOUCH" != xBASH; then
11831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11832$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11833      fi
11834      # Try to locate tool using the code snippet
11835      for ac_prog in touch
11836do
11837  # Extract the first word of "$ac_prog", so it can be a program name with args.
11838set dummy $ac_prog; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_TOUCH+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $TOUCH in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867TOUCH=$ac_cv_path_TOUCH
11868if test -n "$TOUCH"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11870$as_echo "$TOUCH" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877  test -n "$TOUCH" && break
11878done
11879
11880    else
11881      # If it succeeded, then it was overridden by the user. We will use it
11882      # for the tool.
11883
11884      # First remove it from the list of overridden variables, so we can test
11885      # for unknown variables in the end.
11886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11887
11888      # Check if we try to supply an empty value
11889      if test "x$TOUCH" = x; then
11890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11891$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11893$as_echo_n "checking for TOUCH... " >&6; }
11894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11895$as_echo "disabled" >&6; }
11896      else
11897        # Check if the provided tool contains a complete path.
11898        tool_specified="$TOUCH"
11899        tool_basename="${tool_specified##*/}"
11900        if test "x$tool_basename" = "x$tool_specified"; then
11901          # A command without a complete path is provided, search $PATH.
11902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11903$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11904          # Extract the first word of "$tool_basename", so it can be a program name with args.
11905set dummy $tool_basename; ac_word=$2
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11907$as_echo_n "checking for $ac_word... " >&6; }
11908if ${ac_cv_path_TOUCH+:} false; then :
11909  $as_echo_n "(cached) " >&6
11910else
11911  case $TOUCH in
11912  [\\/]* | ?:[\\/]*)
11913  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11914  ;;
11915  *)
11916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11917for as_dir in $PATH
11918do
11919  IFS=$as_save_IFS
11920  test -z "$as_dir" && as_dir=.
11921    for ac_exec_ext in '' $ac_executable_extensions; do
11922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11923    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11925    break 2
11926  fi
11927done
11928  done
11929IFS=$as_save_IFS
11930
11931  ;;
11932esac
11933fi
11934TOUCH=$ac_cv_path_TOUCH
11935if test -n "$TOUCH"; then
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11937$as_echo "$TOUCH" >&6; }
11938else
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
11941fi
11942
11943
11944          if test "x$TOUCH" = x; then
11945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11946          fi
11947        else
11948          # Otherwise we believe it is a complete path. Use it as it is.
11949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11950$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11952$as_echo_n "checking for TOUCH... " >&6; }
11953          if test ! -x "$tool_specified"; then
11954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11955$as_echo "not found" >&6; }
11956            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11957          fi
11958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11959$as_echo "$tool_specified" >&6; }
11960        fi
11961      fi
11962    fi
11963
11964  fi
11965
11966
11967
11968  if test "x$TOUCH" = x; then
11969    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11970  fi
11971
11972
11973
11974
11975
11976  # Publish this variable in the help.
11977
11978
11979  if [ -z "${TR+x}" ]; then
11980    # The variable is not set by user, try to locate tool using the code snippet
11981    for ac_prog in tr
11982do
11983  # Extract the first word of "$ac_prog", so it can be a program name with args.
11984set dummy $ac_prog; ac_word=$2
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11986$as_echo_n "checking for $ac_word... " >&6; }
11987if ${ac_cv_path_TR+:} false; then :
11988  $as_echo_n "(cached) " >&6
11989else
11990  case $TR in
11991  [\\/]* | ?:[\\/]*)
11992  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11993  ;;
11994  *)
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_exec_ext in '' $ac_executable_extensions; do
12001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12002    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12004    break 2
12005  fi
12006done
12007  done
12008IFS=$as_save_IFS
12009
12010  ;;
12011esac
12012fi
12013TR=$ac_cv_path_TR
12014if test -n "$TR"; then
12015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12016$as_echo "$TR" >&6; }
12017else
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12019$as_echo "no" >&6; }
12020fi
12021
12022
12023  test -n "$TR" && break
12024done
12025
12026  else
12027    # The variable is set, but is it from the command line or the environment?
12028
12029    # Try to remove the string !TR! from our list.
12030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12032      # If it failed, the variable was not from the command line. Ignore it,
12033      # but warn the user (except for BASH, which is always set by the calling BASH).
12034      if test "xTR" != xBASH; then
12035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12036$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12037      fi
12038      # Try to locate tool using the code snippet
12039      for ac_prog in tr
12040do
12041  # Extract the first word of "$ac_prog", so it can be a program name with args.
12042set dummy $ac_prog; ac_word=$2
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044$as_echo_n "checking for $ac_word... " >&6; }
12045if ${ac_cv_path_TR+:} false; then :
12046  $as_echo_n "(cached) " >&6
12047else
12048  case $TR in
12049  [\\/]* | ?:[\\/]*)
12050  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12051  ;;
12052  *)
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_exec_ext in '' $ac_executable_extensions; do
12059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12060    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12062    break 2
12063  fi
12064done
12065  done
12066IFS=$as_save_IFS
12067
12068  ;;
12069esac
12070fi
12071TR=$ac_cv_path_TR
12072if test -n "$TR"; then
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12074$as_echo "$TR" >&6; }
12075else
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078fi
12079
12080
12081  test -n "$TR" && break
12082done
12083
12084    else
12085      # If it succeeded, then it was overridden by the user. We will use it
12086      # for the tool.
12087
12088      # First remove it from the list of overridden variables, so we can test
12089      # for unknown variables in the end.
12090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12091
12092      # Check if we try to supply an empty value
12093      if test "x$TR" = x; then
12094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12095$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12097$as_echo_n "checking for TR... " >&6; }
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12099$as_echo "disabled" >&6; }
12100      else
12101        # Check if the provided tool contains a complete path.
12102        tool_specified="$TR"
12103        tool_basename="${tool_specified##*/}"
12104        if test "x$tool_basename" = "x$tool_specified"; then
12105          # A command without a complete path is provided, search $PATH.
12106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12107$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12108          # Extract the first word of "$tool_basename", so it can be a program name with args.
12109set dummy $tool_basename; ac_word=$2
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12111$as_echo_n "checking for $ac_word... " >&6; }
12112if ${ac_cv_path_TR+:} false; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  case $TR in
12116  [\\/]* | ?:[\\/]*)
12117  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12118  ;;
12119  *)
12120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12121for as_dir in $PATH
12122do
12123  IFS=$as_save_IFS
12124  test -z "$as_dir" && as_dir=.
12125    for ac_exec_ext in '' $ac_executable_extensions; do
12126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12127    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12129    break 2
12130  fi
12131done
12132  done
12133IFS=$as_save_IFS
12134
12135  ;;
12136esac
12137fi
12138TR=$ac_cv_path_TR
12139if test -n "$TR"; then
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12141$as_echo "$TR" >&6; }
12142else
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12144$as_echo "no" >&6; }
12145fi
12146
12147
12148          if test "x$TR" = x; then
12149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12150          fi
12151        else
12152          # Otherwise we believe it is a complete path. Use it as it is.
12153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12154$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12156$as_echo_n "checking for TR... " >&6; }
12157          if test ! -x "$tool_specified"; then
12158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12159$as_echo "not found" >&6; }
12160            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12161          fi
12162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12163$as_echo "$tool_specified" >&6; }
12164        fi
12165      fi
12166    fi
12167
12168  fi
12169
12170
12171
12172  if test "x$TR" = x; then
12173    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12174  fi
12175
12176
12177
12178
12179
12180  # Publish this variable in the help.
12181
12182
12183  if [ -z "${UNAME+x}" ]; then
12184    # The variable is not set by user, try to locate tool using the code snippet
12185    for ac_prog in uname
12186do
12187  # Extract the first word of "$ac_prog", so it can be a program name with args.
12188set dummy $ac_prog; ac_word=$2
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12190$as_echo_n "checking for $ac_word... " >&6; }
12191if ${ac_cv_path_UNAME+:} false; then :
12192  $as_echo_n "(cached) " >&6
12193else
12194  case $UNAME in
12195  [\\/]* | ?:[\\/]*)
12196  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12197  ;;
12198  *)
12199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12200for as_dir in $PATH
12201do
12202  IFS=$as_save_IFS
12203  test -z "$as_dir" && as_dir=.
12204    for ac_exec_ext in '' $ac_executable_extensions; do
12205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12206    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12208    break 2
12209  fi
12210done
12211  done
12212IFS=$as_save_IFS
12213
12214  ;;
12215esac
12216fi
12217UNAME=$ac_cv_path_UNAME
12218if test -n "$UNAME"; then
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12220$as_echo "$UNAME" >&6; }
12221else
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12223$as_echo "no" >&6; }
12224fi
12225
12226
12227  test -n "$UNAME" && break
12228done
12229
12230  else
12231    # The variable is set, but is it from the command line or the environment?
12232
12233    # Try to remove the string !UNAME! from our list.
12234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12236      # If it failed, the variable was not from the command line. Ignore it,
12237      # but warn the user (except for BASH, which is always set by the calling BASH).
12238      if test "xUNAME" != xBASH; then
12239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12240$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12241      fi
12242      # Try to locate tool using the code snippet
12243      for ac_prog in uname
12244do
12245  # Extract the first word of "$ac_prog", so it can be a program name with args.
12246set dummy $ac_prog; ac_word=$2
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12248$as_echo_n "checking for $ac_word... " >&6; }
12249if ${ac_cv_path_UNAME+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  case $UNAME in
12253  [\\/]* | ?:[\\/]*)
12254  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12255  ;;
12256  *)
12257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12258for as_dir in $PATH
12259do
12260  IFS=$as_save_IFS
12261  test -z "$as_dir" && as_dir=.
12262    for ac_exec_ext in '' $ac_executable_extensions; do
12263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12264    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12266    break 2
12267  fi
12268done
12269  done
12270IFS=$as_save_IFS
12271
12272  ;;
12273esac
12274fi
12275UNAME=$ac_cv_path_UNAME
12276if test -n "$UNAME"; then
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12278$as_echo "$UNAME" >&6; }
12279else
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
12282fi
12283
12284
12285  test -n "$UNAME" && break
12286done
12287
12288    else
12289      # If it succeeded, then it was overridden by the user. We will use it
12290      # for the tool.
12291
12292      # First remove it from the list of overridden variables, so we can test
12293      # for unknown variables in the end.
12294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12295
12296      # Check if we try to supply an empty value
12297      if test "x$UNAME" = x; then
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12299$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12301$as_echo_n "checking for UNAME... " >&6; }
12302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12303$as_echo "disabled" >&6; }
12304      else
12305        # Check if the provided tool contains a complete path.
12306        tool_specified="$UNAME"
12307        tool_basename="${tool_specified##*/}"
12308        if test "x$tool_basename" = "x$tool_specified"; then
12309          # A command without a complete path is provided, search $PATH.
12310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12311$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12312          # Extract the first word of "$tool_basename", so it can be a program name with args.
12313set dummy $tool_basename; ac_word=$2
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12315$as_echo_n "checking for $ac_word... " >&6; }
12316if ${ac_cv_path_UNAME+:} false; then :
12317  $as_echo_n "(cached) " >&6
12318else
12319  case $UNAME in
12320  [\\/]* | ?:[\\/]*)
12321  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12322  ;;
12323  *)
12324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325for as_dir in $PATH
12326do
12327  IFS=$as_save_IFS
12328  test -z "$as_dir" && as_dir=.
12329    for ac_exec_ext in '' $ac_executable_extensions; do
12330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12333    break 2
12334  fi
12335done
12336  done
12337IFS=$as_save_IFS
12338
12339  ;;
12340esac
12341fi
12342UNAME=$ac_cv_path_UNAME
12343if test -n "$UNAME"; then
12344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12345$as_echo "$UNAME" >&6; }
12346else
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12348$as_echo "no" >&6; }
12349fi
12350
12351
12352          if test "x$UNAME" = x; then
12353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12354          fi
12355        else
12356          # Otherwise we believe it is a complete path. Use it as it is.
12357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12358$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12360$as_echo_n "checking for UNAME... " >&6; }
12361          if test ! -x "$tool_specified"; then
12362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12363$as_echo "not found" >&6; }
12364            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12365          fi
12366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12367$as_echo "$tool_specified" >&6; }
12368        fi
12369      fi
12370    fi
12371
12372  fi
12373
12374
12375
12376  if test "x$UNAME" = x; then
12377    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12378  fi
12379
12380
12381
12382
12383
12384  # Publish this variable in the help.
12385
12386
12387  if [ -z "${UNIQ+x}" ]; then
12388    # The variable is not set by user, try to locate tool using the code snippet
12389    for ac_prog in uniq
12390do
12391  # Extract the first word of "$ac_prog", so it can be a program name with args.
12392set dummy $ac_prog; ac_word=$2
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12394$as_echo_n "checking for $ac_word... " >&6; }
12395if ${ac_cv_path_UNIQ+:} false; then :
12396  $as_echo_n "(cached) " >&6
12397else
12398  case $UNIQ in
12399  [\\/]* | ?:[\\/]*)
12400  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12401  ;;
12402  *)
12403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12404for as_dir in $PATH
12405do
12406  IFS=$as_save_IFS
12407  test -z "$as_dir" && as_dir=.
12408    for ac_exec_ext in '' $ac_executable_extensions; do
12409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12410    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12412    break 2
12413  fi
12414done
12415  done
12416IFS=$as_save_IFS
12417
12418  ;;
12419esac
12420fi
12421UNIQ=$ac_cv_path_UNIQ
12422if test -n "$UNIQ"; then
12423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12424$as_echo "$UNIQ" >&6; }
12425else
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12427$as_echo "no" >&6; }
12428fi
12429
12430
12431  test -n "$UNIQ" && break
12432done
12433
12434  else
12435    # The variable is set, but is it from the command line or the environment?
12436
12437    # Try to remove the string !UNIQ! from our list.
12438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12440      # If it failed, the variable was not from the command line. Ignore it,
12441      # but warn the user (except for BASH, which is always set by the calling BASH).
12442      if test "xUNIQ" != xBASH; then
12443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12444$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12445      fi
12446      # Try to locate tool using the code snippet
12447      for ac_prog in uniq
12448do
12449  # Extract the first word of "$ac_prog", so it can be a program name with args.
12450set dummy $ac_prog; ac_word=$2
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12452$as_echo_n "checking for $ac_word... " >&6; }
12453if ${ac_cv_path_UNIQ+:} false; then :
12454  $as_echo_n "(cached) " >&6
12455else
12456  case $UNIQ in
12457  [\\/]* | ?:[\\/]*)
12458  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12459  ;;
12460  *)
12461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12462for as_dir in $PATH
12463do
12464  IFS=$as_save_IFS
12465  test -z "$as_dir" && as_dir=.
12466    for ac_exec_ext in '' $ac_executable_extensions; do
12467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12468    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12470    break 2
12471  fi
12472done
12473  done
12474IFS=$as_save_IFS
12475
12476  ;;
12477esac
12478fi
12479UNIQ=$ac_cv_path_UNIQ
12480if test -n "$UNIQ"; then
12481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12482$as_echo "$UNIQ" >&6; }
12483else
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486fi
12487
12488
12489  test -n "$UNIQ" && break
12490done
12491
12492    else
12493      # If it succeeded, then it was overridden by the user. We will use it
12494      # for the tool.
12495
12496      # First remove it from the list of overridden variables, so we can test
12497      # for unknown variables in the end.
12498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12499
12500      # Check if we try to supply an empty value
12501      if test "x$UNIQ" = x; then
12502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12503$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12505$as_echo_n "checking for UNIQ... " >&6; }
12506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12507$as_echo "disabled" >&6; }
12508      else
12509        # Check if the provided tool contains a complete path.
12510        tool_specified="$UNIQ"
12511        tool_basename="${tool_specified##*/}"
12512        if test "x$tool_basename" = "x$tool_specified"; then
12513          # A command without a complete path is provided, search $PATH.
12514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12515$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12516          # Extract the first word of "$tool_basename", so it can be a program name with args.
12517set dummy $tool_basename; ac_word=$2
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12519$as_echo_n "checking for $ac_word... " >&6; }
12520if ${ac_cv_path_UNIQ+:} false; then :
12521  $as_echo_n "(cached) " >&6
12522else
12523  case $UNIQ in
12524  [\\/]* | ?:[\\/]*)
12525  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12526  ;;
12527  *)
12528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12529for as_dir in $PATH
12530do
12531  IFS=$as_save_IFS
12532  test -z "$as_dir" && as_dir=.
12533    for ac_exec_ext in '' $ac_executable_extensions; do
12534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12535    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12537    break 2
12538  fi
12539done
12540  done
12541IFS=$as_save_IFS
12542
12543  ;;
12544esac
12545fi
12546UNIQ=$ac_cv_path_UNIQ
12547if test -n "$UNIQ"; then
12548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12549$as_echo "$UNIQ" >&6; }
12550else
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12552$as_echo "no" >&6; }
12553fi
12554
12555
12556          if test "x$UNIQ" = x; then
12557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12558          fi
12559        else
12560          # Otherwise we believe it is a complete path. Use it as it is.
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12562$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12564$as_echo_n "checking for UNIQ... " >&6; }
12565          if test ! -x "$tool_specified"; then
12566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12567$as_echo "not found" >&6; }
12568            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12569          fi
12570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12571$as_echo "$tool_specified" >&6; }
12572        fi
12573      fi
12574    fi
12575
12576  fi
12577
12578
12579
12580  if test "x$UNIQ" = x; then
12581    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12582  fi
12583
12584
12585
12586
12587
12588  # Publish this variable in the help.
12589
12590
12591  if [ -z "${WC+x}" ]; then
12592    # The variable is not set by user, try to locate tool using the code snippet
12593    for ac_prog in wc
12594do
12595  # Extract the first word of "$ac_prog", so it can be a program name with args.
12596set dummy $ac_prog; ac_word=$2
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12598$as_echo_n "checking for $ac_word... " >&6; }
12599if ${ac_cv_path_WC+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  case $WC in
12603  [\\/]* | ?:[\\/]*)
12604  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12605  ;;
12606  *)
12607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622  ;;
12623esac
12624fi
12625WC=$ac_cv_path_WC
12626if test -n "$WC"; then
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12628$as_echo "$WC" >&6; }
12629else
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632fi
12633
12634
12635  test -n "$WC" && break
12636done
12637
12638  else
12639    # The variable is set, but is it from the command line or the environment?
12640
12641    # Try to remove the string !WC! from our list.
12642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12644      # If it failed, the variable was not from the command line. Ignore it,
12645      # but warn the user (except for BASH, which is always set by the calling BASH).
12646      if test "xWC" != xBASH; then
12647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12648$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12649      fi
12650      # Try to locate tool using the code snippet
12651      for ac_prog in wc
12652do
12653  # Extract the first word of "$ac_prog", so it can be a program name with args.
12654set dummy $ac_prog; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_WC+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $WC in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683WC=$ac_cv_path_WC
12684if test -n "$WC"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12686$as_echo "$WC" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693  test -n "$WC" && break
12694done
12695
12696    else
12697      # If it succeeded, then it was overridden by the user. We will use it
12698      # for the tool.
12699
12700      # First remove it from the list of overridden variables, so we can test
12701      # for unknown variables in the end.
12702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12703
12704      # Check if we try to supply an empty value
12705      if test "x$WC" = x; then
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12707$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12709$as_echo_n "checking for WC... " >&6; }
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12711$as_echo "disabled" >&6; }
12712      else
12713        # Check if the provided tool contains a complete path.
12714        tool_specified="$WC"
12715        tool_basename="${tool_specified##*/}"
12716        if test "x$tool_basename" = "x$tool_specified"; then
12717          # A command without a complete path is provided, search $PATH.
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12719$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12720          # Extract the first word of "$tool_basename", so it can be a program name with args.
12721set dummy $tool_basename; ac_word=$2
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12723$as_echo_n "checking for $ac_word... " >&6; }
12724if ${ac_cv_path_WC+:} false; then :
12725  $as_echo_n "(cached) " >&6
12726else
12727  case $WC in
12728  [\\/]* | ?:[\\/]*)
12729  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12730  ;;
12731  *)
12732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12733for as_dir in $PATH
12734do
12735  IFS=$as_save_IFS
12736  test -z "$as_dir" && as_dir=.
12737    for ac_exec_ext in '' $ac_executable_extensions; do
12738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12739    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12741    break 2
12742  fi
12743done
12744  done
12745IFS=$as_save_IFS
12746
12747  ;;
12748esac
12749fi
12750WC=$ac_cv_path_WC
12751if test -n "$WC"; then
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12753$as_echo "$WC" >&6; }
12754else
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12756$as_echo "no" >&6; }
12757fi
12758
12759
12760          if test "x$WC" = x; then
12761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12762          fi
12763        else
12764          # Otherwise we believe it is a complete path. Use it as it is.
12765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12766$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12768$as_echo_n "checking for WC... " >&6; }
12769          if test ! -x "$tool_specified"; then
12770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12771$as_echo "not found" >&6; }
12772            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12773          fi
12774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12775$as_echo "$tool_specified" >&6; }
12776        fi
12777      fi
12778    fi
12779
12780  fi
12781
12782
12783
12784  if test "x$WC" = x; then
12785    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12786  fi
12787
12788
12789
12790
12791
12792  # Publish this variable in the help.
12793
12794
12795  if [ -z "${WHICH+x}" ]; then
12796    # The variable is not set by user, try to locate tool using the code snippet
12797    for ac_prog in which
12798do
12799  # Extract the first word of "$ac_prog", so it can be a program name with args.
12800set dummy $ac_prog; ac_word=$2
12801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12802$as_echo_n "checking for $ac_word... " >&6; }
12803if ${ac_cv_path_WHICH+:} false; then :
12804  $as_echo_n "(cached) " >&6
12805else
12806  case $WHICH in
12807  [\\/]* | ?:[\\/]*)
12808  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12809  ;;
12810  *)
12811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12812for as_dir in $PATH
12813do
12814  IFS=$as_save_IFS
12815  test -z "$as_dir" && as_dir=.
12816    for ac_exec_ext in '' $ac_executable_extensions; do
12817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12818    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12820    break 2
12821  fi
12822done
12823  done
12824IFS=$as_save_IFS
12825
12826  ;;
12827esac
12828fi
12829WHICH=$ac_cv_path_WHICH
12830if test -n "$WHICH"; then
12831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12832$as_echo "$WHICH" >&6; }
12833else
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12835$as_echo "no" >&6; }
12836fi
12837
12838
12839  test -n "$WHICH" && break
12840done
12841
12842  else
12843    # The variable is set, but is it from the command line or the environment?
12844
12845    # Try to remove the string !WHICH! from our list.
12846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12848      # If it failed, the variable was not from the command line. Ignore it,
12849      # but warn the user (except for BASH, which is always set by the calling BASH).
12850      if test "xWHICH" != xBASH; then
12851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12852$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12853      fi
12854      # Try to locate tool using the code snippet
12855      for ac_prog in which
12856do
12857  # Extract the first word of "$ac_prog", so it can be a program name with args.
12858set dummy $ac_prog; ac_word=$2
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12860$as_echo_n "checking for $ac_word... " >&6; }
12861if ${ac_cv_path_WHICH+:} false; then :
12862  $as_echo_n "(cached) " >&6
12863else
12864  case $WHICH in
12865  [\\/]* | ?:[\\/]*)
12866  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12867  ;;
12868  *)
12869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12870for as_dir in $PATH
12871do
12872  IFS=$as_save_IFS
12873  test -z "$as_dir" && as_dir=.
12874    for ac_exec_ext in '' $ac_executable_extensions; do
12875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12876    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12878    break 2
12879  fi
12880done
12881  done
12882IFS=$as_save_IFS
12883
12884  ;;
12885esac
12886fi
12887WHICH=$ac_cv_path_WHICH
12888if test -n "$WHICH"; then
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12890$as_echo "$WHICH" >&6; }
12891else
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12893$as_echo "no" >&6; }
12894fi
12895
12896
12897  test -n "$WHICH" && break
12898done
12899
12900    else
12901      # If it succeeded, then it was overridden by the user. We will use it
12902      # for the tool.
12903
12904      # First remove it from the list of overridden variables, so we can test
12905      # for unknown variables in the end.
12906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12907
12908      # Check if we try to supply an empty value
12909      if test "x$WHICH" = x; then
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12911$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12913$as_echo_n "checking for WHICH... " >&6; }
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12915$as_echo "disabled" >&6; }
12916      else
12917        # Check if the provided tool contains a complete path.
12918        tool_specified="$WHICH"
12919        tool_basename="${tool_specified##*/}"
12920        if test "x$tool_basename" = "x$tool_specified"; then
12921          # A command without a complete path is provided, search $PATH.
12922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12923$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12924          # Extract the first word of "$tool_basename", so it can be a program name with args.
12925set dummy $tool_basename; ac_word=$2
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12927$as_echo_n "checking for $ac_word... " >&6; }
12928if ${ac_cv_path_WHICH+:} false; then :
12929  $as_echo_n "(cached) " >&6
12930else
12931  case $WHICH in
12932  [\\/]* | ?:[\\/]*)
12933  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12934  ;;
12935  *)
12936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12937for as_dir in $PATH
12938do
12939  IFS=$as_save_IFS
12940  test -z "$as_dir" && as_dir=.
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12943    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12945    break 2
12946  fi
12947done
12948  done
12949IFS=$as_save_IFS
12950
12951  ;;
12952esac
12953fi
12954WHICH=$ac_cv_path_WHICH
12955if test -n "$WHICH"; then
12956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12957$as_echo "$WHICH" >&6; }
12958else
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12960$as_echo "no" >&6; }
12961fi
12962
12963
12964          if test "x$WHICH" = x; then
12965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12966          fi
12967        else
12968          # Otherwise we believe it is a complete path. Use it as it is.
12969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12970$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12972$as_echo_n "checking for WHICH... " >&6; }
12973          if test ! -x "$tool_specified"; then
12974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12975$as_echo "not found" >&6; }
12976            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12977          fi
12978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12979$as_echo "$tool_specified" >&6; }
12980        fi
12981      fi
12982    fi
12983
12984  fi
12985
12986
12987
12988  if test "x$WHICH" = x; then
12989    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12990  fi
12991
12992
12993
12994
12995
12996  # Publish this variable in the help.
12997
12998
12999  if [ -z "${XARGS+x}" ]; then
13000    # The variable is not set by user, try to locate tool using the code snippet
13001    for ac_prog in xargs
13002do
13003  # Extract the first word of "$ac_prog", so it can be a program name with args.
13004set dummy $ac_prog; ac_word=$2
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13006$as_echo_n "checking for $ac_word... " >&6; }
13007if ${ac_cv_path_XARGS+:} false; then :
13008  $as_echo_n "(cached) " >&6
13009else
13010  case $XARGS in
13011  [\\/]* | ?:[\\/]*)
13012  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13013  ;;
13014  *)
13015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13016for as_dir in $PATH
13017do
13018  IFS=$as_save_IFS
13019  test -z "$as_dir" && as_dir=.
13020    for ac_exec_ext in '' $ac_executable_extensions; do
13021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13022    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13024    break 2
13025  fi
13026done
13027  done
13028IFS=$as_save_IFS
13029
13030  ;;
13031esac
13032fi
13033XARGS=$ac_cv_path_XARGS
13034if test -n "$XARGS"; then
13035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13036$as_echo "$XARGS" >&6; }
13037else
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13039$as_echo "no" >&6; }
13040fi
13041
13042
13043  test -n "$XARGS" && break
13044done
13045
13046  else
13047    # The variable is set, but is it from the command line or the environment?
13048
13049    # Try to remove the string !XARGS! from our list.
13050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13052      # If it failed, the variable was not from the command line. Ignore it,
13053      # but warn the user (except for BASH, which is always set by the calling BASH).
13054      if test "xXARGS" != xBASH; then
13055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13056$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13057      fi
13058      # Try to locate tool using the code snippet
13059      for ac_prog in xargs
13060do
13061  # Extract the first word of "$ac_prog", so it can be a program name with args.
13062set dummy $ac_prog; ac_word=$2
13063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13064$as_echo_n "checking for $ac_word... " >&6; }
13065if ${ac_cv_path_XARGS+:} false; then :
13066  $as_echo_n "(cached) " >&6
13067else
13068  case $XARGS in
13069  [\\/]* | ?:[\\/]*)
13070  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13071  ;;
13072  *)
13073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13074for as_dir in $PATH
13075do
13076  IFS=$as_save_IFS
13077  test -z "$as_dir" && as_dir=.
13078    for ac_exec_ext in '' $ac_executable_extensions; do
13079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13080    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13082    break 2
13083  fi
13084done
13085  done
13086IFS=$as_save_IFS
13087
13088  ;;
13089esac
13090fi
13091XARGS=$ac_cv_path_XARGS
13092if test -n "$XARGS"; then
13093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13094$as_echo "$XARGS" >&6; }
13095else
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097$as_echo "no" >&6; }
13098fi
13099
13100
13101  test -n "$XARGS" && break
13102done
13103
13104    else
13105      # If it succeeded, then it was overridden by the user. We will use it
13106      # for the tool.
13107
13108      # First remove it from the list of overridden variables, so we can test
13109      # for unknown variables in the end.
13110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13111
13112      # Check if we try to supply an empty value
13113      if test "x$XARGS" = x; then
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13115$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13117$as_echo_n "checking for XARGS... " >&6; }
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13119$as_echo "disabled" >&6; }
13120      else
13121        # Check if the provided tool contains a complete path.
13122        tool_specified="$XARGS"
13123        tool_basename="${tool_specified##*/}"
13124        if test "x$tool_basename" = "x$tool_specified"; then
13125          # A command without a complete path is provided, search $PATH.
13126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13127$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13128          # Extract the first word of "$tool_basename", so it can be a program name with args.
13129set dummy $tool_basename; ac_word=$2
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13131$as_echo_n "checking for $ac_word... " >&6; }
13132if ${ac_cv_path_XARGS+:} false; then :
13133  $as_echo_n "(cached) " >&6
13134else
13135  case $XARGS in
13136  [\\/]* | ?:[\\/]*)
13137  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13138  ;;
13139  *)
13140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13141for as_dir in $PATH
13142do
13143  IFS=$as_save_IFS
13144  test -z "$as_dir" && as_dir=.
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13147    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13149    break 2
13150  fi
13151done
13152  done
13153IFS=$as_save_IFS
13154
13155  ;;
13156esac
13157fi
13158XARGS=$ac_cv_path_XARGS
13159if test -n "$XARGS"; then
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13161$as_echo "$XARGS" >&6; }
13162else
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13164$as_echo "no" >&6; }
13165fi
13166
13167
13168          if test "x$XARGS" = x; then
13169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13170          fi
13171        else
13172          # Otherwise we believe it is a complete path. Use it as it is.
13173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13174$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13176$as_echo_n "checking for XARGS... " >&6; }
13177          if test ! -x "$tool_specified"; then
13178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13179$as_echo "not found" >&6; }
13180            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13181          fi
13182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13183$as_echo "$tool_specified" >&6; }
13184        fi
13185      fi
13186    fi
13187
13188  fi
13189
13190
13191
13192  if test "x$XARGS" = x; then
13193    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13194  fi
13195
13196
13197
13198  # Then required tools that require some special treatment.
13199
13200
13201  # Publish this variable in the help.
13202
13203
13204  if [ -z "${AWK+x}" ]; then
13205    # The variable is not set by user, try to locate tool using the code snippet
13206    for ac_prog in gawk mawk nawk awk
13207do
13208  # Extract the first word of "$ac_prog", so it can be a program name with args.
13209set dummy $ac_prog; ac_word=$2
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13211$as_echo_n "checking for $ac_word... " >&6; }
13212if ${ac_cv_prog_AWK+:} false; then :
13213  $as_echo_n "(cached) " >&6
13214else
13215  if test -n "$AWK"; then
13216  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13217else
13218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13219for as_dir in $PATH
13220do
13221  IFS=$as_save_IFS
13222  test -z "$as_dir" && as_dir=.
13223    for ac_exec_ext in '' $ac_executable_extensions; do
13224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13225    ac_cv_prog_AWK="$ac_prog"
13226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13227    break 2
13228  fi
13229done
13230  done
13231IFS=$as_save_IFS
13232
13233fi
13234fi
13235AWK=$ac_cv_prog_AWK
13236if test -n "$AWK"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13238$as_echo "$AWK" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$AWK" && break
13246done
13247
13248  else
13249    # The variable is set, but is it from the command line or the environment?
13250
13251    # Try to remove the string !AWK! from our list.
13252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13254      # If it failed, the variable was not from the command line. Ignore it,
13255      # but warn the user (except for BASH, which is always set by the calling BASH).
13256      if test "xAWK" != xBASH; then
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13258$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13259      fi
13260      # Try to locate tool using the code snippet
13261      for ac_prog in gawk mawk nawk awk
13262do
13263  # Extract the first word of "$ac_prog", so it can be a program name with args.
13264set dummy $ac_prog; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_prog_AWK+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  if test -n "$AWK"; then
13271  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13272else
13273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13274for as_dir in $PATH
13275do
13276  IFS=$as_save_IFS
13277  test -z "$as_dir" && as_dir=.
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13280    ac_cv_prog_AWK="$ac_prog"
13281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13282    break 2
13283  fi
13284done
13285  done
13286IFS=$as_save_IFS
13287
13288fi
13289fi
13290AWK=$ac_cv_prog_AWK
13291if test -n "$AWK"; then
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13293$as_echo "$AWK" >&6; }
13294else
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
13297fi
13298
13299
13300  test -n "$AWK" && break
13301done
13302
13303    else
13304      # If it succeeded, then it was overridden by the user. We will use it
13305      # for the tool.
13306
13307      # First remove it from the list of overridden variables, so we can test
13308      # for unknown variables in the end.
13309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13310
13311      # Check if we try to supply an empty value
13312      if test "x$AWK" = x; then
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13314$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13316$as_echo_n "checking for AWK... " >&6; }
13317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13318$as_echo "disabled" >&6; }
13319      else
13320        # Check if the provided tool contains a complete path.
13321        tool_specified="$AWK"
13322        tool_basename="${tool_specified##*/}"
13323        if test "x$tool_basename" = "x$tool_specified"; then
13324          # A command without a complete path is provided, search $PATH.
13325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13326$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13327          # Extract the first word of "$tool_basename", so it can be a program name with args.
13328set dummy $tool_basename; ac_word=$2
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13330$as_echo_n "checking for $ac_word... " >&6; }
13331if ${ac_cv_path_AWK+:} false; then :
13332  $as_echo_n "(cached) " >&6
13333else
13334  case $AWK in
13335  [\\/]* | ?:[\\/]*)
13336  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13337  ;;
13338  *)
13339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13340for as_dir in $PATH
13341do
13342  IFS=$as_save_IFS
13343  test -z "$as_dir" && as_dir=.
13344    for ac_exec_ext in '' $ac_executable_extensions; do
13345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13346    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13348    break 2
13349  fi
13350done
13351  done
13352IFS=$as_save_IFS
13353
13354  ;;
13355esac
13356fi
13357AWK=$ac_cv_path_AWK
13358if test -n "$AWK"; then
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13360$as_echo "$AWK" >&6; }
13361else
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13363$as_echo "no" >&6; }
13364fi
13365
13366
13367          if test "x$AWK" = x; then
13368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13369          fi
13370        else
13371          # Otherwise we believe it is a complete path. Use it as it is.
13372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13373$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13375$as_echo_n "checking for AWK... " >&6; }
13376          if test ! -x "$tool_specified"; then
13377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13378$as_echo "not found" >&6; }
13379            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13380          fi
13381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13382$as_echo "$tool_specified" >&6; }
13383        fi
13384      fi
13385    fi
13386
13387  fi
13388
13389
13390  if test "x$AWK" = x; then
13391    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13392  fi
13393
13394
13395
13396
13397  # Publish this variable in the help.
13398
13399
13400  if [ -z "${GREP+x}" ]; then
13401    # The variable is not set by user, try to locate tool using the code snippet
13402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13403$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13404if ${ac_cv_path_GREP+:} false; then :
13405  $as_echo_n "(cached) " >&6
13406else
13407  if test -z "$GREP"; then
13408  ac_path_GREP_found=false
13409  # Loop through the user's path and test for each of PROGNAME-LIST
13410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13412do
13413  IFS=$as_save_IFS
13414  test -z "$as_dir" && as_dir=.
13415    for ac_prog in grep ggrep; do
13416    for ac_exec_ext in '' $ac_executable_extensions; do
13417      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13418      as_fn_executable_p "$ac_path_GREP" || continue
13419# Check for GNU ac_path_GREP and select it if it is found.
13420  # Check for GNU $ac_path_GREP
13421case `"$ac_path_GREP" --version 2>&1` in
13422*GNU*)
13423  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13424*)
13425  ac_count=0
13426  $as_echo_n 0123456789 >"conftest.in"
13427  while :
13428  do
13429    cat "conftest.in" "conftest.in" >"conftest.tmp"
13430    mv "conftest.tmp" "conftest.in"
13431    cp "conftest.in" "conftest.nl"
13432    $as_echo 'GREP' >> "conftest.nl"
13433    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13435    as_fn_arith $ac_count + 1 && ac_count=$as_val
13436    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13437      # Best one so far, save it but keep looking for a better one
13438      ac_cv_path_GREP="$ac_path_GREP"
13439      ac_path_GREP_max=$ac_count
13440    fi
13441    # 10*(2^10) chars as input seems more than enough
13442    test $ac_count -gt 10 && break
13443  done
13444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13445esac
13446
13447      $ac_path_GREP_found && break 3
13448    done
13449  done
13450  done
13451IFS=$as_save_IFS
13452  if test -z "$ac_cv_path_GREP"; then
13453    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13454  fi
13455else
13456  ac_cv_path_GREP=$GREP
13457fi
13458
13459fi
13460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13461$as_echo "$ac_cv_path_GREP" >&6; }
13462 GREP="$ac_cv_path_GREP"
13463
13464
13465  else
13466    # The variable is set, but is it from the command line or the environment?
13467
13468    # Try to remove the string !GREP! from our list.
13469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13471      # If it failed, the variable was not from the command line. Ignore it,
13472      # but warn the user (except for BASH, which is always set by the calling BASH).
13473      if test "xGREP" != xBASH; then
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13475$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13476      fi
13477      # Try to locate tool using the code snippet
13478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13479$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13480if ${ac_cv_path_GREP+:} false; then :
13481  $as_echo_n "(cached) " >&6
13482else
13483  if test -z "$GREP"; then
13484  ac_path_GREP_found=false
13485  # Loop through the user's path and test for each of PROGNAME-LIST
13486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13488do
13489  IFS=$as_save_IFS
13490  test -z "$as_dir" && as_dir=.
13491    for ac_prog in grep ggrep; do
13492    for ac_exec_ext in '' $ac_executable_extensions; do
13493      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13494      as_fn_executable_p "$ac_path_GREP" || continue
13495# Check for GNU ac_path_GREP and select it if it is found.
13496  # Check for GNU $ac_path_GREP
13497case `"$ac_path_GREP" --version 2>&1` in
13498*GNU*)
13499  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13500*)
13501  ac_count=0
13502  $as_echo_n 0123456789 >"conftest.in"
13503  while :
13504  do
13505    cat "conftest.in" "conftest.in" >"conftest.tmp"
13506    mv "conftest.tmp" "conftest.in"
13507    cp "conftest.in" "conftest.nl"
13508    $as_echo 'GREP' >> "conftest.nl"
13509    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13510    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13511    as_fn_arith $ac_count + 1 && ac_count=$as_val
13512    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13513      # Best one so far, save it but keep looking for a better one
13514      ac_cv_path_GREP="$ac_path_GREP"
13515      ac_path_GREP_max=$ac_count
13516    fi
13517    # 10*(2^10) chars as input seems more than enough
13518    test $ac_count -gt 10 && break
13519  done
13520  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13521esac
13522
13523      $ac_path_GREP_found && break 3
13524    done
13525  done
13526  done
13527IFS=$as_save_IFS
13528  if test -z "$ac_cv_path_GREP"; then
13529    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13530  fi
13531else
13532  ac_cv_path_GREP=$GREP
13533fi
13534
13535fi
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13537$as_echo "$ac_cv_path_GREP" >&6; }
13538 GREP="$ac_cv_path_GREP"
13539
13540
13541    else
13542      # If it succeeded, then it was overridden by the user. We will use it
13543      # for the tool.
13544
13545      # First remove it from the list of overridden variables, so we can test
13546      # for unknown variables in the end.
13547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13548
13549      # Check if we try to supply an empty value
13550      if test "x$GREP" = x; then
13551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13552$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13554$as_echo_n "checking for GREP... " >&6; }
13555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13556$as_echo "disabled" >&6; }
13557      else
13558        # Check if the provided tool contains a complete path.
13559        tool_specified="$GREP"
13560        tool_basename="${tool_specified##*/}"
13561        if test "x$tool_basename" = "x$tool_specified"; then
13562          # A command without a complete path is provided, search $PATH.
13563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13564$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13565          # Extract the first word of "$tool_basename", so it can be a program name with args.
13566set dummy $tool_basename; ac_word=$2
13567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13568$as_echo_n "checking for $ac_word... " >&6; }
13569if ${ac_cv_path_GREP+:} false; then :
13570  $as_echo_n "(cached) " >&6
13571else
13572  case $GREP in
13573  [\\/]* | ?:[\\/]*)
13574  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13575  ;;
13576  *)
13577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13578for as_dir in $PATH
13579do
13580  IFS=$as_save_IFS
13581  test -z "$as_dir" && as_dir=.
13582    for ac_exec_ext in '' $ac_executable_extensions; do
13583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13584    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13586    break 2
13587  fi
13588done
13589  done
13590IFS=$as_save_IFS
13591
13592  ;;
13593esac
13594fi
13595GREP=$ac_cv_path_GREP
13596if test -n "$GREP"; then
13597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13598$as_echo "$GREP" >&6; }
13599else
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
13602fi
13603
13604
13605          if test "x$GREP" = x; then
13606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13607          fi
13608        else
13609          # Otherwise we believe it is a complete path. Use it as it is.
13610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13611$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13613$as_echo_n "checking for GREP... " >&6; }
13614          if test ! -x "$tool_specified"; then
13615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13616$as_echo "not found" >&6; }
13617            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13618          fi
13619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13620$as_echo "$tool_specified" >&6; }
13621        fi
13622      fi
13623    fi
13624
13625  fi
13626
13627
13628  if test "x$GREP" = x; then
13629    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13630  fi
13631
13632
13633
13634
13635  # Publish this variable in the help.
13636
13637
13638  if [ -z "${EGREP+x}" ]; then
13639    # The variable is not set by user, try to locate tool using the code snippet
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13641$as_echo_n "checking for egrep... " >&6; }
13642if ${ac_cv_path_EGREP+:} false; then :
13643  $as_echo_n "(cached) " >&6
13644else
13645  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13646   then ac_cv_path_EGREP="$GREP -E"
13647   else
13648     if test -z "$EGREP"; then
13649  ac_path_EGREP_found=false
13650  # Loop through the user's path and test for each of PROGNAME-LIST
13651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13652for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13653do
13654  IFS=$as_save_IFS
13655  test -z "$as_dir" && as_dir=.
13656    for ac_prog in egrep; do
13657    for ac_exec_ext in '' $ac_executable_extensions; do
13658      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13659      as_fn_executable_p "$ac_path_EGREP" || continue
13660# Check for GNU ac_path_EGREP and select it if it is found.
13661  # Check for GNU $ac_path_EGREP
13662case `"$ac_path_EGREP" --version 2>&1` in
13663*GNU*)
13664  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13665*)
13666  ac_count=0
13667  $as_echo_n 0123456789 >"conftest.in"
13668  while :
13669  do
13670    cat "conftest.in" "conftest.in" >"conftest.tmp"
13671    mv "conftest.tmp" "conftest.in"
13672    cp "conftest.in" "conftest.nl"
13673    $as_echo 'EGREP' >> "conftest.nl"
13674    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13675    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13676    as_fn_arith $ac_count + 1 && ac_count=$as_val
13677    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13678      # Best one so far, save it but keep looking for a better one
13679      ac_cv_path_EGREP="$ac_path_EGREP"
13680      ac_path_EGREP_max=$ac_count
13681    fi
13682    # 10*(2^10) chars as input seems more than enough
13683    test $ac_count -gt 10 && break
13684  done
13685  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13686esac
13687
13688      $ac_path_EGREP_found && break 3
13689    done
13690  done
13691  done
13692IFS=$as_save_IFS
13693  if test -z "$ac_cv_path_EGREP"; then
13694    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13695  fi
13696else
13697  ac_cv_path_EGREP=$EGREP
13698fi
13699
13700   fi
13701fi
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13703$as_echo "$ac_cv_path_EGREP" >&6; }
13704 EGREP="$ac_cv_path_EGREP"
13705
13706
13707  else
13708    # The variable is set, but is it from the command line or the environment?
13709
13710    # Try to remove the string !EGREP! from our list.
13711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13713      # If it failed, the variable was not from the command line. Ignore it,
13714      # but warn the user (except for BASH, which is always set by the calling BASH).
13715      if test "xEGREP" != xBASH; then
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13717$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13718      fi
13719      # Try to locate tool using the code snippet
13720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13721$as_echo_n "checking for egrep... " >&6; }
13722if ${ac_cv_path_EGREP+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13726   then ac_cv_path_EGREP="$GREP -E"
13727   else
13728     if test -z "$EGREP"; then
13729  ac_path_EGREP_found=false
13730  # Loop through the user's path and test for each of PROGNAME-LIST
13731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13732for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13733do
13734  IFS=$as_save_IFS
13735  test -z "$as_dir" && as_dir=.
13736    for ac_prog in egrep; do
13737    for ac_exec_ext in '' $ac_executable_extensions; do
13738      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13739      as_fn_executable_p "$ac_path_EGREP" || continue
13740# Check for GNU ac_path_EGREP and select it if it is found.
13741  # Check for GNU $ac_path_EGREP
13742case `"$ac_path_EGREP" --version 2>&1` in
13743*GNU*)
13744  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13745*)
13746  ac_count=0
13747  $as_echo_n 0123456789 >"conftest.in"
13748  while :
13749  do
13750    cat "conftest.in" "conftest.in" >"conftest.tmp"
13751    mv "conftest.tmp" "conftest.in"
13752    cp "conftest.in" "conftest.nl"
13753    $as_echo 'EGREP' >> "conftest.nl"
13754    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13755    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13756    as_fn_arith $ac_count + 1 && ac_count=$as_val
13757    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13758      # Best one so far, save it but keep looking for a better one
13759      ac_cv_path_EGREP="$ac_path_EGREP"
13760      ac_path_EGREP_max=$ac_count
13761    fi
13762    # 10*(2^10) chars as input seems more than enough
13763    test $ac_count -gt 10 && break
13764  done
13765  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13766esac
13767
13768      $ac_path_EGREP_found && break 3
13769    done
13770  done
13771  done
13772IFS=$as_save_IFS
13773  if test -z "$ac_cv_path_EGREP"; then
13774    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13775  fi
13776else
13777  ac_cv_path_EGREP=$EGREP
13778fi
13779
13780   fi
13781fi
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13783$as_echo "$ac_cv_path_EGREP" >&6; }
13784 EGREP="$ac_cv_path_EGREP"
13785
13786
13787    else
13788      # If it succeeded, then it was overridden by the user. We will use it
13789      # for the tool.
13790
13791      # First remove it from the list of overridden variables, so we can test
13792      # for unknown variables in the end.
13793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13794
13795      # Check if we try to supply an empty value
13796      if test "x$EGREP" = x; then
13797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13798$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13800$as_echo_n "checking for EGREP... " >&6; }
13801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13802$as_echo "disabled" >&6; }
13803      else
13804        # Check if the provided tool contains a complete path.
13805        tool_specified="$EGREP"
13806        tool_basename="${tool_specified##*/}"
13807        if test "x$tool_basename" = "x$tool_specified"; then
13808          # A command without a complete path is provided, search $PATH.
13809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13810$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13811          # Extract the first word of "$tool_basename", so it can be a program name with args.
13812set dummy $tool_basename; ac_word=$2
13813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13814$as_echo_n "checking for $ac_word... " >&6; }
13815if ${ac_cv_path_EGREP+:} false; then :
13816  $as_echo_n "(cached) " >&6
13817else
13818  case $EGREP in
13819  [\\/]* | ?:[\\/]*)
13820  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13821  ;;
13822  *)
13823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13824for as_dir in $PATH
13825do
13826  IFS=$as_save_IFS
13827  test -z "$as_dir" && as_dir=.
13828    for ac_exec_ext in '' $ac_executable_extensions; do
13829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13830    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13832    break 2
13833  fi
13834done
13835  done
13836IFS=$as_save_IFS
13837
13838  ;;
13839esac
13840fi
13841EGREP=$ac_cv_path_EGREP
13842if test -n "$EGREP"; then
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13844$as_echo "$EGREP" >&6; }
13845else
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13847$as_echo "no" >&6; }
13848fi
13849
13850
13851          if test "x$EGREP" = x; then
13852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13853          fi
13854        else
13855          # Otherwise we believe it is a complete path. Use it as it is.
13856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13857$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13859$as_echo_n "checking for EGREP... " >&6; }
13860          if test ! -x "$tool_specified"; then
13861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13862$as_echo "not found" >&6; }
13863            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13864          fi
13865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13866$as_echo "$tool_specified" >&6; }
13867        fi
13868      fi
13869    fi
13870
13871  fi
13872
13873
13874  if test "x$EGREP" = x; then
13875    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13876  fi
13877
13878
13879
13880
13881  # Publish this variable in the help.
13882
13883
13884  if [ -z "${FGREP+x}" ]; then
13885    # The variable is not set by user, try to locate tool using the code snippet
13886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13887$as_echo_n "checking for fgrep... " >&6; }
13888if ${ac_cv_path_FGREP+:} false; then :
13889  $as_echo_n "(cached) " >&6
13890else
13891  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13892   then ac_cv_path_FGREP="$GREP -F"
13893   else
13894     if test -z "$FGREP"; then
13895  ac_path_FGREP_found=false
13896  # Loop through the user's path and test for each of PROGNAME-LIST
13897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13898for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13899do
13900  IFS=$as_save_IFS
13901  test -z "$as_dir" && as_dir=.
13902    for ac_prog in fgrep; do
13903    for ac_exec_ext in '' $ac_executable_extensions; do
13904      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13905      as_fn_executable_p "$ac_path_FGREP" || continue
13906# Check for GNU ac_path_FGREP and select it if it is found.
13907  # Check for GNU $ac_path_FGREP
13908case `"$ac_path_FGREP" --version 2>&1` in
13909*GNU*)
13910  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13911*)
13912  ac_count=0
13913  $as_echo_n 0123456789 >"conftest.in"
13914  while :
13915  do
13916    cat "conftest.in" "conftest.in" >"conftest.tmp"
13917    mv "conftest.tmp" "conftest.in"
13918    cp "conftest.in" "conftest.nl"
13919    $as_echo 'FGREP' >> "conftest.nl"
13920    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13921    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13922    as_fn_arith $ac_count + 1 && ac_count=$as_val
13923    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13924      # Best one so far, save it but keep looking for a better one
13925      ac_cv_path_FGREP="$ac_path_FGREP"
13926      ac_path_FGREP_max=$ac_count
13927    fi
13928    # 10*(2^10) chars as input seems more than enough
13929    test $ac_count -gt 10 && break
13930  done
13931  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13932esac
13933
13934      $ac_path_FGREP_found && break 3
13935    done
13936  done
13937  done
13938IFS=$as_save_IFS
13939  if test -z "$ac_cv_path_FGREP"; then
13940    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13941  fi
13942else
13943  ac_cv_path_FGREP=$FGREP
13944fi
13945
13946   fi
13947fi
13948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13949$as_echo "$ac_cv_path_FGREP" >&6; }
13950 FGREP="$ac_cv_path_FGREP"
13951
13952
13953  else
13954    # The variable is set, but is it from the command line or the environment?
13955
13956    # Try to remove the string !FGREP! from our list.
13957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13959      # If it failed, the variable was not from the command line. Ignore it,
13960      # but warn the user (except for BASH, which is always set by the calling BASH).
13961      if test "xFGREP" != xBASH; then
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13963$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13964      fi
13965      # Try to locate tool using the code snippet
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13967$as_echo_n "checking for fgrep... " >&6; }
13968if ${ac_cv_path_FGREP+:} false; then :
13969  $as_echo_n "(cached) " >&6
13970else
13971  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13972   then ac_cv_path_FGREP="$GREP -F"
13973   else
13974     if test -z "$FGREP"; then
13975  ac_path_FGREP_found=false
13976  # Loop through the user's path and test for each of PROGNAME-LIST
13977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13978for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13979do
13980  IFS=$as_save_IFS
13981  test -z "$as_dir" && as_dir=.
13982    for ac_prog in fgrep; do
13983    for ac_exec_ext in '' $ac_executable_extensions; do
13984      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13985      as_fn_executable_p "$ac_path_FGREP" || continue
13986# Check for GNU ac_path_FGREP and select it if it is found.
13987  # Check for GNU $ac_path_FGREP
13988case `"$ac_path_FGREP" --version 2>&1` in
13989*GNU*)
13990  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13991*)
13992  ac_count=0
13993  $as_echo_n 0123456789 >"conftest.in"
13994  while :
13995  do
13996    cat "conftest.in" "conftest.in" >"conftest.tmp"
13997    mv "conftest.tmp" "conftest.in"
13998    cp "conftest.in" "conftest.nl"
13999    $as_echo 'FGREP' >> "conftest.nl"
14000    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14001    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14002    as_fn_arith $ac_count + 1 && ac_count=$as_val
14003    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14004      # Best one so far, save it but keep looking for a better one
14005      ac_cv_path_FGREP="$ac_path_FGREP"
14006      ac_path_FGREP_max=$ac_count
14007    fi
14008    # 10*(2^10) chars as input seems more than enough
14009    test $ac_count -gt 10 && break
14010  done
14011  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14012esac
14013
14014      $ac_path_FGREP_found && break 3
14015    done
14016  done
14017  done
14018IFS=$as_save_IFS
14019  if test -z "$ac_cv_path_FGREP"; then
14020    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14021  fi
14022else
14023  ac_cv_path_FGREP=$FGREP
14024fi
14025
14026   fi
14027fi
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14029$as_echo "$ac_cv_path_FGREP" >&6; }
14030 FGREP="$ac_cv_path_FGREP"
14031
14032
14033    else
14034      # If it succeeded, then it was overridden by the user. We will use it
14035      # for the tool.
14036
14037      # First remove it from the list of overridden variables, so we can test
14038      # for unknown variables in the end.
14039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14040
14041      # Check if we try to supply an empty value
14042      if test "x$FGREP" = x; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14044$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14046$as_echo_n "checking for FGREP... " >&6; }
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14048$as_echo "disabled" >&6; }
14049      else
14050        # Check if the provided tool contains a complete path.
14051        tool_specified="$FGREP"
14052        tool_basename="${tool_specified##*/}"
14053        if test "x$tool_basename" = "x$tool_specified"; then
14054          # A command without a complete path is provided, search $PATH.
14055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14056$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14057          # Extract the first word of "$tool_basename", so it can be a program name with args.
14058set dummy $tool_basename; ac_word=$2
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14060$as_echo_n "checking for $ac_word... " >&6; }
14061if ${ac_cv_path_FGREP+:} false; then :
14062  $as_echo_n "(cached) " >&6
14063else
14064  case $FGREP in
14065  [\\/]* | ?:[\\/]*)
14066  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14067  ;;
14068  *)
14069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14070for as_dir in $PATH
14071do
14072  IFS=$as_save_IFS
14073  test -z "$as_dir" && as_dir=.
14074    for ac_exec_ext in '' $ac_executable_extensions; do
14075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14076    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14078    break 2
14079  fi
14080done
14081  done
14082IFS=$as_save_IFS
14083
14084  ;;
14085esac
14086fi
14087FGREP=$ac_cv_path_FGREP
14088if test -n "$FGREP"; then
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14090$as_echo "$FGREP" >&6; }
14091else
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14093$as_echo "no" >&6; }
14094fi
14095
14096
14097          if test "x$FGREP" = x; then
14098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14099          fi
14100        else
14101          # Otherwise we believe it is a complete path. Use it as it is.
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14103$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14105$as_echo_n "checking for FGREP... " >&6; }
14106          if test ! -x "$tool_specified"; then
14107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14108$as_echo "not found" >&6; }
14109            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14110          fi
14111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14112$as_echo "$tool_specified" >&6; }
14113        fi
14114      fi
14115    fi
14116
14117  fi
14118
14119
14120  if test "x$FGREP" = x; then
14121    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14122  fi
14123
14124
14125
14126
14127  # Publish this variable in the help.
14128
14129
14130  if [ -z "${SED+x}" ]; then
14131    # The variable is not set by user, try to locate tool using the code snippet
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14133$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14134if ${ac_cv_path_SED+:} false; then :
14135  $as_echo_n "(cached) " >&6
14136else
14137            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14138     for ac_i in 1 2 3 4 5 6 7; do
14139       ac_script="$ac_script$as_nl$ac_script"
14140     done
14141     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14142     { ac_script=; unset ac_script;}
14143     if test -z "$SED"; then
14144  ac_path_SED_found=false
14145  # Loop through the user's path and test for each of PROGNAME-LIST
14146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14147for as_dir in $PATH
14148do
14149  IFS=$as_save_IFS
14150  test -z "$as_dir" && as_dir=.
14151    for ac_prog in sed gsed; do
14152    for ac_exec_ext in '' $ac_executable_extensions; do
14153      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14154      as_fn_executable_p "$ac_path_SED" || continue
14155# Check for GNU ac_path_SED and select it if it is found.
14156  # Check for GNU $ac_path_SED
14157case `"$ac_path_SED" --version 2>&1` in
14158*GNU*)
14159  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14160*)
14161  ac_count=0
14162  $as_echo_n 0123456789 >"conftest.in"
14163  while :
14164  do
14165    cat "conftest.in" "conftest.in" >"conftest.tmp"
14166    mv "conftest.tmp" "conftest.in"
14167    cp "conftest.in" "conftest.nl"
14168    $as_echo '' >> "conftest.nl"
14169    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14170    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14171    as_fn_arith $ac_count + 1 && ac_count=$as_val
14172    if test $ac_count -gt ${ac_path_SED_max-0}; then
14173      # Best one so far, save it but keep looking for a better one
14174      ac_cv_path_SED="$ac_path_SED"
14175      ac_path_SED_max=$ac_count
14176    fi
14177    # 10*(2^10) chars as input seems more than enough
14178    test $ac_count -gt 10 && break
14179  done
14180  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14181esac
14182
14183      $ac_path_SED_found && break 3
14184    done
14185  done
14186  done
14187IFS=$as_save_IFS
14188  if test -z "$ac_cv_path_SED"; then
14189    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14190  fi
14191else
14192  ac_cv_path_SED=$SED
14193fi
14194
14195fi
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14197$as_echo "$ac_cv_path_SED" >&6; }
14198 SED="$ac_cv_path_SED"
14199  rm -f conftest.sed
14200
14201  else
14202    # The variable is set, but is it from the command line or the environment?
14203
14204    # Try to remove the string !SED! from our list.
14205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14207      # If it failed, the variable was not from the command line. Ignore it,
14208      # but warn the user (except for BASH, which is always set by the calling BASH).
14209      if test "xSED" != xBASH; then
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14211$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14212      fi
14213      # Try to locate tool using the code snippet
14214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14215$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14216if ${ac_cv_path_SED+:} false; then :
14217  $as_echo_n "(cached) " >&6
14218else
14219            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14220     for ac_i in 1 2 3 4 5 6 7; do
14221       ac_script="$ac_script$as_nl$ac_script"
14222     done
14223     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14224     { ac_script=; unset ac_script;}
14225     if test -z "$SED"; then
14226  ac_path_SED_found=false
14227  # Loop through the user's path and test for each of PROGNAME-LIST
14228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14229for as_dir in $PATH
14230do
14231  IFS=$as_save_IFS
14232  test -z "$as_dir" && as_dir=.
14233    for ac_prog in sed gsed; do
14234    for ac_exec_ext in '' $ac_executable_extensions; do
14235      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14236      as_fn_executable_p "$ac_path_SED" || continue
14237# Check for GNU ac_path_SED and select it if it is found.
14238  # Check for GNU $ac_path_SED
14239case `"$ac_path_SED" --version 2>&1` in
14240*GNU*)
14241  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14242*)
14243  ac_count=0
14244  $as_echo_n 0123456789 >"conftest.in"
14245  while :
14246  do
14247    cat "conftest.in" "conftest.in" >"conftest.tmp"
14248    mv "conftest.tmp" "conftest.in"
14249    cp "conftest.in" "conftest.nl"
14250    $as_echo '' >> "conftest.nl"
14251    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14252    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14253    as_fn_arith $ac_count + 1 && ac_count=$as_val
14254    if test $ac_count -gt ${ac_path_SED_max-0}; then
14255      # Best one so far, save it but keep looking for a better one
14256      ac_cv_path_SED="$ac_path_SED"
14257      ac_path_SED_max=$ac_count
14258    fi
14259    # 10*(2^10) chars as input seems more than enough
14260    test $ac_count -gt 10 && break
14261  done
14262  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14263esac
14264
14265      $ac_path_SED_found && break 3
14266    done
14267  done
14268  done
14269IFS=$as_save_IFS
14270  if test -z "$ac_cv_path_SED"; then
14271    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14272  fi
14273else
14274  ac_cv_path_SED=$SED
14275fi
14276
14277fi
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14279$as_echo "$ac_cv_path_SED" >&6; }
14280 SED="$ac_cv_path_SED"
14281  rm -f conftest.sed
14282
14283    else
14284      # If it succeeded, then it was overridden by the user. We will use it
14285      # for the tool.
14286
14287      # First remove it from the list of overridden variables, so we can test
14288      # for unknown variables in the end.
14289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14290
14291      # Check if we try to supply an empty value
14292      if test "x$SED" = x; then
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14294$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14296$as_echo_n "checking for SED... " >&6; }
14297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14298$as_echo "disabled" >&6; }
14299      else
14300        # Check if the provided tool contains a complete path.
14301        tool_specified="$SED"
14302        tool_basename="${tool_specified##*/}"
14303        if test "x$tool_basename" = "x$tool_specified"; then
14304          # A command without a complete path is provided, search $PATH.
14305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14306$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14307          # Extract the first word of "$tool_basename", so it can be a program name with args.
14308set dummy $tool_basename; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_SED+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $SED in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337SED=$ac_cv_path_SED
14338if test -n "$SED"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14340$as_echo "$SED" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347          if test "x$SED" = x; then
14348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14349          fi
14350        else
14351          # Otherwise we believe it is a complete path. Use it as it is.
14352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14353$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14355$as_echo_n "checking for SED... " >&6; }
14356          if test ! -x "$tool_specified"; then
14357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14358$as_echo "not found" >&6; }
14359            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14360          fi
14361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14362$as_echo "$tool_specified" >&6; }
14363        fi
14364      fi
14365    fi
14366
14367  fi
14368
14369
14370  if test "x$SED" = x; then
14371    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14372  fi
14373
14374
14375
14376  # Always force rm.
14377  RM="$RM -f"
14378
14379  # pwd behaves differently on various platforms and some don't support the -L flag.
14380  # Always use the bash builtin pwd to get uniform behavior.
14381  THEPWDCMD=pwd
14382
14383  # These are not required on all platforms
14384
14385
14386  # Publish this variable in the help.
14387
14388
14389  if [ -z "${CYGPATH+x}" ]; then
14390    # The variable is not set by user, try to locate tool using the code snippet
14391    for ac_prog in cygpath
14392do
14393  # Extract the first word of "$ac_prog", so it can be a program name with args.
14394set dummy $ac_prog; ac_word=$2
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14396$as_echo_n "checking for $ac_word... " >&6; }
14397if ${ac_cv_path_CYGPATH+:} false; then :
14398  $as_echo_n "(cached) " >&6
14399else
14400  case $CYGPATH in
14401  [\\/]* | ?:[\\/]*)
14402  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14403  ;;
14404  *)
14405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14406for as_dir in $PATH
14407do
14408  IFS=$as_save_IFS
14409  test -z "$as_dir" && as_dir=.
14410    for ac_exec_ext in '' $ac_executable_extensions; do
14411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14412    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14414    break 2
14415  fi
14416done
14417  done
14418IFS=$as_save_IFS
14419
14420  ;;
14421esac
14422fi
14423CYGPATH=$ac_cv_path_CYGPATH
14424if test -n "$CYGPATH"; then
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14426$as_echo "$CYGPATH" >&6; }
14427else
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14429$as_echo "no" >&6; }
14430fi
14431
14432
14433  test -n "$CYGPATH" && break
14434done
14435
14436  else
14437    # The variable is set, but is it from the command line or the environment?
14438
14439    # Try to remove the string !CYGPATH! from our list.
14440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14442      # If it failed, the variable was not from the command line. Ignore it,
14443      # but warn the user (except for BASH, which is always set by the calling BASH).
14444      if test "xCYGPATH" != xBASH; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14446$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14447      fi
14448      # Try to locate tool using the code snippet
14449      for ac_prog in cygpath
14450do
14451  # Extract the first word of "$ac_prog", so it can be a program name with args.
14452set dummy $ac_prog; ac_word=$2
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14454$as_echo_n "checking for $ac_word... " >&6; }
14455if ${ac_cv_path_CYGPATH+:} false; then :
14456  $as_echo_n "(cached) " >&6
14457else
14458  case $CYGPATH in
14459  [\\/]* | ?:[\\/]*)
14460  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14461  ;;
14462  *)
14463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14464for as_dir in $PATH
14465do
14466  IFS=$as_save_IFS
14467  test -z "$as_dir" && as_dir=.
14468    for ac_exec_ext in '' $ac_executable_extensions; do
14469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14470    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14472    break 2
14473  fi
14474done
14475  done
14476IFS=$as_save_IFS
14477
14478  ;;
14479esac
14480fi
14481CYGPATH=$ac_cv_path_CYGPATH
14482if test -n "$CYGPATH"; then
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14484$as_echo "$CYGPATH" >&6; }
14485else
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14487$as_echo "no" >&6; }
14488fi
14489
14490
14491  test -n "$CYGPATH" && break
14492done
14493
14494    else
14495      # If it succeeded, then it was overridden by the user. We will use it
14496      # for the tool.
14497
14498      # First remove it from the list of overridden variables, so we can test
14499      # for unknown variables in the end.
14500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14501
14502      # Check if we try to supply an empty value
14503      if test "x$CYGPATH" = x; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14505$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14507$as_echo_n "checking for CYGPATH... " >&6; }
14508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14509$as_echo "disabled" >&6; }
14510      else
14511        # Check if the provided tool contains a complete path.
14512        tool_specified="$CYGPATH"
14513        tool_basename="${tool_specified##*/}"
14514        if test "x$tool_basename" = "x$tool_specified"; then
14515          # A command without a complete path is provided, search $PATH.
14516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14517$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14518          # Extract the first word of "$tool_basename", so it can be a program name with args.
14519set dummy $tool_basename; ac_word=$2
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14521$as_echo_n "checking for $ac_word... " >&6; }
14522if ${ac_cv_path_CYGPATH+:} false; then :
14523  $as_echo_n "(cached) " >&6
14524else
14525  case $CYGPATH in
14526  [\\/]* | ?:[\\/]*)
14527  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14528  ;;
14529  *)
14530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14531for as_dir in $PATH
14532do
14533  IFS=$as_save_IFS
14534  test -z "$as_dir" && as_dir=.
14535    for ac_exec_ext in '' $ac_executable_extensions; do
14536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14537    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14539    break 2
14540  fi
14541done
14542  done
14543IFS=$as_save_IFS
14544
14545  ;;
14546esac
14547fi
14548CYGPATH=$ac_cv_path_CYGPATH
14549if test -n "$CYGPATH"; then
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14551$as_echo "$CYGPATH" >&6; }
14552else
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14554$as_echo "no" >&6; }
14555fi
14556
14557
14558          if test "x$CYGPATH" = x; then
14559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14560          fi
14561        else
14562          # Otherwise we believe it is a complete path. Use it as it is.
14563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14564$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14566$as_echo_n "checking for CYGPATH... " >&6; }
14567          if test ! -x "$tool_specified"; then
14568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14569$as_echo "not found" >&6; }
14570            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14571          fi
14572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14573$as_echo "$tool_specified" >&6; }
14574        fi
14575      fi
14576    fi
14577
14578  fi
14579
14580
14581
14582
14583  # Publish this variable in the help.
14584
14585
14586  if [ -z "${READLINK+x}" ]; then
14587    # The variable is not set by user, try to locate tool using the code snippet
14588    for ac_prog in greadlink readlink
14589do
14590  # Extract the first word of "$ac_prog", so it can be a program name with args.
14591set dummy $ac_prog; ac_word=$2
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14593$as_echo_n "checking for $ac_word... " >&6; }
14594if ${ac_cv_path_READLINK+:} false; then :
14595  $as_echo_n "(cached) " >&6
14596else
14597  case $READLINK in
14598  [\\/]* | ?:[\\/]*)
14599  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14600  ;;
14601  *)
14602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14603for as_dir in $PATH
14604do
14605  IFS=$as_save_IFS
14606  test -z "$as_dir" && as_dir=.
14607    for ac_exec_ext in '' $ac_executable_extensions; do
14608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14609    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14611    break 2
14612  fi
14613done
14614  done
14615IFS=$as_save_IFS
14616
14617  ;;
14618esac
14619fi
14620READLINK=$ac_cv_path_READLINK
14621if test -n "$READLINK"; then
14622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14623$as_echo "$READLINK" >&6; }
14624else
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14626$as_echo "no" >&6; }
14627fi
14628
14629
14630  test -n "$READLINK" && break
14631done
14632
14633  else
14634    # The variable is set, but is it from the command line or the environment?
14635
14636    # Try to remove the string !READLINK! from our list.
14637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14639      # If it failed, the variable was not from the command line. Ignore it,
14640      # but warn the user (except for BASH, which is always set by the calling BASH).
14641      if test "xREADLINK" != xBASH; then
14642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14643$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14644      fi
14645      # Try to locate tool using the code snippet
14646      for ac_prog in greadlink readlink
14647do
14648  # Extract the first word of "$ac_prog", so it can be a program name with args.
14649set dummy $ac_prog; ac_word=$2
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14651$as_echo_n "checking for $ac_word... " >&6; }
14652if ${ac_cv_path_READLINK+:} false; then :
14653  $as_echo_n "(cached) " >&6
14654else
14655  case $READLINK in
14656  [\\/]* | ?:[\\/]*)
14657  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14658  ;;
14659  *)
14660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14661for as_dir in $PATH
14662do
14663  IFS=$as_save_IFS
14664  test -z "$as_dir" && as_dir=.
14665    for ac_exec_ext in '' $ac_executable_extensions; do
14666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14667    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14669    break 2
14670  fi
14671done
14672  done
14673IFS=$as_save_IFS
14674
14675  ;;
14676esac
14677fi
14678READLINK=$ac_cv_path_READLINK
14679if test -n "$READLINK"; then
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14681$as_echo "$READLINK" >&6; }
14682else
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14684$as_echo "no" >&6; }
14685fi
14686
14687
14688  test -n "$READLINK" && break
14689done
14690
14691    else
14692      # If it succeeded, then it was overridden by the user. We will use it
14693      # for the tool.
14694
14695      # First remove it from the list of overridden variables, so we can test
14696      # for unknown variables in the end.
14697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14698
14699      # Check if we try to supply an empty value
14700      if test "x$READLINK" = x; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14702$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14704$as_echo_n "checking for READLINK... " >&6; }
14705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14706$as_echo "disabled" >&6; }
14707      else
14708        # Check if the provided tool contains a complete path.
14709        tool_specified="$READLINK"
14710        tool_basename="${tool_specified##*/}"
14711        if test "x$tool_basename" = "x$tool_specified"; then
14712          # A command without a complete path is provided, search $PATH.
14713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14714$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14715          # Extract the first word of "$tool_basename", so it can be a program name with args.
14716set dummy $tool_basename; ac_word=$2
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14718$as_echo_n "checking for $ac_word... " >&6; }
14719if ${ac_cv_path_READLINK+:} false; then :
14720  $as_echo_n "(cached) " >&6
14721else
14722  case $READLINK in
14723  [\\/]* | ?:[\\/]*)
14724  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14725  ;;
14726  *)
14727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14728for as_dir in $PATH
14729do
14730  IFS=$as_save_IFS
14731  test -z "$as_dir" && as_dir=.
14732    for ac_exec_ext in '' $ac_executable_extensions; do
14733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14734    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14736    break 2
14737  fi
14738done
14739  done
14740IFS=$as_save_IFS
14741
14742  ;;
14743esac
14744fi
14745READLINK=$ac_cv_path_READLINK
14746if test -n "$READLINK"; then
14747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14748$as_echo "$READLINK" >&6; }
14749else
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14751$as_echo "no" >&6; }
14752fi
14753
14754
14755          if test "x$READLINK" = x; then
14756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14757          fi
14758        else
14759          # Otherwise we believe it is a complete path. Use it as it is.
14760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14761$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14763$as_echo_n "checking for READLINK... " >&6; }
14764          if test ! -x "$tool_specified"; then
14765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14766$as_echo "not found" >&6; }
14767            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14768          fi
14769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14770$as_echo "$tool_specified" >&6; }
14771        fi
14772      fi
14773    fi
14774
14775  fi
14776
14777
14778
14779
14780  # Publish this variable in the help.
14781
14782
14783  if [ -z "${DF+x}" ]; then
14784    # The variable is not set by user, try to locate tool using the code snippet
14785    for ac_prog in df
14786do
14787  # Extract the first word of "$ac_prog", so it can be a program name with args.
14788set dummy $ac_prog; ac_word=$2
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14790$as_echo_n "checking for $ac_word... " >&6; }
14791if ${ac_cv_path_DF+:} false; then :
14792  $as_echo_n "(cached) " >&6
14793else
14794  case $DF in
14795  [\\/]* | ?:[\\/]*)
14796  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14797  ;;
14798  *)
14799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14800for as_dir in $PATH
14801do
14802  IFS=$as_save_IFS
14803  test -z "$as_dir" && as_dir=.
14804    for ac_exec_ext in '' $ac_executable_extensions; do
14805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14806    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14808    break 2
14809  fi
14810done
14811  done
14812IFS=$as_save_IFS
14813
14814  ;;
14815esac
14816fi
14817DF=$ac_cv_path_DF
14818if test -n "$DF"; then
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14820$as_echo "$DF" >&6; }
14821else
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14823$as_echo "no" >&6; }
14824fi
14825
14826
14827  test -n "$DF" && break
14828done
14829
14830  else
14831    # The variable is set, but is it from the command line or the environment?
14832
14833    # Try to remove the string !DF! from our list.
14834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14836      # If it failed, the variable was not from the command line. Ignore it,
14837      # but warn the user (except for BASH, which is always set by the calling BASH).
14838      if test "xDF" != xBASH; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14840$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14841      fi
14842      # Try to locate tool using the code snippet
14843      for ac_prog in df
14844do
14845  # Extract the first word of "$ac_prog", so it can be a program name with args.
14846set dummy $ac_prog; ac_word=$2
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14848$as_echo_n "checking for $ac_word... " >&6; }
14849if ${ac_cv_path_DF+:} false; then :
14850  $as_echo_n "(cached) " >&6
14851else
14852  case $DF in
14853  [\\/]* | ?:[\\/]*)
14854  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14855  ;;
14856  *)
14857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14858for as_dir in $PATH
14859do
14860  IFS=$as_save_IFS
14861  test -z "$as_dir" && as_dir=.
14862    for ac_exec_ext in '' $ac_executable_extensions; do
14863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14864    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14866    break 2
14867  fi
14868done
14869  done
14870IFS=$as_save_IFS
14871
14872  ;;
14873esac
14874fi
14875DF=$ac_cv_path_DF
14876if test -n "$DF"; then
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14878$as_echo "$DF" >&6; }
14879else
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14881$as_echo "no" >&6; }
14882fi
14883
14884
14885  test -n "$DF" && break
14886done
14887
14888    else
14889      # If it succeeded, then it was overridden by the user. We will use it
14890      # for the tool.
14891
14892      # First remove it from the list of overridden variables, so we can test
14893      # for unknown variables in the end.
14894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14895
14896      # Check if we try to supply an empty value
14897      if test "x$DF" = x; then
14898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14899$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14901$as_echo_n "checking for DF... " >&6; }
14902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14903$as_echo "disabled" >&6; }
14904      else
14905        # Check if the provided tool contains a complete path.
14906        tool_specified="$DF"
14907        tool_basename="${tool_specified##*/}"
14908        if test "x$tool_basename" = "x$tool_specified"; then
14909          # A command without a complete path is provided, search $PATH.
14910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14911$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14912          # Extract the first word of "$tool_basename", so it can be a program name with args.
14913set dummy $tool_basename; ac_word=$2
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14915$as_echo_n "checking for $ac_word... " >&6; }
14916if ${ac_cv_path_DF+:} false; then :
14917  $as_echo_n "(cached) " >&6
14918else
14919  case $DF in
14920  [\\/]* | ?:[\\/]*)
14921  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14922  ;;
14923  *)
14924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14925for as_dir in $PATH
14926do
14927  IFS=$as_save_IFS
14928  test -z "$as_dir" && as_dir=.
14929    for ac_exec_ext in '' $ac_executable_extensions; do
14930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14931    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14933    break 2
14934  fi
14935done
14936  done
14937IFS=$as_save_IFS
14938
14939  ;;
14940esac
14941fi
14942DF=$ac_cv_path_DF
14943if test -n "$DF"; then
14944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14945$as_echo "$DF" >&6; }
14946else
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14948$as_echo "no" >&6; }
14949fi
14950
14951
14952          if test "x$DF" = x; then
14953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14954          fi
14955        else
14956          # Otherwise we believe it is a complete path. Use it as it is.
14957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14958$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14960$as_echo_n "checking for DF... " >&6; }
14961          if test ! -x "$tool_specified"; then
14962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14963$as_echo "not found" >&6; }
14964            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14965          fi
14966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14967$as_echo "$tool_specified" >&6; }
14968        fi
14969      fi
14970    fi
14971
14972  fi
14973
14974
14975
14976
14977  # Publish this variable in the help.
14978
14979
14980  if [ -z "${CPIO+x}" ]; then
14981    # The variable is not set by user, try to locate tool using the code snippet
14982    for ac_prog in cpio bsdcpio
14983do
14984  # Extract the first word of "$ac_prog", so it can be a program name with args.
14985set dummy $ac_prog; ac_word=$2
14986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14987$as_echo_n "checking for $ac_word... " >&6; }
14988if ${ac_cv_path_CPIO+:} false; then :
14989  $as_echo_n "(cached) " >&6
14990else
14991  case $CPIO in
14992  [\\/]* | ?:[\\/]*)
14993  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14994  ;;
14995  *)
14996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14997for as_dir in $PATH
14998do
14999  IFS=$as_save_IFS
15000  test -z "$as_dir" && as_dir=.
15001    for ac_exec_ext in '' $ac_executable_extensions; do
15002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15003    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15005    break 2
15006  fi
15007done
15008  done
15009IFS=$as_save_IFS
15010
15011  ;;
15012esac
15013fi
15014CPIO=$ac_cv_path_CPIO
15015if test -n "$CPIO"; then
15016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15017$as_echo "$CPIO" >&6; }
15018else
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15020$as_echo "no" >&6; }
15021fi
15022
15023
15024  test -n "$CPIO" && break
15025done
15026
15027  else
15028    # The variable is set, but is it from the command line or the environment?
15029
15030    # Try to remove the string !CPIO! from our list.
15031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15033      # If it failed, the variable was not from the command line. Ignore it,
15034      # but warn the user (except for BASH, which is always set by the calling BASH).
15035      if test "xCPIO" != xBASH; then
15036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15037$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15038      fi
15039      # Try to locate tool using the code snippet
15040      for ac_prog in cpio bsdcpio
15041do
15042  # Extract the first word of "$ac_prog", so it can be a program name with args.
15043set dummy $ac_prog; ac_word=$2
15044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15045$as_echo_n "checking for $ac_word... " >&6; }
15046if ${ac_cv_path_CPIO+:} false; then :
15047  $as_echo_n "(cached) " >&6
15048else
15049  case $CPIO in
15050  [\\/]* | ?:[\\/]*)
15051  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15052  ;;
15053  *)
15054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15055for as_dir in $PATH
15056do
15057  IFS=$as_save_IFS
15058  test -z "$as_dir" && as_dir=.
15059    for ac_exec_ext in '' $ac_executable_extensions; do
15060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15061    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15063    break 2
15064  fi
15065done
15066  done
15067IFS=$as_save_IFS
15068
15069  ;;
15070esac
15071fi
15072CPIO=$ac_cv_path_CPIO
15073if test -n "$CPIO"; then
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15075$as_echo "$CPIO" >&6; }
15076else
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15078$as_echo "no" >&6; }
15079fi
15080
15081
15082  test -n "$CPIO" && break
15083done
15084
15085    else
15086      # If it succeeded, then it was overridden by the user. We will use it
15087      # for the tool.
15088
15089      # First remove it from the list of overridden variables, so we can test
15090      # for unknown variables in the end.
15091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15092
15093      # Check if we try to supply an empty value
15094      if test "x$CPIO" = x; then
15095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15096$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15098$as_echo_n "checking for CPIO... " >&6; }
15099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15100$as_echo "disabled" >&6; }
15101      else
15102        # Check if the provided tool contains a complete path.
15103        tool_specified="$CPIO"
15104        tool_basename="${tool_specified##*/}"
15105        if test "x$tool_basename" = "x$tool_specified"; then
15106          # A command without a complete path is provided, search $PATH.
15107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15108$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15109          # Extract the first word of "$tool_basename", so it can be a program name with args.
15110set dummy $tool_basename; ac_word=$2
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15112$as_echo_n "checking for $ac_word... " >&6; }
15113if ${ac_cv_path_CPIO+:} false; then :
15114  $as_echo_n "(cached) " >&6
15115else
15116  case $CPIO in
15117  [\\/]* | ?:[\\/]*)
15118  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15119  ;;
15120  *)
15121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15122for as_dir in $PATH
15123do
15124  IFS=$as_save_IFS
15125  test -z "$as_dir" && as_dir=.
15126    for ac_exec_ext in '' $ac_executable_extensions; do
15127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15128    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15130    break 2
15131  fi
15132done
15133  done
15134IFS=$as_save_IFS
15135
15136  ;;
15137esac
15138fi
15139CPIO=$ac_cv_path_CPIO
15140if test -n "$CPIO"; then
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15142$as_echo "$CPIO" >&6; }
15143else
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15145$as_echo "no" >&6; }
15146fi
15147
15148
15149          if test "x$CPIO" = x; then
15150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15151          fi
15152        else
15153          # Otherwise we believe it is a complete path. Use it as it is.
15154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15155$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15157$as_echo_n "checking for CPIO... " >&6; }
15158          if test ! -x "$tool_specified"; then
15159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15160$as_echo "not found" >&6; }
15161            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15162          fi
15163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15164$as_echo "$tool_specified" >&6; }
15165        fi
15166      fi
15167    fi
15168
15169  fi
15170
15171
15172
15173
15174  # Publish this variable in the help.
15175
15176
15177  if [ -z "${NICE+x}" ]; then
15178    # The variable is not set by user, try to locate tool using the code snippet
15179    for ac_prog in nice
15180do
15181  # Extract the first word of "$ac_prog", so it can be a program name with args.
15182set dummy $ac_prog; ac_word=$2
15183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15184$as_echo_n "checking for $ac_word... " >&6; }
15185if ${ac_cv_path_NICE+:} false; then :
15186  $as_echo_n "(cached) " >&6
15187else
15188  case $NICE in
15189  [\\/]* | ?:[\\/]*)
15190  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15191  ;;
15192  *)
15193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15194for as_dir in $PATH
15195do
15196  IFS=$as_save_IFS
15197  test -z "$as_dir" && as_dir=.
15198    for ac_exec_ext in '' $ac_executable_extensions; do
15199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15200    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15202    break 2
15203  fi
15204done
15205  done
15206IFS=$as_save_IFS
15207
15208  ;;
15209esac
15210fi
15211NICE=$ac_cv_path_NICE
15212if test -n "$NICE"; then
15213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15214$as_echo "$NICE" >&6; }
15215else
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15217$as_echo "no" >&6; }
15218fi
15219
15220
15221  test -n "$NICE" && break
15222done
15223
15224  else
15225    # The variable is set, but is it from the command line or the environment?
15226
15227    # Try to remove the string !NICE! from our list.
15228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15230      # If it failed, the variable was not from the command line. Ignore it,
15231      # but warn the user (except for BASH, which is always set by the calling BASH).
15232      if test "xNICE" != xBASH; then
15233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15234$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15235      fi
15236      # Try to locate tool using the code snippet
15237      for ac_prog in nice
15238do
15239  # Extract the first word of "$ac_prog", so it can be a program name with args.
15240set dummy $ac_prog; ac_word=$2
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15242$as_echo_n "checking for $ac_word... " >&6; }
15243if ${ac_cv_path_NICE+:} false; then :
15244  $as_echo_n "(cached) " >&6
15245else
15246  case $NICE in
15247  [\\/]* | ?:[\\/]*)
15248  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15249  ;;
15250  *)
15251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15252for as_dir in $PATH
15253do
15254  IFS=$as_save_IFS
15255  test -z "$as_dir" && as_dir=.
15256    for ac_exec_ext in '' $ac_executable_extensions; do
15257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15258    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15260    break 2
15261  fi
15262done
15263  done
15264IFS=$as_save_IFS
15265
15266  ;;
15267esac
15268fi
15269NICE=$ac_cv_path_NICE
15270if test -n "$NICE"; then
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15272$as_echo "$NICE" >&6; }
15273else
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15275$as_echo "no" >&6; }
15276fi
15277
15278
15279  test -n "$NICE" && break
15280done
15281
15282    else
15283      # If it succeeded, then it was overridden by the user. We will use it
15284      # for the tool.
15285
15286      # First remove it from the list of overridden variables, so we can test
15287      # for unknown variables in the end.
15288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15289
15290      # Check if we try to supply an empty value
15291      if test "x$NICE" = x; then
15292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15293$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15295$as_echo_n "checking for NICE... " >&6; }
15296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15297$as_echo "disabled" >&6; }
15298      else
15299        # Check if the provided tool contains a complete path.
15300        tool_specified="$NICE"
15301        tool_basename="${tool_specified##*/}"
15302        if test "x$tool_basename" = "x$tool_specified"; then
15303          # A command without a complete path is provided, search $PATH.
15304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15305$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15306          # Extract the first word of "$tool_basename", so it can be a program name with args.
15307set dummy $tool_basename; ac_word=$2
15308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15309$as_echo_n "checking for $ac_word... " >&6; }
15310if ${ac_cv_path_NICE+:} false; then :
15311  $as_echo_n "(cached) " >&6
15312else
15313  case $NICE in
15314  [\\/]* | ?:[\\/]*)
15315  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15316  ;;
15317  *)
15318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15319for as_dir in $PATH
15320do
15321  IFS=$as_save_IFS
15322  test -z "$as_dir" && as_dir=.
15323    for ac_exec_ext in '' $ac_executable_extensions; do
15324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15325    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15327    break 2
15328  fi
15329done
15330  done
15331IFS=$as_save_IFS
15332
15333  ;;
15334esac
15335fi
15336NICE=$ac_cv_path_NICE
15337if test -n "$NICE"; then
15338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15339$as_echo "$NICE" >&6; }
15340else
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15342$as_echo "no" >&6; }
15343fi
15344
15345
15346          if test "x$NICE" = x; then
15347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15348          fi
15349        else
15350          # Otherwise we believe it is a complete path. Use it as it is.
15351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15352$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15354$as_echo_n "checking for NICE... " >&6; }
15355          if test ! -x "$tool_specified"; then
15356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15357$as_echo "not found" >&6; }
15358            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15359          fi
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15361$as_echo "$tool_specified" >&6; }
15362        fi
15363      fi
15364    fi
15365
15366  fi
15367
15368
15369
15370
15371# Now we can determine OpenJDK build and target platforms. This is required to
15372# have early on.
15373# Make sure we can run config.sub.
15374$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15375  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15376
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15378$as_echo_n "checking build system type... " >&6; }
15379if ${ac_cv_build+:} false; then :
15380  $as_echo_n "(cached) " >&6
15381else
15382  ac_build_alias=$build_alias
15383test "x$ac_build_alias" = x &&
15384  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15385test "x$ac_build_alias" = x &&
15386  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15387ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15388  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15389
15390fi
15391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15392$as_echo "$ac_cv_build" >&6; }
15393case $ac_cv_build in
15394*-*-*) ;;
15395*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15396esac
15397build=$ac_cv_build
15398ac_save_IFS=$IFS; IFS='-'
15399set x $ac_cv_build
15400shift
15401build_cpu=$1
15402build_vendor=$2
15403shift; shift
15404# Remember, the first character of IFS is used to create $*,
15405# except with old shells:
15406build_os=$*
15407IFS=$ac_save_IFS
15408case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15409
15410
15411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15412$as_echo_n "checking host system type... " >&6; }
15413if ${ac_cv_host+:} false; then :
15414  $as_echo_n "(cached) " >&6
15415else
15416  if test "x$host_alias" = x; then
15417  ac_cv_host=$ac_cv_build
15418else
15419  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15420    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15421fi
15422
15423fi
15424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15425$as_echo "$ac_cv_host" >&6; }
15426case $ac_cv_host in
15427*-*-*) ;;
15428*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15429esac
15430host=$ac_cv_host
15431ac_save_IFS=$IFS; IFS='-'
15432set x $ac_cv_host
15433shift
15434host_cpu=$1
15435host_vendor=$2
15436shift; shift
15437# Remember, the first character of IFS is used to create $*,
15438# except with old shells:
15439host_os=$*
15440IFS=$ac_save_IFS
15441case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15442
15443
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15445$as_echo_n "checking target system type... " >&6; }
15446if ${ac_cv_target+:} false; then :
15447  $as_echo_n "(cached) " >&6
15448else
15449  if test "x$target_alias" = x; then
15450  ac_cv_target=$ac_cv_host
15451else
15452  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15453    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15454fi
15455
15456fi
15457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15458$as_echo "$ac_cv_target" >&6; }
15459case $ac_cv_target in
15460*-*-*) ;;
15461*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15462esac
15463target=$ac_cv_target
15464ac_save_IFS=$IFS; IFS='-'
15465set x $ac_cv_target
15466shift
15467target_cpu=$1
15468target_vendor=$2
15469shift; shift
15470# Remember, the first character of IFS is used to create $*,
15471# except with old shells:
15472target_os=$*
15473IFS=$ac_save_IFS
15474case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15475
15476
15477# The aliases save the names the user supplied, while $host etc.
15478# will get canonicalized.
15479test -n "$target_alias" &&
15480  test "$program_prefix$program_suffix$program_transform_name" = \
15481    NONENONEs,x,x, &&
15482  program_prefix=${target_alias}-
15483
15484  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15485  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15486  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15487  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15488  # to use the configure naming style.
15489
15490
15491
15492
15493
15494  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15495  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15496  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15497  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15498  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15499  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15500
15501
15502
15503  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15504
15505  case "$build_os" in
15506    *linux*)
15507      VAR_OS=linux
15508      VAR_OS_TYPE=unix
15509      ;;
15510    *solaris*)
15511      VAR_OS=solaris
15512      VAR_OS_TYPE=unix
15513      ;;
15514    *darwin*)
15515      VAR_OS=macosx
15516      VAR_OS_TYPE=unix
15517      ;;
15518    *bsd*)
15519      VAR_OS=bsd
15520      VAR_OS_TYPE=unix
15521      ;;
15522    *cygwin*)
15523      VAR_OS=windows
15524      VAR_OS_ENV=windows.cygwin
15525      ;;
15526    *mingw*)
15527      VAR_OS=windows
15528      VAR_OS_ENV=windows.msys
15529      ;;
15530    *aix*)
15531      VAR_OS=aix
15532      VAR_OS_TYPE=unix
15533      ;;
15534    *)
15535      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15536      ;;
15537  esac
15538
15539
15540  # First argument is the cpu name from the trip/quad
15541  case "$build_cpu" in
15542    x86_64)
15543      VAR_CPU=x86_64
15544      VAR_CPU_ARCH=x86
15545      VAR_CPU_BITS=64
15546      VAR_CPU_ENDIAN=little
15547      ;;
15548    i?86)
15549      VAR_CPU=x86
15550      VAR_CPU_ARCH=x86
15551      VAR_CPU_BITS=32
15552      VAR_CPU_ENDIAN=little
15553      ;;
15554    arm*)
15555      VAR_CPU=arm
15556      VAR_CPU_ARCH=arm
15557      VAR_CPU_BITS=32
15558      VAR_CPU_ENDIAN=little
15559      ;;
15560    aarch64)
15561      VAR_CPU=aarch64
15562      VAR_CPU_ARCH=aarch64
15563      VAR_CPU_BITS=64
15564      VAR_CPU_ENDIAN=little
15565      ;;
15566    powerpc)
15567      VAR_CPU=ppc
15568      VAR_CPU_ARCH=ppc
15569      VAR_CPU_BITS=32
15570      VAR_CPU_ENDIAN=big
15571      ;;
15572    powerpc64)
15573      VAR_CPU=ppc64
15574      VAR_CPU_ARCH=ppc
15575      VAR_CPU_BITS=64
15576      VAR_CPU_ENDIAN=big
15577      ;;
15578    powerpc64le)
15579      VAR_CPU=ppc64le
15580      VAR_CPU_ARCH=ppc
15581      VAR_CPU_BITS=64
15582      VAR_CPU_ENDIAN=little
15583      ;;
15584    s390)
15585      VAR_CPU=s390
15586      VAR_CPU_ARCH=s390
15587      VAR_CPU_BITS=32
15588      VAR_CPU_ENDIAN=big
15589      ;;
15590    s390x)
15591      VAR_CPU=s390x
15592      VAR_CPU_ARCH=s390
15593      VAR_CPU_BITS=64
15594      VAR_CPU_ENDIAN=big
15595      ;;
15596    sparc)
15597      VAR_CPU=sparc
15598      VAR_CPU_ARCH=sparc
15599      VAR_CPU_BITS=32
15600      VAR_CPU_ENDIAN=big
15601      ;;
15602    sparcv9|sparc64)
15603      VAR_CPU=sparcv9
15604      VAR_CPU_ARCH=sparc
15605      VAR_CPU_BITS=64
15606      VAR_CPU_ENDIAN=big
15607      ;;
15608    *)
15609      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15610      ;;
15611  esac
15612
15613  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15614  OPENJDK_BUILD_OS="$VAR_OS"
15615  if test "x$VAR_OS_TYPE" != x; then
15616    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15617  else
15618    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15619  fi
15620  if test "x$VAR_OS_ENV" != x; then
15621    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15622  else
15623    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15624  fi
15625  OPENJDK_BUILD_CPU="$VAR_CPU"
15626  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15627  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15628  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15629
15630
15631
15632
15633
15634
15635
15636
15637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15638$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15640$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15641
15642  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15643
15644  case "$host_os" in
15645    *linux*)
15646      VAR_OS=linux
15647      VAR_OS_TYPE=unix
15648      ;;
15649    *solaris*)
15650      VAR_OS=solaris
15651      VAR_OS_TYPE=unix
15652      ;;
15653    *darwin*)
15654      VAR_OS=macosx
15655      VAR_OS_TYPE=unix
15656      ;;
15657    *bsd*)
15658      VAR_OS=bsd
15659      VAR_OS_TYPE=unix
15660      ;;
15661    *cygwin*)
15662      VAR_OS=windows
15663      VAR_OS_ENV=windows.cygwin
15664      ;;
15665    *mingw*)
15666      VAR_OS=windows
15667      VAR_OS_ENV=windows.msys
15668      ;;
15669    *aix*)
15670      VAR_OS=aix
15671      VAR_OS_TYPE=unix
15672      ;;
15673    *)
15674      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15675      ;;
15676  esac
15677
15678
15679  # First argument is the cpu name from the trip/quad
15680  case "$host_cpu" in
15681    x86_64)
15682      VAR_CPU=x86_64
15683      VAR_CPU_ARCH=x86
15684      VAR_CPU_BITS=64
15685      VAR_CPU_ENDIAN=little
15686      ;;
15687    i?86)
15688      VAR_CPU=x86
15689      VAR_CPU_ARCH=x86
15690      VAR_CPU_BITS=32
15691      VAR_CPU_ENDIAN=little
15692      ;;
15693    arm*)
15694      VAR_CPU=arm
15695      VAR_CPU_ARCH=arm
15696      VAR_CPU_BITS=32
15697      VAR_CPU_ENDIAN=little
15698      ;;
15699    aarch64)
15700      VAR_CPU=aarch64
15701      VAR_CPU_ARCH=aarch64
15702      VAR_CPU_BITS=64
15703      VAR_CPU_ENDIAN=little
15704      ;;
15705    powerpc)
15706      VAR_CPU=ppc
15707      VAR_CPU_ARCH=ppc
15708      VAR_CPU_BITS=32
15709      VAR_CPU_ENDIAN=big
15710      ;;
15711    powerpc64)
15712      VAR_CPU=ppc64
15713      VAR_CPU_ARCH=ppc
15714      VAR_CPU_BITS=64
15715      VAR_CPU_ENDIAN=big
15716      ;;
15717    powerpc64le)
15718      VAR_CPU=ppc64le
15719      VAR_CPU_ARCH=ppc
15720      VAR_CPU_BITS=64
15721      VAR_CPU_ENDIAN=little
15722      ;;
15723    s390)
15724      VAR_CPU=s390
15725      VAR_CPU_ARCH=s390
15726      VAR_CPU_BITS=32
15727      VAR_CPU_ENDIAN=big
15728      ;;
15729    s390x)
15730      VAR_CPU=s390x
15731      VAR_CPU_ARCH=s390
15732      VAR_CPU_BITS=64
15733      VAR_CPU_ENDIAN=big
15734      ;;
15735    sparc)
15736      VAR_CPU=sparc
15737      VAR_CPU_ARCH=sparc
15738      VAR_CPU_BITS=32
15739      VAR_CPU_ENDIAN=big
15740      ;;
15741    sparcv9|sparc64)
15742      VAR_CPU=sparcv9
15743      VAR_CPU_ARCH=sparc
15744      VAR_CPU_BITS=64
15745      VAR_CPU_ENDIAN=big
15746      ;;
15747    *)
15748      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15749      ;;
15750  esac
15751
15752  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15753  OPENJDK_TARGET_OS="$VAR_OS"
15754  if test "x$VAR_OS_TYPE" != x; then
15755    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15756  else
15757    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15758  fi
15759  if test "x$VAR_OS_ENV" != x; then
15760    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15761  else
15762    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15763  fi
15764  OPENJDK_TARGET_CPU="$VAR_CPU"
15765  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15766  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15767  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15768
15769
15770
15771
15772
15773
15774
15775
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15777$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15779$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15780
15781
15782
15783# Check whether --with-target-bits was given.
15784if test "${with_target_bits+set}" = set; then :
15785  withval=$with_target_bits;
15786fi
15787
15788
15789  # We have three types of compiles:
15790  # native  == normal compilation, target system == build system
15791  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15792  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15793  #
15794  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15795    # We're doing a proper cross-compilation
15796    COMPILE_TYPE="cross"
15797  else
15798    COMPILE_TYPE="native"
15799  fi
15800
15801  if test "x$with_target_bits" != x; then
15802    if test "x$COMPILE_TYPE" = "xcross"; then
15803      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15804    fi
15805
15806    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15807      # A reduced build is requested
15808      COMPILE_TYPE="reduced"
15809      OPENJDK_TARGET_CPU_BITS=32
15810      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15811        OPENJDK_TARGET_CPU=x86
15812      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15813        OPENJDK_TARGET_CPU=sparc
15814      else
15815        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15816      fi
15817    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15818      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
15819    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15820      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15821$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15822    else
15823      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15824    fi
15825  fi
15826
15827
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15829$as_echo_n "checking compilation type... " >&6; }
15830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15831$as_echo "$COMPILE_TYPE" >&6; }
15832
15833
15834  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15835    REQUIRED_OS_NAME=SunOS
15836    REQUIRED_OS_VERSION=5.10
15837  fi
15838  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15839    REQUIRED_OS_NAME=Linux
15840    REQUIRED_OS_VERSION=2.6
15841  fi
15842  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15843    REQUIRED_OS_NAME=Windows
15844    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15845      REQUIRED_OS_VERSION=5.2
15846    else
15847      REQUIRED_OS_VERSION=5.1
15848    fi
15849  fi
15850  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15851    REQUIRED_OS_NAME=Darwin
15852    REQUIRED_OS_VERSION=11.2
15853  fi
15854  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15855    REQUIRED_OS_NAME=AIX
15856    REQUIRED_OS_VERSION=7.1
15857  fi
15858
15859
15860
15861
15862
15863
15864  # Also store the legacy naming of the cpu.
15865  # Ie i586 and amd64 instead of x86 and x86_64
15866  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15867  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15868    OPENJDK_TARGET_CPU_LEGACY="i586"
15869  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15870    # On all platforms except MacOSX replace x86_64 with amd64.
15871    OPENJDK_TARGET_CPU_LEGACY="amd64"
15872  fi
15873
15874
15875  # And the second legacy naming of the cpu.
15876  # Ie i386 and amd64 instead of x86 and x86_64.
15877  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15878  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15879    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15880  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15882  fi
15883
15884
15885  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15886  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15887  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15888  OPENJDK_TARGET_CPU_ISADIR=""
15889  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15890    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15891      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15892    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15893      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15894    fi
15895  fi
15896
15897
15898  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15899  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    # On linux only, we replace x86 with i386.
15902    OPENJDK_TARGET_CPU_OSARCH="i386"
15903  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15904    # On all platforms except macosx, we replace x86_64 with amd64.
15905    OPENJDK_TARGET_CPU_OSARCH="amd64"
15906  fi
15907
15908
15909  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15910  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15911    OPENJDK_TARGET_CPU_JLI="i386"
15912  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15913    # On all platforms except macosx, we replace x86_64 with amd64.
15914    OPENJDK_TARGET_CPU_JLI="amd64"
15915  fi
15916
15917  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15918      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15919  else
15920      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15921  fi
15922
15923
15924  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15925  # Macosx is osx and x86_64 is x64
15926  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15927    OPENJDK_TARGET_OS_BUNDLE="osx"
15928  else
15929    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15930  fi
15931  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15932    OPENJDK_TARGET_CPU_BUNDLE="x64"
15933  else
15934    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15935  fi
15936  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15937
15938
15939
15940
15941  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15942    A_LP64="LP64:="
15943    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15944    # unpack200.exe
15945    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15946      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15947    fi
15948  fi
15949  LP64=$A_LP64
15950
15951
15952  if test "x$COMPILE_TYPE" = "xcross"; then
15953    # FIXME: ... or should this include reduced builds..?
15954    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15955  else
15956    DEFINE_CROSS_COMPILE_ARCH=""
15957  fi
15958
15959
15960  # Convert openjdk platform names to hotspot names
15961
15962  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15963  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15964    HOTSPOT_TARGET_OS=bsd
15965  fi
15966
15967
15968  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15969  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15970    HOTSPOT_TARGET_OS_TYPE=posix
15971  fi
15972
15973
15974  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15975  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15976    HOTSPOT_TARGET_CPU=x86_32
15977  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15978    HOTSPOT_TARGET_CPU=sparc
15979  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15980    HOTSPOT_TARGET_CPU=ppc_64
15981  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15982    HOTSPOT_TARGET_CPU=ppc_64
15983  fi
15984
15985
15986  # This is identical with OPENJDK_*, but define anyway for consistency.
15987  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15988
15989
15990  # Setup HOTSPOT_TARGET_CPU_DEFINE
15991  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15992    HOTSPOT_TARGET_CPU_DEFINE=IA32
15993  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15994    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15995  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15996    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15997  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15998    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15999  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16000    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16001  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16002    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16003
16004  # The cpu defines below are for zero, we don't support them directly.
16005  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16006    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16007  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16008    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16009  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16010    HOTSPOT_TARGET_CPU_DEFINE=S390
16011  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16012    HOTSPOT_TARGET_CPU_DEFINE=S390
16013  elif test "x$OPENJDK_TARGET_CPU" != x; then
16014    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16015  fi
16016
16017
16018
16019
16020  # Also store the legacy naming of the cpu.
16021  # Ie i586 and amd64 instead of x86 and x86_64
16022  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16023  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16024    OPENJDK_BUILD_CPU_LEGACY="i586"
16025  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16026    # On all platforms except MacOSX replace x86_64 with amd64.
16027    OPENJDK_BUILD_CPU_LEGACY="amd64"
16028  fi
16029
16030
16031  # And the second legacy naming of the cpu.
16032  # Ie i386 and amd64 instead of x86 and x86_64.
16033  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16034  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16035    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16036  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16038  fi
16039
16040
16041  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16042  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16043  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16044  OPENJDK_BUILD_CPU_ISADIR=""
16045  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16046    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16047      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16048    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16049      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16050    fi
16051  fi
16052
16053
16054  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16055  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16056  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16057    # On linux only, we replace x86 with i386.
16058    OPENJDK_BUILD_CPU_OSARCH="i386"
16059  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16060    # On all platforms except macosx, we replace x86_64 with amd64.
16061    OPENJDK_BUILD_CPU_OSARCH="amd64"
16062  fi
16063
16064
16065  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16066  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16067    OPENJDK_BUILD_CPU_JLI="i386"
16068  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16069    # On all platforms except macosx, we replace x86_64 with amd64.
16070    OPENJDK_BUILD_CPU_JLI="amd64"
16071  fi
16072
16073  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16074      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16075  else
16076      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16077  fi
16078
16079
16080  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16081  # Macosx is osx and x86_64 is x64
16082  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16083    OPENJDK_BUILD_OS_BUNDLE="osx"
16084  else
16085    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16086  fi
16087  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16088    OPENJDK_BUILD_CPU_BUNDLE="x64"
16089  else
16090    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16091  fi
16092  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16093
16094
16095
16096
16097  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16098    A_LP64="LP64:="
16099    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16100    # unpack200.exe
16101    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16102      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16103    fi
16104  fi
16105  LP64=$A_LP64
16106
16107
16108  if test "x$COMPILE_TYPE" = "xcross"; then
16109    # FIXME: ... or should this include reduced builds..?
16110    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16111  else
16112    DEFINE_CROSS_COMPILE_ARCH=""
16113  fi
16114
16115
16116  # Convert openjdk platform names to hotspot names
16117
16118  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16119  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16120    HOTSPOT_BUILD_OS=bsd
16121  fi
16122
16123
16124  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16125  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16126    HOTSPOT_BUILD_OS_TYPE=posix
16127  fi
16128
16129
16130  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16131  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16132    HOTSPOT_BUILD_CPU=x86_32
16133  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16134    HOTSPOT_BUILD_CPU=sparc
16135  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16136    HOTSPOT_BUILD_CPU=ppc_64
16137  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16138    HOTSPOT_BUILD_CPU=ppc_64
16139  fi
16140
16141
16142  # This is identical with OPENJDK_*, but define anyway for consistency.
16143  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16144
16145
16146  # Setup HOTSPOT_BUILD_CPU_DEFINE
16147  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16148    HOTSPOT_BUILD_CPU_DEFINE=IA32
16149  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16150    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16151  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16152    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16153  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16154    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16155  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16156    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16157  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16158    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16159
16160  # The cpu defines below are for zero, we don't support them directly.
16161  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16162    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16163  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16164    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16165  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16166    HOTSPOT_BUILD_CPU_DEFINE=S390
16167  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16168    HOTSPOT_BUILD_CPU_DEFINE=S390
16169  elif test "x$OPENJDK_BUILD_CPU" != x; then
16170    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16171  fi
16172
16173
16174
16175
16176  # ZERO_ARCHDEF is used to enable architecture-specific code.
16177  # This is used in legacy hotspot build.
16178  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16179
16180
16181
16182
16183
16184# Continue setting up basic stuff. Most remaining code require fundamental tools.
16185
16186  # Save the current directory this script was started from
16187  CURDIR="$PWD"
16188
16189  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16190  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16191  # was not available at that time.
16192  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16193  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16194    ORIGINAL_PATH="$REWRITTEN_PATH"
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16196$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16197  fi
16198
16199  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16200    PATH_SEP=";"
16201
16202  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16203  if test $SRC_ROOT_LENGTH -gt 100; then
16204    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16205  fi
16206
16207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16209$as_echo_n "checking cygwin release... " >&6; }
16210    CYGWIN_VERSION=`$UNAME -r`
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16212$as_echo "$CYGWIN_VERSION" >&6; }
16213    WINDOWS_ENV_VENDOR='cygwin'
16214    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16215
16216    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16217    if test "x$CYGWIN_VERSION_OLD" != x; then
16218      { $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
16219$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;}
16220      as_fn_error $? "Cannot continue" "$LINENO" 5
16221    fi
16222    if test "x$CYGPATH" = x; then
16223      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16224    fi
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16226$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16227    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16228    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16229    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16230    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16232$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16233    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16234    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16235    if test "x$test_cygdrive_prefix" = x; then
16236      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16237    fi
16238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16240$as_echo_n "checking msys release... " >&6; }
16241    MSYS_VERSION=`$UNAME -r`
16242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16243$as_echo "$MSYS_VERSION" >&6; }
16244
16245    WINDOWS_ENV_VENDOR='msys'
16246    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16247
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16249$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16250    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16251    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16252
16253  windows_path="$MSYS_ROOT_PATH"
16254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16255    unix_path=`$CYGPATH -u "$windows_path"`
16256    MSYS_ROOT_PATH="$unix_path"
16257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16259    MSYS_ROOT_PATH="$unix_path"
16260  fi
16261
16262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16263$as_echo "$MSYS_ROOT_PATH" >&6; }
16264    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16265  else
16266    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16267  fi
16268
16269  # Test if windows or unix (cygwin/msys) find is first in path.
16270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16271$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16272  FIND_BINARY_OUTPUT=`find --version 2>&1`
16273  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16275$as_echo "unix style" >&6; }
16276  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16278$as_echo "Windows" >&6; }
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16280$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16281    { $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
16282$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16283    as_fn_error $? "Cannot continue" "$LINENO" 5
16284  else
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16286$as_echo "unknown" >&6; }
16287    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16288$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16289  fi
16290
16291  else
16292    PATH_SEP=":"
16293  fi
16294
16295
16296  # We get the top-level directory from the supporting wrappers.
16297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16298$as_echo_n "checking for top-level directory... " >&6; }
16299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16300$as_echo "$TOPDIR" >&6; }
16301
16302
16303  # Save the original version of TOPDIR for string comparisons
16304  ORIGINAL_TOPDIR="$TOPDIR"
16305
16306
16307  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16308
16309  # Only process if variable expands to non-empty
16310
16311  if test "x$CURDIR" != x; then
16312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16313
16314  # Input might be given as Windows format, start by converting to
16315  # unix format.
16316  path="$CURDIR"
16317  new_path=`$CYGPATH -u "$path"`
16318
16319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16322  # "foo.exe" is OK but "foo" is an error.
16323  #
16324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16325  # It is also a way to make sure we got the proper file name for the real test later on.
16326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16327  if test "x$test_shortpath" = x; then
16328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16329$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16330    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16331  fi
16332
16333  # Call helper function which possibly converts this using DOS-style short mode.
16334  # If so, the updated path is stored in $new_path.
16335
16336  input_path="$new_path"
16337  # Check if we need to convert this using DOS-style short mode. If the path
16338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16339  # take no chances and rewrite it.
16340  # Note: m4 eats our [], so we need to use [ and ] instead.
16341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16342  if test "x$has_forbidden_chars" != x; then
16343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16347      # Going to short mode and back again did indeed matter. Since short mode is
16348      # case insensitive, let's make it lowercase to improve readability.
16349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16350      # Now convert it back to Unix-style (cygpath)
16351      input_path=`$CYGPATH -u "$shortmode_path"`
16352      new_path="$input_path"
16353    fi
16354  fi
16355
16356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16357  if test "x$test_cygdrive_prefix" = x; then
16358    # As a simple fix, exclude /usr/bin since it's not a real path.
16359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16361      # a path prefixed by /cygdrive for fixpath to work.
16362      new_path="$CYGWIN_ROOT_PATH$input_path"
16363    fi
16364  fi
16365
16366
16367  if test "x$path" != "x$new_path"; then
16368    CURDIR="$new_path"
16369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16370$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16371  fi
16372
16373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16374
16375  path="$CURDIR"
16376  has_colon=`$ECHO $path | $GREP ^.:`
16377  new_path="$path"
16378  if test "x$has_colon" = x; then
16379    # Not in mixed or Windows style, start by that.
16380    new_path=`cmd //c echo $path`
16381  fi
16382
16383
16384  input_path="$new_path"
16385  # Check if we need to convert this using DOS-style short mode. If the path
16386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16387  # take no chances and rewrite it.
16388  # Note: m4 eats our [], so we need to use [ and ] instead.
16389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16390  if test "x$has_forbidden_chars" != x; then
16391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16393  fi
16394
16395
16396  windows_path="$new_path"
16397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398    unix_path=`$CYGPATH -u "$windows_path"`
16399    new_path="$unix_path"
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16402    new_path="$unix_path"
16403  fi
16404
16405  if test "x$path" != "x$new_path"; then
16406    CURDIR="$new_path"
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16408$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16409  fi
16410
16411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16413
16414    else
16415      # We're on a unix platform. Hooray! :)
16416      path="$CURDIR"
16417      has_space=`$ECHO "$path" | $GREP " "`
16418      if test "x$has_space" != x; then
16419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16420$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16422      fi
16423
16424      # Use eval to expand a potential ~
16425      eval path="$path"
16426      if test ! -f "$path" && test ! -d "$path"; then
16427        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16428      fi
16429
16430      if test -d "$path"; then
16431        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16432      else
16433        dir="`$DIRNAME "$path"`"
16434        base="`$BASENAME "$path"`"
16435        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16436      fi
16437    fi
16438  fi
16439
16440
16441  # Only process if variable expands to non-empty
16442
16443  if test "x$TOPDIR" != x; then
16444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445
16446  # Input might be given as Windows format, start by converting to
16447  # unix format.
16448  path="$TOPDIR"
16449  new_path=`$CYGPATH -u "$path"`
16450
16451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16454  # "foo.exe" is OK but "foo" is an error.
16455  #
16456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16457  # It is also a way to make sure we got the proper file name for the real test later on.
16458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16459  if test "x$test_shortpath" = x; then
16460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16461$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16462    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16463  fi
16464
16465  # Call helper function which possibly converts this using DOS-style short mode.
16466  # If so, the updated path is stored in $new_path.
16467
16468  input_path="$new_path"
16469  # Check if we need to convert this using DOS-style short mode. If the path
16470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16471  # take no chances and rewrite it.
16472  # Note: m4 eats our [], so we need to use [ and ] instead.
16473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16474  if test "x$has_forbidden_chars" != x; then
16475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16479      # Going to short mode and back again did indeed matter. Since short mode is
16480      # case insensitive, let's make it lowercase to improve readability.
16481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16482      # Now convert it back to Unix-style (cygpath)
16483      input_path=`$CYGPATH -u "$shortmode_path"`
16484      new_path="$input_path"
16485    fi
16486  fi
16487
16488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16489  if test "x$test_cygdrive_prefix" = x; then
16490    # As a simple fix, exclude /usr/bin since it's not a real path.
16491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16493      # a path prefixed by /cygdrive for fixpath to work.
16494      new_path="$CYGWIN_ROOT_PATH$input_path"
16495    fi
16496  fi
16497
16498
16499  if test "x$path" != "x$new_path"; then
16500    TOPDIR="$new_path"
16501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16502$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16503  fi
16504
16505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506
16507  path="$TOPDIR"
16508  has_colon=`$ECHO $path | $GREP ^.:`
16509  new_path="$path"
16510  if test "x$has_colon" = x; then
16511    # Not in mixed or Windows style, start by that.
16512    new_path=`cmd //c echo $path`
16513  fi
16514
16515
16516  input_path="$new_path"
16517  # Check if we need to convert this using DOS-style short mode. If the path
16518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16519  # take no chances and rewrite it.
16520  # Note: m4 eats our [], so we need to use [ and ] instead.
16521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16522  if test "x$has_forbidden_chars" != x; then
16523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16525  fi
16526
16527
16528  windows_path="$new_path"
16529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16530    unix_path=`$CYGPATH -u "$windows_path"`
16531    new_path="$unix_path"
16532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16534    new_path="$unix_path"
16535  fi
16536
16537  if test "x$path" != "x$new_path"; then
16538    TOPDIR="$new_path"
16539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16540$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16541  fi
16542
16543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16545
16546    else
16547      # We're on a unix platform. Hooray! :)
16548      path="$TOPDIR"
16549      has_space=`$ECHO "$path" | $GREP " "`
16550      if test "x$has_space" != x; then
16551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16552$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16554      fi
16555
16556      # Use eval to expand a potential ~
16557      eval path="$path"
16558      if test ! -f "$path" && test ! -d "$path"; then
16559        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16560      fi
16561
16562      if test -d "$path"; then
16563        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16564      else
16565        dir="`$DIRNAME "$path"`"
16566        base="`$BASENAME "$path"`"
16567        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16568      fi
16569    fi
16570  fi
16571
16572  # SRC_ROOT is a traditional alias for TOPDIR.
16573  SRC_ROOT=$TOPDIR
16574
16575  # Calculate a canonical version of TOPDIR for string comparisons
16576  CANONICAL_TOPDIR=$TOPDIR
16577
16578  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16579    # Follow a chain of symbolic links. Use readlink
16580    # where it exists, else fall back to horribly
16581    # complicated shell code.
16582    if test "x$READLINK_TESTED" != yes; then
16583      # On MacOSX there is a readlink tool with a different
16584      # purpose than the GNU readlink tool. Check the found readlink.
16585      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16586      if test "x$ISGNU" = x; then
16587        # A readlink that we do not know how to use.
16588        # Are there other non-GNU readlinks out there?
16589        READLINK_TESTED=yes
16590        READLINK=
16591      fi
16592    fi
16593
16594    if test "x$READLINK" != x; then
16595      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16596    else
16597      # Save the current directory for restoring afterwards
16598      STARTDIR=$PWD
16599      COUNTER=0
16600      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16601      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16602      cd $sym_link_dir
16603      # Use -P flag to resolve symlinks in directories.
16604      cd `$THEPWDCMD -P`
16605      sym_link_dir=`$THEPWDCMD -P`
16606      # Resolve file symlinks
16607      while test $COUNTER -lt 20; do
16608        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16609        if test "x$ISLINK" == x; then
16610          # This is not a symbolic link! We are done!
16611          break
16612        fi
16613        # Again resolve directory symlinks since the target of the just found
16614        # link could be in a different directory
16615        cd `$DIRNAME $ISLINK`
16616        sym_link_dir=`$THEPWDCMD -P`
16617        sym_link_file=`$BASENAME $ISLINK`
16618        let COUNTER=COUNTER+1
16619      done
16620      cd $STARTDIR
16621      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16622    fi
16623  fi
16624
16625
16626
16627  # Locate the directory of this script.
16628  AUTOCONF_DIR=$TOPDIR/common/autoconf
16629
16630  # Setup username (for use in adhoc version strings etc)
16631  # Outer [ ] to quote m4.
16632   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16633
16634
16635
16636# Check if it's a pure open build or if custom sources are to be used.
16637
16638  # Check whether --enable-openjdk-only was given.
16639if test "${enable_openjdk_only+set}" = set; then :
16640  enableval=$enable_openjdk_only;
16641else
16642  enable_openjdk_only="no"
16643fi
16644
16645
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16647$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16649$as_echo "$enable_openjdk_only" >&6; }
16650  if test "x$enable_openjdk_only" = "xyes"; then
16651    SUPPRESS_CUSTOM_EXTENSIONS="true"
16652  elif test "x$enable_openjdk_only" = "xno"; then
16653    SUPPRESS_CUSTOM_EXTENSIONS="false"
16654  else
16655    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16656  fi
16657
16658  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16659  # the IncludeCustomExtension macro.
16660
16661
16662# Check whether --with-custom-make-dir was given.
16663if test "${with_custom_make_dir+set}" = set; then :
16664  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
16665$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16666fi
16667
16668
16669
16670
16671# These are needed to be able to create a configuration name (and thus the output directory)
16672
16673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16674$as_echo_n "checking which variant of the JDK to build... " >&6; }
16675
16676# Check whether --with-jdk-variant was given.
16677if test "${with_jdk_variant+set}" = set; then :
16678  withval=$with_jdk_variant;
16679fi
16680
16681
16682  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16683    JDK_VARIANT="normal"
16684  else
16685    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16686  fi
16687
16688
16689
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16691$as_echo "$JDK_VARIANT" >&6; }
16692
16693
16694  DEBUG_LEVEL="release"
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16696$as_echo_n "checking which debug level to use... " >&6; }
16697  # Check whether --enable-debug was given.
16698if test "${enable_debug+set}" = set; then :
16699  enableval=$enable_debug;
16700        ENABLE_DEBUG="${enableval}"
16701        DEBUG_LEVEL="fastdebug"
16702
16703else
16704  ENABLE_DEBUG="no"
16705fi
16706
16707
16708
16709# Check whether --with-debug-level was given.
16710if test "${with_debug_level+set}" = set; then :
16711  withval=$with_debug_level;
16712        DEBUG_LEVEL="${withval}"
16713        if test "x$ENABLE_DEBUG" = xyes; then
16714          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16715        fi
16716
16717fi
16718
16719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16720$as_echo "$DEBUG_LEVEL" >&6; }
16721
16722  if test "x$DEBUG_LEVEL" != xrelease && \
16723      test "x$DEBUG_LEVEL" != xoptimized && \
16724      test "x$DEBUG_LEVEL" != xfastdebug && \
16725      test "x$DEBUG_LEVEL" != xslowdebug; then
16726    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16727  fi
16728
16729  # Translate DEBUG_LEVEL to debug level used by Hotspot
16730  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16731  if test "x$DEBUG_LEVEL" = xrelease; then
16732    HOTSPOT_DEBUG_LEVEL="product"
16733  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16734    HOTSPOT_DEBUG_LEVEL="debug"
16735  fi
16736
16737  if test "x$DEBUG_LEVEL" = xoptimized; then
16738    # The debug level 'optimized' is a little special because it is currently only
16739    # applicable to the HotSpot build where it means to build a completely
16740    # optimized version of the VM without any debugging code (like for the
16741    # 'release' debug level which is called 'product' in the HotSpot build) but
16742    # with the exception that it can contain additional code which is otherwise
16743    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16744    # test new and/or experimental features which are not intended for customer
16745    # shipment. Because these new features need to be tested and benchmarked in
16746    # real world scenarios, we want to build the containing JDK at the 'release'
16747    # debug level.
16748    DEBUG_LEVEL="release"
16749  fi
16750
16751
16752
16753
16754
16755
16756# Check whether --with-jvm-variants was given.
16757if test "${with_jvm_variants+set}" = set; then :
16758  withval=$with_jvm_variants;
16759fi
16760
16761
16762
16763
16764# Check whether --with-cpu-port was given.
16765if test "${with_cpu_port+set}" = set; then :
16766  withval=$with_cpu_port;
16767fi
16768
16769
16770  if test "x$with_cpu_port" != x; then
16771    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16772      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16773    fi
16774    if test "x$with_cpu_port" != xarm64 && \
16775        test "x$with_cpu_port" != xaarch64; then
16776      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16777    fi
16778    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16779  fi
16780
16781
16782  if test "x$with_jvm_variants" = x; then
16783    with_jvm_variants="server"
16784  fi
16785  JVM_VARIANTS_OPT="$with_jvm_variants"
16786
16787  # Has the user listed more than one variant?
16788  # Additional [] needed to keep m4 from mangling shell constructs.
16789  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16790    BUILDING_MULTIPLE_JVM_VARIANTS=true
16791  else
16792    BUILDING_MULTIPLE_JVM_VARIANTS=false
16793  fi
16794  # Replace the commas with AND for use in the build directory name.
16795  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16796
16797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16798$as_echo_n "checking which variants of the JVM to build... " >&6; }
16799  # JVM_VARIANTS is a space-separated list.
16800  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16801  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16803$as_echo "$JVM_VARIANTS" >&6; }
16804
16805  # Check that the selected variants are valid
16806
16807  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16808  # Notice that the original variant failes on SLES 10 and 11
16809  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16810  STACK=${JVM_VARIANTS// /$'\n'}
16811  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16812  if test "x$INVALID_VARIANTS" != x; then
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16814$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16815    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16816  fi
16817
16818  # All "special" variants share the same output directory ("server")
16819  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16820  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16821  STACK=${JVM_VARIANTS// /$'\n'}
16822  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16823  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16824    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16825  fi
16826
16827  # The "main" variant is the one used by other libs to link against during the
16828  # build.
16829  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16830    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16831    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16832      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16833        JVM_VARIANT_MAIN="$variant"
16834        break
16835      fi
16836    done
16837  else
16838    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16839  fi
16840
16841
16842
16843
16844
16845  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16846    # zero behaves as a platform and rewrites these values. This is really weird. :(
16847    # We are guaranteed that we do not build any other variants when building zero.
16848    HOTSPOT_TARGET_CPU=zero
16849    HOTSPOT_TARGET_CPU_ARCH=zero
16850  fi
16851
16852
16853# With basic setup done, call the custom early hook.
16854
16855
16856# Check if we have devkits, extra paths or sysroot set.
16857
16858
16859# Check whether --with-devkit was given.
16860if test "${with_devkit+set}" = set; then :
16861  withval=$with_devkit;
16862
16863  # Only process if variable expands to non-empty
16864
16865  if test "x$with_devkit" != x; then
16866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867
16868  # Input might be given as Windows format, start by converting to
16869  # unix format.
16870  path="$with_devkit"
16871  new_path=`$CYGPATH -u "$path"`
16872
16873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16876  # "foo.exe" is OK but "foo" is an error.
16877  #
16878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16879  # It is also a way to make sure we got the proper file name for the real test later on.
16880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16881  if test "x$test_shortpath" = x; then
16882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16883$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16884    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16885  fi
16886
16887  # Call helper function which possibly converts this using DOS-style short mode.
16888  # If so, the updated path is stored in $new_path.
16889
16890  input_path="$new_path"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16901      # Going to short mode and back again did indeed matter. Since short mode is
16902      # case insensitive, let's make it lowercase to improve readability.
16903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16904      # Now convert it back to Unix-style (cygpath)
16905      input_path=`$CYGPATH -u "$shortmode_path"`
16906      new_path="$input_path"
16907    fi
16908  fi
16909
16910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16911  if test "x$test_cygdrive_prefix" = x; then
16912    # As a simple fix, exclude /usr/bin since it's not a real path.
16913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16915      # a path prefixed by /cygdrive for fixpath to work.
16916      new_path="$CYGWIN_ROOT_PATH$input_path"
16917    fi
16918  fi
16919
16920
16921  if test "x$path" != "x$new_path"; then
16922    with_devkit="$new_path"
16923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16924$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16925  fi
16926
16927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16928
16929  path="$with_devkit"
16930  has_colon=`$ECHO $path | $GREP ^.:`
16931  new_path="$path"
16932  if test "x$has_colon" = x; then
16933    # Not in mixed or Windows style, start by that.
16934    new_path=`cmd //c echo $path`
16935  fi
16936
16937
16938  input_path="$new_path"
16939  # Check if we need to convert this using DOS-style short mode. If the path
16940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16941  # take no chances and rewrite it.
16942  # Note: m4 eats our [], so we need to use [ and ] instead.
16943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16944  if test "x$has_forbidden_chars" != x; then
16945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16947  fi
16948
16949
16950  windows_path="$new_path"
16951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16952    unix_path=`$CYGPATH -u "$windows_path"`
16953    new_path="$unix_path"
16954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16956    new_path="$unix_path"
16957  fi
16958
16959  if test "x$path" != "x$new_path"; then
16960    with_devkit="$new_path"
16961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16962$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16963  fi
16964
16965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16967
16968    else
16969      # We're on a unix platform. Hooray! :)
16970      path="$with_devkit"
16971      has_space=`$ECHO "$path" | $GREP " "`
16972      if test "x$has_space" != x; then
16973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16974$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16976      fi
16977
16978      # Use eval to expand a potential ~
16979      eval path="$path"
16980      if test ! -f "$path" && test ! -d "$path"; then
16981        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16982      fi
16983
16984      if test -d "$path"; then
16985        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16986      else
16987        dir="`$DIRNAME "$path"`"
16988        base="`$BASENAME "$path"`"
16989        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16990      fi
16991    fi
16992  fi
16993
16994        DEVKIT_ROOT="$with_devkit"
16995        # Check for a meta data info file in the root of the devkit
16996        if test -f "$DEVKIT_ROOT/devkit.info"; then
16997          . $DEVKIT_ROOT/devkit.info
16998          # This potentially sets the following:
16999          # A descriptive name of the devkit
17000
17001  if test "x$DEVKIT_NAME" = x; then
17002    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17003  fi
17004
17005          # Corresponds to --with-extra-path
17006
17007  if test "x$DEVKIT_EXTRA_PATH" = x; then
17008    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17009  fi
17010
17011          # Corresponds to --with-toolchain-path
17012
17013  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17014    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17015  fi
17016
17017          # Corresponds to --with-sysroot
17018
17019  if test "x$DEVKIT_SYSROOT" = x; then
17020    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17021  fi
17022
17023
17024          # Identifies the Visual Studio version in the devkit
17025
17026  if test "x$DEVKIT_VS_VERSION" = x; then
17027    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17028  fi
17029
17030          # The Visual Studio include environment variable
17031
17032  if test "x$DEVKIT_VS_INCLUDE" = x; then
17033    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17034  fi
17035
17036          # The Visual Studio lib environment variable
17037
17038  if test "x$DEVKIT_VS_LIB" = x; then
17039    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17040  fi
17041
17042          # Corresponds to --with-msvcr-dll
17043
17044  if test "x$DEVKIT_MSVCR_DLL" = x; then
17045    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17046  fi
17047
17048          # Corresponds to --with-msvcp-dll
17049
17050  if test "x$DEVKIT_MSVCP_DLL" = x; then
17051    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17052  fi
17053
17054        fi
17055
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17057$as_echo_n "checking for devkit... " >&6; }
17058        if test "x$DEVKIT_NAME" != x; then
17059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17060$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17061        else
17062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17063$as_echo "$DEVKIT_ROOT" >&6; }
17064        fi
17065
17066
17067  if test "x$DEVKIT_EXTRA_PATH" != x; then
17068    if test "x$EXTRA_PATH" = x; then
17069      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17070    else
17071      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17072    fi
17073  fi
17074
17075
17076        # Fallback default of just /bin if DEVKIT_PATH is not defined
17077        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17078          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17079        fi
17080
17081  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17082    if test "x$TOOLCHAIN_PATH" = x; then
17083      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17084    else
17085      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17086    fi
17087  fi
17088
17089
17090        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17091        # places for backwards compatiblity.
17092        if test "x$DEVKIT_SYSROOT" != x; then
17093          SYSROOT="$DEVKIT_SYSROOT"
17094        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17095          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17096        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17097          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17098        fi
17099
17100
17101fi
17102
17103
17104  # You can force the sysroot if the sysroot encoded into the compiler tools
17105  # is not correct.
17106
17107# Check whether --with-sys-root was given.
17108if test "${with_sys_root+set}" = set; then :
17109  withval=$with_sys_root; SYSROOT=$with_sys_root
17110
17111fi
17112
17113
17114
17115# Check whether --with-sysroot was given.
17116if test "${with_sysroot+set}" = set; then :
17117  withval=$with_sysroot; SYSROOT=$with_sysroot
17118
17119fi
17120
17121
17122
17123# Check whether --with-tools-dir was given.
17124if test "${with_tools_dir+set}" = set; then :
17125  withval=$with_tools_dir;
17126  if test "x$with_tools_dir" != x; then
17127    if test "x$TOOLCHAIN_PATH" = x; then
17128      TOOLCHAIN_PATH="$with_tools_dir"
17129    else
17130      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17131    fi
17132  fi
17133
17134
17135fi
17136
17137
17138
17139# Check whether --with-toolchain-path was given.
17140if test "${with_toolchain_path+set}" = set; then :
17141  withval=$with_toolchain_path;
17142  if test "x$with_toolchain_path" != x; then
17143    if test "x$TOOLCHAIN_PATH" = x; then
17144      TOOLCHAIN_PATH="$with_toolchain_path"
17145    else
17146      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17147    fi
17148  fi
17149
17150
17151fi
17152
17153
17154
17155# Check whether --with-extra-path was given.
17156if test "${with_extra_path+set}" = set; then :
17157  withval=$with_extra_path;
17158  if test "x$with_extra_path" != x; then
17159    if test "x$EXTRA_PATH" = x; then
17160      EXTRA_PATH="$with_extra_path"
17161    else
17162      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17163    fi
17164  fi
17165
17166
17167fi
17168
17169
17170  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17171    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17172    # If not, detect if Xcode is installed by running xcodebuild -version
17173    # if no Xcode installed, xcodebuild exits with 1
17174    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17175    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17176      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17177      # fall back on the stub binary in /usr/bin/xcodebuild
17178      # Extract the first word of "xcodebuild", so it can be a program name with args.
17179set dummy xcodebuild; ac_word=$2
17180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17181$as_echo_n "checking for $ac_word... " >&6; }
17182if ${ac_cv_path_XCODEBUILD+:} false; then :
17183  $as_echo_n "(cached) " >&6
17184else
17185  case $XCODEBUILD in
17186  [\\/]* | ?:[\\/]*)
17187  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17188  ;;
17189  *)
17190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17191for as_dir in $TOOLCHAIN_PATH
17192do
17193  IFS=$as_save_IFS
17194  test -z "$as_dir" && as_dir=.
17195    for ac_exec_ext in '' $ac_executable_extensions; do
17196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17197    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17199    break 2
17200  fi
17201done
17202  done
17203IFS=$as_save_IFS
17204
17205  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17206  ;;
17207esac
17208fi
17209XCODEBUILD=$ac_cv_path_XCODEBUILD
17210if test -n "$XCODEBUILD"; then
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17212$as_echo "$XCODEBUILD" >&6; }
17213else
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216fi
17217
17218
17219    else
17220      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17221      # when only the command line tools are installed there are no SDKs, so headers
17222      # are copied into the system frameworks
17223      XCODEBUILD=
17224
17225    fi
17226
17227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17228$as_echo_n "checking for sdk name... " >&6; }
17229
17230# Check whether --with-sdk-name was given.
17231if test "${with_sdk_name+set}" = set; then :
17232  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17233
17234fi
17235
17236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17237$as_echo "$SDKNAME" >&6; }
17238
17239    # if toolchain path is specified then don't rely on system headers, they may not compile
17240    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17241    test -z "$TOOLCHAIN_PATH" && \
17242      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17243
17244    if test -z "$SYSROOT"; then
17245      if test -n "$XCODEBUILD"; then
17246        # if we don't have system headers, use default SDK name (last resort)
17247        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17248          SDKNAME=${SDKNAME:-macosx}
17249        fi
17250
17251        if test -n "$SDKNAME"; then
17252          # Call xcodebuild to determine SYSROOT
17253          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17254        fi
17255      else
17256        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17257          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
17258        fi
17259      fi
17260    else
17261      # warn user if --with-sdk-name was also set
17262      if test -n "$with_sdk_name"; then
17263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17264$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17265      fi
17266    fi
17267
17268    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17269      # If no system framework headers, then SYSROOT must be set, or we won't build
17270      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
17271    fi
17272
17273    # Perform a basic sanity test
17274    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17275      if test -z "$SYSROOT"; then
17276        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
17277      else
17278        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17279      fi
17280    fi
17281
17282    # set SDKROOT too, Xcode tools will pick it up
17283    SDKROOT=$SYSROOT
17284
17285  fi
17286
17287  # Prepend the extra path to the global path
17288
17289  if test "x$EXTRA_PATH" != x; then
17290    if test "x$PATH" = x; then
17291      PATH="$EXTRA_PATH"
17292    else
17293      PATH="$EXTRA_PATH:$PATH"
17294    fi
17295  fi
17296
17297
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17299$as_echo_n "checking for sysroot... " >&6; }
17300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17301$as_echo "$SYSROOT" >&6; }
17302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17303$as_echo_n "checking for toolchain path... " >&6; }
17304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17305$as_echo "$TOOLCHAIN_PATH" >&6; }
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17307$as_echo_n "checking for extra path... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17309$as_echo "$EXTRA_PATH" >&6; }
17310
17311
17312# To properly create a configuration name, we need to have the OpenJDK target
17313# and options (variants and debug level) parsed.
17314
17315
17316
17317# Check whether --with-conf-name was given.
17318if test "${with_conf_name+set}" = set; then :
17319  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17320fi
17321
17322
17323  # Test from where we are running configure, in or outside of src root.
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17325$as_echo_n "checking where to store configuration... " >&6; }
17326  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17327      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17328      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17329    # We are running configure from the src root.
17330    # Create a default ./build/target-variant-debuglevel output root.
17331    if test "x${CONF_NAME}" = x; then
17332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17333$as_echo "in default location" >&6; }
17334      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17335    else
17336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17337$as_echo "in build directory with custom name" >&6; }
17338    fi
17339    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17340    $MKDIR -p "$OUTPUT_ROOT"
17341    if test ! -d "$OUTPUT_ROOT"; then
17342      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17343    fi
17344  else
17345    # We are running configure from outside of the src dir.
17346    # Then use the current directory as output dir!
17347    # If configuration is situated in normal build directory, just use the build
17348    # directory name as configuration name, otherwise use the complete path.
17349    if test "x${CONF_NAME}" = x; then
17350      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17351    fi
17352    OUTPUT_ROOT="$CURDIR"
17353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17354$as_echo "in current directory" >&6; }
17355
17356    # WARNING: This might be a bad thing to do. You need to be sure you want to
17357    # have a configuration in this directory. Do some sanity checks!
17358
17359    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17360      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17361      # other files
17362      files_present=`$LS $OUTPUT_ROOT`
17363      # Configure has already touched config.log and confdefs.h in the current dir when this check
17364      # is performed.
17365      filtered_files=`$ECHO "$files_present" \
17366          | $SED -e 's/config.log//g' \
17367              -e 's/configure.log//g' \
17368              -e 's/confdefs.h//g' \
17369              -e 's/ //g' \
17370          | $TR -d '\n'`
17371      if test "x$filtered_files" != x; then
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17373$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17375$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17376        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17377$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17379$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17380        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17381$as_echo "$as_me: seriously mess up just about everything." >&6;}
17382        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17383$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17384        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17385$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17386        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17387      fi
17388    fi
17389  fi
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17391$as_echo_n "checking what configuration name to use... " >&6; }
17392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17393$as_echo "$CONF_NAME" >&6; }
17394
17395
17396  # Only process if variable expands to non-empty
17397
17398  if test "x$OUTPUT_ROOT" != x; then
17399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400
17401  # Input might be given as Windows format, start by converting to
17402  # unix format.
17403  path="$OUTPUT_ROOT"
17404  new_path=`$CYGPATH -u "$path"`
17405
17406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17409  # "foo.exe" is OK but "foo" is an error.
17410  #
17411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17412  # It is also a way to make sure we got the proper file name for the real test later on.
17413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17414  if test "x$test_shortpath" = x; then
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17416$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17417    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17418  fi
17419
17420  # Call helper function which possibly converts this using DOS-style short mode.
17421  # If so, the updated path is stored in $new_path.
17422
17423  input_path="$new_path"
17424  # Check if we need to convert this using DOS-style short mode. If the path
17425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17426  # take no chances and rewrite it.
17427  # Note: m4 eats our [], so we need to use [ and ] instead.
17428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17429  if test "x$has_forbidden_chars" != x; then
17430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17434      # Going to short mode and back again did indeed matter. Since short mode is
17435      # case insensitive, let's make it lowercase to improve readability.
17436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17437      # Now convert it back to Unix-style (cygpath)
17438      input_path=`$CYGPATH -u "$shortmode_path"`
17439      new_path="$input_path"
17440    fi
17441  fi
17442
17443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17444  if test "x$test_cygdrive_prefix" = x; then
17445    # As a simple fix, exclude /usr/bin since it's not a real path.
17446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17448      # a path prefixed by /cygdrive for fixpath to work.
17449      new_path="$CYGWIN_ROOT_PATH$input_path"
17450    fi
17451  fi
17452
17453
17454  if test "x$path" != "x$new_path"; then
17455    OUTPUT_ROOT="$new_path"
17456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17457$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17458  fi
17459
17460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17461
17462  path="$OUTPUT_ROOT"
17463  has_colon=`$ECHO $path | $GREP ^.:`
17464  new_path="$path"
17465  if test "x$has_colon" = x; then
17466    # Not in mixed or Windows style, start by that.
17467    new_path=`cmd //c echo $path`
17468  fi
17469
17470
17471  input_path="$new_path"
17472  # Check if we need to convert this using DOS-style short mode. If the path
17473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17474  # take no chances and rewrite it.
17475  # Note: m4 eats our [], so we need to use [ and ] instead.
17476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17477  if test "x$has_forbidden_chars" != x; then
17478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17480  fi
17481
17482
17483  windows_path="$new_path"
17484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17485    unix_path=`$CYGPATH -u "$windows_path"`
17486    new_path="$unix_path"
17487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17489    new_path="$unix_path"
17490  fi
17491
17492  if test "x$path" != "x$new_path"; then
17493    OUTPUT_ROOT="$new_path"
17494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17495$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17496  fi
17497
17498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17500
17501    else
17502      # We're on a unix platform. Hooray! :)
17503      path="$OUTPUT_ROOT"
17504      has_space=`$ECHO "$path" | $GREP " "`
17505      if test "x$has_space" != x; then
17506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17507$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17509      fi
17510
17511      # Use eval to expand a potential ~
17512      eval path="$path"
17513      if test ! -f "$path" && test ! -d "$path"; then
17514        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17515      fi
17516
17517      if test -d "$path"; then
17518        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17519      else
17520        dir="`$DIRNAME "$path"`"
17521        base="`$BASENAME "$path"`"
17522        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17523      fi
17524    fi
17525  fi
17526
17527
17528  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17529  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17530
17531  SPEC=$OUTPUT_ROOT/spec.gmk
17532
17533  CONF_NAME=$CONF_NAME
17534
17535  OUTPUT_ROOT=$OUTPUT_ROOT
17536
17537
17538
17539  # The spec.gmk file contains all variables for the make system.
17540  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17541
17542  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17543  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17544
17545  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17546  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17547
17548  # The compare.sh is used to compare the build output to other builds.
17549  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17550
17551  # The generated Makefile knows where the spec.gmk is and where the source is.
17552  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17553  # which will look for generated configurations
17554  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17555
17556
17557
17558# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17559
17560  for ac_prog in apt-get yum brew port pkgutil pkgadd
17561do
17562  # Extract the first word of "$ac_prog", so it can be a program name with args.
17563set dummy $ac_prog; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_prog_PKGHANDLER+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  if test -n "$PKGHANDLER"; then
17570  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17571else
17572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17573for as_dir in $PATH
17574do
17575  IFS=$as_save_IFS
17576  test -z "$as_dir" && as_dir=.
17577    for ac_exec_ext in '' $ac_executable_extensions; do
17578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17579    ac_cv_prog_PKGHANDLER="$ac_prog"
17580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17581    break 2
17582  fi
17583done
17584  done
17585IFS=$as_save_IFS
17586
17587fi
17588fi
17589PKGHANDLER=$ac_cv_prog_PKGHANDLER
17590if test -n "$PKGHANDLER"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17592$as_echo "$PKGHANDLER" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599  test -n "$PKGHANDLER" && break
17600done
17601
17602
17603
17604# Setup tools that requires more complex handling, or that is not needed by the configure script.
17605
17606
17607
17608  # Publish this variable in the help.
17609
17610
17611  if [ -z "${MAKE+x}" ]; then
17612    # The variable is not set by user, try to locate tool using the code snippet
17613
17614    # Try our hardest to locate a correct version of GNU make
17615    for ac_prog in gmake
17616do
17617  # Extract the first word of "$ac_prog", so it can be a program name with args.
17618set dummy $ac_prog; ac_word=$2
17619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17620$as_echo_n "checking for $ac_word... " >&6; }
17621if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17622  $as_echo_n "(cached) " >&6
17623else
17624  case $CHECK_GMAKE in
17625  [\\/]* | ?:[\\/]*)
17626  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17627  ;;
17628  *)
17629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17630for as_dir in $PATH
17631do
17632  IFS=$as_save_IFS
17633  test -z "$as_dir" && as_dir=.
17634    for ac_exec_ext in '' $ac_executable_extensions; do
17635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17636    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17638    break 2
17639  fi
17640done
17641  done
17642IFS=$as_save_IFS
17643
17644  ;;
17645esac
17646fi
17647CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17648if test -n "$CHECK_GMAKE"; then
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17650$as_echo "$CHECK_GMAKE" >&6; }
17651else
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17653$as_echo "no" >&6; }
17654fi
17655
17656
17657  test -n "$CHECK_GMAKE" && break
17658done
17659
17660
17661  MAKE_CANDIDATE=""$CHECK_GMAKE""
17662  DESCRIPTION="gmake in PATH"
17663
17664  # On Cygwin, we require a newer version of make than on other platforms
17665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17666    MAKE_VERSION_EXPR="-e 4\."
17667    MAKE_REQUIRED_VERSION="4.0"
17668   else
17669    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17670    MAKE_REQUIRED_VERSION="3.81"
17671  fi
17672
17673  if test "x$MAKE_CANDIDATE" != x; then
17674    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17675$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17676    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17677    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17678    if test "x$IS_GNU_MAKE" = x; then
17679      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17680$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17681    else
17682      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17683      if test "x$IS_MODERN_MAKE" = x; then
17684        { $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
17685$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;}
17686      else
17687        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17688          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17689            MAKE_EXPECTED_ENV='cygwin'
17690          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17691            MAKE_EXPECTED_ENV='msys'
17692          else
17693            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17694          fi
17695          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17696          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17697        else
17698          # Not relevant for non-Windows
17699          IS_MAKE_CORRECT_ENV=true
17700        fi
17701        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17702          { $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
17703$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;}
17704        else
17705          FOUND_MAKE=$MAKE_CANDIDATE
17706
17707  # Only process if variable expands to non-empty
17708
17709  if test "x$FOUND_MAKE" != x; then
17710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711
17712  # First separate the path from the arguments. This will split at the first
17713  # space.
17714  complete="$FOUND_MAKE"
17715  path="${complete%% *}"
17716  tmp="$complete EOL"
17717  arguments="${tmp#* }"
17718
17719  # Input might be given as Windows format, start by converting to
17720  # unix format.
17721  new_path=`$CYGPATH -u "$path"`
17722
17723  # Now try to locate executable using which
17724  new_path=`$WHICH "$new_path" 2> /dev/null`
17725  # bat and cmd files are not always considered executable in cygwin causing which
17726  # to not find them
17727  if test "x$new_path" = x \
17728      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17729      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17730    new_path=`$CYGPATH -u "$path"`
17731  fi
17732  if test "x$new_path" = x; then
17733    # Oops. Which didn't find the executable.
17734    # The splitting of arguments from the executable at a space might have been incorrect,
17735    # since paths with space are more likely in Windows. Give it another try with the whole
17736    # argument.
17737    path="$complete"
17738    arguments="EOL"
17739    new_path=`$CYGPATH -u "$path"`
17740    new_path=`$WHICH "$new_path" 2> /dev/null`
17741    # bat and cmd files are not always considered executable in cygwin causing which
17742    # to not find them
17743    if test "x$new_path" = x \
17744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17746      new_path=`$CYGPATH -u "$path"`
17747    fi
17748    if test "x$new_path" = x; then
17749      # It's still not found. Now this is an unrecoverable error.
17750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17752      has_space=`$ECHO "$complete" | $GREP " "`
17753      if test "x$has_space" != x; then
17754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17756      fi
17757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17758    fi
17759  fi
17760
17761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17764  # "foo.exe" is OK but "foo" is an error.
17765  #
17766  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17767  # It is also a way to make sure we got the proper file name for the real test later on.
17768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17769  if test "x$test_shortpath" = x; then
17770    # Short path failed, file does not exist as specified.
17771    # Try adding .exe or .cmd
17772    if test -f "${new_path}.exe"; then
17773      input_to_shortpath="${new_path}.exe"
17774    elif test -f "${new_path}.cmd"; then
17775      input_to_shortpath="${new_path}.cmd"
17776    else
17777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17778$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17781      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17782    fi
17783  else
17784    input_to_shortpath="$new_path"
17785  fi
17786
17787  # Call helper function which possibly converts this using DOS-style short mode.
17788  # If so, the updated path is stored in $new_path.
17789  new_path="$input_to_shortpath"
17790
17791  input_path="$input_to_shortpath"
17792  # Check if we need to convert this using DOS-style short mode. If the path
17793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17794  # take no chances and rewrite it.
17795  # Note: m4 eats our [], so we need to use [ and ] instead.
17796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17797  if test "x$has_forbidden_chars" != x; then
17798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17802      # Going to short mode and back again did indeed matter. Since short mode is
17803      # case insensitive, let's make it lowercase to improve readability.
17804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17805      # Now convert it back to Unix-style (cygpath)
17806      input_path=`$CYGPATH -u "$shortmode_path"`
17807      new_path="$input_path"
17808    fi
17809  fi
17810
17811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17812  if test "x$test_cygdrive_prefix" = x; then
17813    # As a simple fix, exclude /usr/bin since it's not a real path.
17814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17816      # a path prefixed by /cygdrive for fixpath to work.
17817      new_path="$CYGWIN_ROOT_PATH$input_path"
17818    fi
17819  fi
17820
17821  # remove trailing .exe if any
17822  new_path="${new_path/%.exe/}"
17823
17824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17825
17826  # First separate the path from the arguments. This will split at the first
17827  # space.
17828  complete="$FOUND_MAKE"
17829  path="${complete%% *}"
17830  tmp="$complete EOL"
17831  arguments="${tmp#* }"
17832
17833  # Input might be given as Windows format, start by converting to
17834  # unix format.
17835  new_path="$path"
17836
17837  windows_path="$new_path"
17838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17839    unix_path=`$CYGPATH -u "$windows_path"`
17840    new_path="$unix_path"
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17843    new_path="$unix_path"
17844  fi
17845
17846
17847  # Now try to locate executable using which
17848  new_path=`$WHICH "$new_path" 2> /dev/null`
17849
17850  if test "x$new_path" = x; then
17851    # Oops. Which didn't find the executable.
17852    # The splitting of arguments from the executable at a space might have been incorrect,
17853    # since paths with space are more likely in Windows. Give it another try with the whole
17854    # argument.
17855    path="$complete"
17856    arguments="EOL"
17857    new_path="$path"
17858
17859  windows_path="$new_path"
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    unix_path=`$CYGPATH -u "$windows_path"`
17862    new_path="$unix_path"
17863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17865    new_path="$unix_path"
17866  fi
17867
17868
17869    new_path=`$WHICH "$new_path" 2> /dev/null`
17870    # bat and cmd files are not always considered executable in MSYS causing which
17871    # to not find them
17872    if test "x$new_path" = x \
17873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17875      new_path="$path"
17876
17877  windows_path="$new_path"
17878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879    unix_path=`$CYGPATH -u "$windows_path"`
17880    new_path="$unix_path"
17881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17883    new_path="$unix_path"
17884  fi
17885
17886    fi
17887
17888    if test "x$new_path" = x; then
17889      # It's still not found. Now this is an unrecoverable error.
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17892      has_space=`$ECHO "$complete" | $GREP " "`
17893      if test "x$has_space" != x; then
17894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17896      fi
17897      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17898    fi
17899  fi
17900
17901  # Now new_path has a complete unix path to the binary
17902  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17903    # Keep paths in /bin as-is, but remove trailing .exe if any
17904    new_path="${new_path/%.exe/}"
17905    # Do not save /bin paths to all_fixpath_prefixes!
17906  else
17907    # Not in mixed or Windows style, start by that.
17908    new_path=`cmd //c echo $new_path`
17909
17910  input_path="$new_path"
17911  # Check if we need to convert this using DOS-style short mode. If the path
17912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17913  # take no chances and rewrite it.
17914  # Note: m4 eats our [], so we need to use [ and ] instead.
17915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17916  if test "x$has_forbidden_chars" != x; then
17917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17919  fi
17920
17921    # Output is in $new_path
17922
17923  windows_path="$new_path"
17924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17925    unix_path=`$CYGPATH -u "$windows_path"`
17926    new_path="$unix_path"
17927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17929    new_path="$unix_path"
17930  fi
17931
17932    # remove trailing .exe if any
17933    new_path="${new_path/%.exe/}"
17934
17935    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17936    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17937  fi
17938
17939    else
17940      # We're on a unix platform. Hooray! :)
17941      # First separate the path from the arguments. This will split at the first
17942      # space.
17943      complete="$FOUND_MAKE"
17944      path="${complete%% *}"
17945      tmp="$complete EOL"
17946      arguments="${tmp#* }"
17947
17948      # Cannot rely on the command "which" here since it doesn't always work.
17949      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17950      if test -z "$is_absolute_path"; then
17951        # Path to executable is not absolute. Find it.
17952        IFS_save="$IFS"
17953        IFS=:
17954        for p in $PATH; do
17955          if test -f "$p/$path" && test -x "$p/$path"; then
17956            new_path="$p/$path"
17957            break
17958          fi
17959        done
17960        IFS="$IFS_save"
17961      else
17962        # This is an absolute path, we can use it without further modifications.
17963        new_path="$path"
17964      fi
17965
17966      if test "x$new_path" = x; then
17967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17969        has_space=`$ECHO "$complete" | $GREP " "`
17970        if test "x$has_space" != x; then
17971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17973        fi
17974        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17975      fi
17976    fi
17977
17978    # Now join together the path and the arguments once again
17979    if test "x$arguments" != xEOL; then
17980      new_complete="$new_path ${arguments% *}"
17981    else
17982      new_complete="$new_path"
17983    fi
17984
17985    if test "x$complete" != "x$new_complete"; then
17986      FOUND_MAKE="$new_complete"
17987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17988$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17989    fi
17990  fi
17991
17992        fi
17993      fi
17994    fi
17995  fi
17996
17997
17998    if test "x$FOUND_MAKE" = x; then
17999      for ac_prog in make
18000do
18001  # Extract the first word of "$ac_prog", so it can be a program name with args.
18002set dummy $ac_prog; ac_word=$2
18003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18004$as_echo_n "checking for $ac_word... " >&6; }
18005if ${ac_cv_path_CHECK_MAKE+:} false; then :
18006  $as_echo_n "(cached) " >&6
18007else
18008  case $CHECK_MAKE in
18009  [\\/]* | ?:[\\/]*)
18010  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18011  ;;
18012  *)
18013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18014for as_dir in $PATH
18015do
18016  IFS=$as_save_IFS
18017  test -z "$as_dir" && as_dir=.
18018    for ac_exec_ext in '' $ac_executable_extensions; do
18019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18020    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18022    break 2
18023  fi
18024done
18025  done
18026IFS=$as_save_IFS
18027
18028  ;;
18029esac
18030fi
18031CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18032if test -n "$CHECK_MAKE"; then
18033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18034$as_echo "$CHECK_MAKE" >&6; }
18035else
18036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18037$as_echo "no" >&6; }
18038fi
18039
18040
18041  test -n "$CHECK_MAKE" && break
18042done
18043
18044
18045  MAKE_CANDIDATE=""$CHECK_MAKE""
18046  DESCRIPTION="make in PATH"
18047
18048  # On Cygwin, we require a newer version of make than on other platforms
18049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18050    MAKE_VERSION_EXPR="-e 4\."
18051    MAKE_REQUIRED_VERSION="4.0"
18052   else
18053    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18054    MAKE_REQUIRED_VERSION="3.81"
18055  fi
18056
18057  if test "x$MAKE_CANDIDATE" != x; then
18058    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18059$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18060    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18061    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18062    if test "x$IS_GNU_MAKE" = x; then
18063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18064$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18065    else
18066      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18067      if test "x$IS_MODERN_MAKE" = x; then
18068        { $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
18069$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;}
18070      else
18071        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18072          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18073            MAKE_EXPECTED_ENV='cygwin'
18074          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075            MAKE_EXPECTED_ENV='msys'
18076          else
18077            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18078          fi
18079          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18080          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18081        else
18082          # Not relevant for non-Windows
18083          IS_MAKE_CORRECT_ENV=true
18084        fi
18085        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18086          { $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
18087$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;}
18088        else
18089          FOUND_MAKE=$MAKE_CANDIDATE
18090
18091  # Only process if variable expands to non-empty
18092
18093  if test "x$FOUND_MAKE" != x; then
18094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095
18096  # First separate the path from the arguments. This will split at the first
18097  # space.
18098  complete="$FOUND_MAKE"
18099  path="${complete%% *}"
18100  tmp="$complete EOL"
18101  arguments="${tmp#* }"
18102
18103  # Input might be given as Windows format, start by converting to
18104  # unix format.
18105  new_path=`$CYGPATH -u "$path"`
18106
18107  # Now try to locate executable using which
18108  new_path=`$WHICH "$new_path" 2> /dev/null`
18109  # bat and cmd files are not always considered executable in cygwin causing which
18110  # to not find them
18111  if test "x$new_path" = x \
18112      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18113      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18114    new_path=`$CYGPATH -u "$path"`
18115  fi
18116  if test "x$new_path" = x; then
18117    # Oops. Which didn't find the executable.
18118    # The splitting of arguments from the executable at a space might have been incorrect,
18119    # since paths with space are more likely in Windows. Give it another try with the whole
18120    # argument.
18121    path="$complete"
18122    arguments="EOL"
18123    new_path=`$CYGPATH -u "$path"`
18124    new_path=`$WHICH "$new_path" 2> /dev/null`
18125    # bat and cmd files are not always considered executable in cygwin causing which
18126    # to not find them
18127    if test "x$new_path" = x \
18128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18130      new_path=`$CYGPATH -u "$path"`
18131    fi
18132    if test "x$new_path" = x; then
18133      # It's still not found. Now this is an unrecoverable error.
18134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18136      has_space=`$ECHO "$complete" | $GREP " "`
18137      if test "x$has_space" != x; then
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18140      fi
18141      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18142    fi
18143  fi
18144
18145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18148  # "foo.exe" is OK but "foo" is an error.
18149  #
18150  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18151  # It is also a way to make sure we got the proper file name for the real test later on.
18152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18153  if test "x$test_shortpath" = x; then
18154    # Short path failed, file does not exist as specified.
18155    # Try adding .exe or .cmd
18156    if test -f "${new_path}.exe"; then
18157      input_to_shortpath="${new_path}.exe"
18158    elif test -f "${new_path}.cmd"; then
18159      input_to_shortpath="${new_path}.cmd"
18160    else
18161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18165      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18166    fi
18167  else
18168    input_to_shortpath="$new_path"
18169  fi
18170
18171  # Call helper function which possibly converts this using DOS-style short mode.
18172  # If so, the updated path is stored in $new_path.
18173  new_path="$input_to_shortpath"
18174
18175  input_path="$input_to_shortpath"
18176  # Check if we need to convert this using DOS-style short mode. If the path
18177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18178  # take no chances and rewrite it.
18179  # Note: m4 eats our [], so we need to use [ and ] instead.
18180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18181  if test "x$has_forbidden_chars" != x; then
18182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18186      # Going to short mode and back again did indeed matter. Since short mode is
18187      # case insensitive, let's make it lowercase to improve readability.
18188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18189      # Now convert it back to Unix-style (cygpath)
18190      input_path=`$CYGPATH -u "$shortmode_path"`
18191      new_path="$input_path"
18192    fi
18193  fi
18194
18195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18196  if test "x$test_cygdrive_prefix" = x; then
18197    # As a simple fix, exclude /usr/bin since it's not a real path.
18198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18200      # a path prefixed by /cygdrive for fixpath to work.
18201      new_path="$CYGWIN_ROOT_PATH$input_path"
18202    fi
18203  fi
18204
18205  # remove trailing .exe if any
18206  new_path="${new_path/%.exe/}"
18207
18208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209
18210  # First separate the path from the arguments. This will split at the first
18211  # space.
18212  complete="$FOUND_MAKE"
18213  path="${complete%% *}"
18214  tmp="$complete EOL"
18215  arguments="${tmp#* }"
18216
18217  # Input might be given as Windows format, start by converting to
18218  # unix format.
18219  new_path="$path"
18220
18221  windows_path="$new_path"
18222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18223    unix_path=`$CYGPATH -u "$windows_path"`
18224    new_path="$unix_path"
18225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18227    new_path="$unix_path"
18228  fi
18229
18230
18231  # Now try to locate executable using which
18232  new_path=`$WHICH "$new_path" 2> /dev/null`
18233
18234  if test "x$new_path" = x; then
18235    # Oops. Which didn't find the executable.
18236    # The splitting of arguments from the executable at a space might have been incorrect,
18237    # since paths with space are more likely in Windows. Give it another try with the whole
18238    # argument.
18239    path="$complete"
18240    arguments="EOL"
18241    new_path="$path"
18242
18243  windows_path="$new_path"
18244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245    unix_path=`$CYGPATH -u "$windows_path"`
18246    new_path="$unix_path"
18247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18249    new_path="$unix_path"
18250  fi
18251
18252
18253    new_path=`$WHICH "$new_path" 2> /dev/null`
18254    # bat and cmd files are not always considered executable in MSYS causing which
18255    # to not find them
18256    if test "x$new_path" = x \
18257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18259      new_path="$path"
18260
18261  windows_path="$new_path"
18262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18263    unix_path=`$CYGPATH -u "$windows_path"`
18264    new_path="$unix_path"
18265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18267    new_path="$unix_path"
18268  fi
18269
18270    fi
18271
18272    if test "x$new_path" = x; then
18273      # It's still not found. Now this is an unrecoverable error.
18274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18275$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18276      has_space=`$ECHO "$complete" | $GREP " "`
18277      if test "x$has_space" != x; then
18278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18280      fi
18281      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18282    fi
18283  fi
18284
18285  # Now new_path has a complete unix path to the binary
18286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18287    # Keep paths in /bin as-is, but remove trailing .exe if any
18288    new_path="${new_path/%.exe/}"
18289    # Do not save /bin paths to all_fixpath_prefixes!
18290  else
18291    # Not in mixed or Windows style, start by that.
18292    new_path=`cmd //c echo $new_path`
18293
18294  input_path="$new_path"
18295  # Check if we need to convert this using DOS-style short mode. If the path
18296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18297  # take no chances and rewrite it.
18298  # Note: m4 eats our [], so we need to use [ and ] instead.
18299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18300  if test "x$has_forbidden_chars" != x; then
18301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18303  fi
18304
18305    # Output is in $new_path
18306
18307  windows_path="$new_path"
18308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18309    unix_path=`$CYGPATH -u "$windows_path"`
18310    new_path="$unix_path"
18311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18313    new_path="$unix_path"
18314  fi
18315
18316    # remove trailing .exe if any
18317    new_path="${new_path/%.exe/}"
18318
18319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18321  fi
18322
18323    else
18324      # We're on a unix platform. Hooray! :)
18325      # First separate the path from the arguments. This will split at the first
18326      # space.
18327      complete="$FOUND_MAKE"
18328      path="${complete%% *}"
18329      tmp="$complete EOL"
18330      arguments="${tmp#* }"
18331
18332      # Cannot rely on the command "which" here since it doesn't always work.
18333      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18334      if test -z "$is_absolute_path"; then
18335        # Path to executable is not absolute. Find it.
18336        IFS_save="$IFS"
18337        IFS=:
18338        for p in $PATH; do
18339          if test -f "$p/$path" && test -x "$p/$path"; then
18340            new_path="$p/$path"
18341            break
18342          fi
18343        done
18344        IFS="$IFS_save"
18345      else
18346        # This is an absolute path, we can use it without further modifications.
18347        new_path="$path"
18348      fi
18349
18350      if test "x$new_path" = x; then
18351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18353        has_space=`$ECHO "$complete" | $GREP " "`
18354        if test "x$has_space" != x; then
18355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18357        fi
18358        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18359      fi
18360    fi
18361
18362    # Now join together the path and the arguments once again
18363    if test "x$arguments" != xEOL; then
18364      new_complete="$new_path ${arguments% *}"
18365    else
18366      new_complete="$new_path"
18367    fi
18368
18369    if test "x$complete" != "x$new_complete"; then
18370      FOUND_MAKE="$new_complete"
18371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18372$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18373    fi
18374  fi
18375
18376        fi
18377      fi
18378    fi
18379  fi
18380
18381    fi
18382
18383    if test "x$FOUND_MAKE" = x; then
18384      if test "x$TOOLCHAIN_PATH" != x; then
18385        # We have a toolchain path, check that as well before giving up.
18386        OLD_PATH=$PATH
18387        PATH=$TOOLCHAIN_PATH:$PATH
18388        for ac_prog in gmake
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $CHECK_TOOLSDIR_GMAKE in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18421if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18423$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18431done
18432
18433
18434  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18435  DESCRIPTION="gmake in tools-dir"
18436
18437  # On Cygwin, we require a newer version of make than on other platforms
18438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18439    MAKE_VERSION_EXPR="-e 4\."
18440    MAKE_REQUIRED_VERSION="4.0"
18441   else
18442    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18443    MAKE_REQUIRED_VERSION="3.81"
18444  fi
18445
18446  if test "x$MAKE_CANDIDATE" != x; then
18447    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18448$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18449    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18450    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18451    if test "x$IS_GNU_MAKE" = x; then
18452      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18453$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18454    else
18455      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18456      if test "x$IS_MODERN_MAKE" = x; then
18457        { $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
18458$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;}
18459      else
18460        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18461          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18462            MAKE_EXPECTED_ENV='cygwin'
18463          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18464            MAKE_EXPECTED_ENV='msys'
18465          else
18466            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18467          fi
18468          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18469          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18470        else
18471          # Not relevant for non-Windows
18472          IS_MAKE_CORRECT_ENV=true
18473        fi
18474        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18475          { $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
18476$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;}
18477        else
18478          FOUND_MAKE=$MAKE_CANDIDATE
18479
18480  # Only process if variable expands to non-empty
18481
18482  if test "x$FOUND_MAKE" != x; then
18483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18484
18485  # First separate the path from the arguments. This will split at the first
18486  # space.
18487  complete="$FOUND_MAKE"
18488  path="${complete%% *}"
18489  tmp="$complete EOL"
18490  arguments="${tmp#* }"
18491
18492  # Input might be given as Windows format, start by converting to
18493  # unix format.
18494  new_path=`$CYGPATH -u "$path"`
18495
18496  # Now try to locate executable using which
18497  new_path=`$WHICH "$new_path" 2> /dev/null`
18498  # bat and cmd files are not always considered executable in cygwin causing which
18499  # to not find them
18500  if test "x$new_path" = x \
18501      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18502      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18503    new_path=`$CYGPATH -u "$path"`
18504  fi
18505  if test "x$new_path" = x; then
18506    # Oops. Which didn't find the executable.
18507    # The splitting of arguments from the executable at a space might have been incorrect,
18508    # since paths with space are more likely in Windows. Give it another try with the whole
18509    # argument.
18510    path="$complete"
18511    arguments="EOL"
18512    new_path=`$CYGPATH -u "$path"`
18513    new_path=`$WHICH "$new_path" 2> /dev/null`
18514    # bat and cmd files are not always considered executable in cygwin causing which
18515    # to not find them
18516    if test "x$new_path" = x \
18517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18519      new_path=`$CYGPATH -u "$path"`
18520    fi
18521    if test "x$new_path" = x; then
18522      # It's still not found. Now this is an unrecoverable error.
18523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18524$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18525      has_space=`$ECHO "$complete" | $GREP " "`
18526      if test "x$has_space" != x; then
18527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18529      fi
18530      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18531    fi
18532  fi
18533
18534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18537  # "foo.exe" is OK but "foo" is an error.
18538  #
18539  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18540  # It is also a way to make sure we got the proper file name for the real test later on.
18541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18542  if test "x$test_shortpath" = x; then
18543    # Short path failed, file does not exist as specified.
18544    # Try adding .exe or .cmd
18545    if test -f "${new_path}.exe"; then
18546      input_to_shortpath="${new_path}.exe"
18547    elif test -f "${new_path}.cmd"; then
18548      input_to_shortpath="${new_path}.cmd"
18549    else
18550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18552      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18553$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18554      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18555    fi
18556  else
18557    input_to_shortpath="$new_path"
18558  fi
18559
18560  # Call helper function which possibly converts this using DOS-style short mode.
18561  # If so, the updated path is stored in $new_path.
18562  new_path="$input_to_shortpath"
18563
18564  input_path="$input_to_shortpath"
18565  # Check if we need to convert this using DOS-style short mode. If the path
18566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18567  # take no chances and rewrite it.
18568  # Note: m4 eats our [], so we need to use [ and ] instead.
18569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18570  if test "x$has_forbidden_chars" != x; then
18571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18575      # Going to short mode and back again did indeed matter. Since short mode is
18576      # case insensitive, let's make it lowercase to improve readability.
18577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18578      # Now convert it back to Unix-style (cygpath)
18579      input_path=`$CYGPATH -u "$shortmode_path"`
18580      new_path="$input_path"
18581    fi
18582  fi
18583
18584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18585  if test "x$test_cygdrive_prefix" = x; then
18586    # As a simple fix, exclude /usr/bin since it's not a real path.
18587    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18589      # a path prefixed by /cygdrive for fixpath to work.
18590      new_path="$CYGWIN_ROOT_PATH$input_path"
18591    fi
18592  fi
18593
18594  # remove trailing .exe if any
18595  new_path="${new_path/%.exe/}"
18596
18597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18598
18599  # First separate the path from the arguments. This will split at the first
18600  # space.
18601  complete="$FOUND_MAKE"
18602  path="${complete%% *}"
18603  tmp="$complete EOL"
18604  arguments="${tmp#* }"
18605
18606  # Input might be given as Windows format, start by converting to
18607  # unix format.
18608  new_path="$path"
18609
18610  windows_path="$new_path"
18611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18612    unix_path=`$CYGPATH -u "$windows_path"`
18613    new_path="$unix_path"
18614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18616    new_path="$unix_path"
18617  fi
18618
18619
18620  # Now try to locate executable using which
18621  new_path=`$WHICH "$new_path" 2> /dev/null`
18622
18623  if test "x$new_path" = x; then
18624    # Oops. Which didn't find the executable.
18625    # The splitting of arguments from the executable at a space might have been incorrect,
18626    # since paths with space are more likely in Windows. Give it another try with the whole
18627    # argument.
18628    path="$complete"
18629    arguments="EOL"
18630    new_path="$path"
18631
18632  windows_path="$new_path"
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    unix_path=`$CYGPATH -u "$windows_path"`
18635    new_path="$unix_path"
18636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638    new_path="$unix_path"
18639  fi
18640
18641
18642    new_path=`$WHICH "$new_path" 2> /dev/null`
18643    # bat and cmd files are not always considered executable in MSYS causing which
18644    # to not find them
18645    if test "x$new_path" = x \
18646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18648      new_path="$path"
18649
18650  windows_path="$new_path"
18651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18652    unix_path=`$CYGPATH -u "$windows_path"`
18653    new_path="$unix_path"
18654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18656    new_path="$unix_path"
18657  fi
18658
18659    fi
18660
18661    if test "x$new_path" = x; then
18662      # It's still not found. Now this is an unrecoverable error.
18663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18665      has_space=`$ECHO "$complete" | $GREP " "`
18666      if test "x$has_space" != x; then
18667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18669      fi
18670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18671    fi
18672  fi
18673
18674  # Now new_path has a complete unix path to the binary
18675  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18676    # Keep paths in /bin as-is, but remove trailing .exe if any
18677    new_path="${new_path/%.exe/}"
18678    # Do not save /bin paths to all_fixpath_prefixes!
18679  else
18680    # Not in mixed or Windows style, start by that.
18681    new_path=`cmd //c echo $new_path`
18682
18683  input_path="$new_path"
18684  # Check if we need to convert this using DOS-style short mode. If the path
18685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18686  # take no chances and rewrite it.
18687  # Note: m4 eats our [], so we need to use [ and ] instead.
18688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18689  if test "x$has_forbidden_chars" != x; then
18690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18692  fi
18693
18694    # Output is in $new_path
18695
18696  windows_path="$new_path"
18697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18698    unix_path=`$CYGPATH -u "$windows_path"`
18699    new_path="$unix_path"
18700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18702    new_path="$unix_path"
18703  fi
18704
18705    # remove trailing .exe if any
18706    new_path="${new_path/%.exe/}"
18707
18708    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18709    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18710  fi
18711
18712    else
18713      # We're on a unix platform. Hooray! :)
18714      # First separate the path from the arguments. This will split at the first
18715      # space.
18716      complete="$FOUND_MAKE"
18717      path="${complete%% *}"
18718      tmp="$complete EOL"
18719      arguments="${tmp#* }"
18720
18721      # Cannot rely on the command "which" here since it doesn't always work.
18722      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18723      if test -z "$is_absolute_path"; then
18724        # Path to executable is not absolute. Find it.
18725        IFS_save="$IFS"
18726        IFS=:
18727        for p in $PATH; do
18728          if test -f "$p/$path" && test -x "$p/$path"; then
18729            new_path="$p/$path"
18730            break
18731          fi
18732        done
18733        IFS="$IFS_save"
18734      else
18735        # This is an absolute path, we can use it without further modifications.
18736        new_path="$path"
18737      fi
18738
18739      if test "x$new_path" = x; then
18740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18742        has_space=`$ECHO "$complete" | $GREP " "`
18743        if test "x$has_space" != x; then
18744          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18745$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18746        fi
18747        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18748      fi
18749    fi
18750
18751    # Now join together the path and the arguments once again
18752    if test "x$arguments" != xEOL; then
18753      new_complete="$new_path ${arguments% *}"
18754    else
18755      new_complete="$new_path"
18756    fi
18757
18758    if test "x$complete" != "x$new_complete"; then
18759      FOUND_MAKE="$new_complete"
18760      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18761$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18762    fi
18763  fi
18764
18765        fi
18766      fi
18767    fi
18768  fi
18769
18770        if test "x$FOUND_MAKE" = x; then
18771          for ac_prog in make
18772do
18773  # Extract the first word of "$ac_prog", so it can be a program name with args.
18774set dummy $ac_prog; ac_word=$2
18775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18776$as_echo_n "checking for $ac_word... " >&6; }
18777if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18778  $as_echo_n "(cached) " >&6
18779else
18780  case $CHECK_TOOLSDIR_MAKE in
18781  [\\/]* | ?:[\\/]*)
18782  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18783  ;;
18784  *)
18785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18786for as_dir in $PATH
18787do
18788  IFS=$as_save_IFS
18789  test -z "$as_dir" && as_dir=.
18790    for ac_exec_ext in '' $ac_executable_extensions; do
18791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18792    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18794    break 2
18795  fi
18796done
18797  done
18798IFS=$as_save_IFS
18799
18800  ;;
18801esac
18802fi
18803CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18804if test -n "$CHECK_TOOLSDIR_MAKE"; then
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18806$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18807else
18808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18809$as_echo "no" >&6; }
18810fi
18811
18812
18813  test -n "$CHECK_TOOLSDIR_MAKE" && break
18814done
18815
18816
18817  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18818  DESCRIPTION="make in tools-dir"
18819
18820  # On Cygwin, we require a newer version of make than on other platforms
18821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18822    MAKE_VERSION_EXPR="-e 4\."
18823    MAKE_REQUIRED_VERSION="4.0"
18824   else
18825    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18826    MAKE_REQUIRED_VERSION="3.81"
18827  fi
18828
18829  if test "x$MAKE_CANDIDATE" != x; then
18830    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18831$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18832    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18833    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18834    if test "x$IS_GNU_MAKE" = x; then
18835      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18836$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18837    else
18838      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18839      if test "x$IS_MODERN_MAKE" = x; then
18840        { $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
18841$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;}
18842      else
18843        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18844          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18845            MAKE_EXPECTED_ENV='cygwin'
18846          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847            MAKE_EXPECTED_ENV='msys'
18848          else
18849            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18850          fi
18851          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18852          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18853        else
18854          # Not relevant for non-Windows
18855          IS_MAKE_CORRECT_ENV=true
18856        fi
18857        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18858          { $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
18859$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;}
18860        else
18861          FOUND_MAKE=$MAKE_CANDIDATE
18862
18863  # Only process if variable expands to non-empty
18864
18865  if test "x$FOUND_MAKE" != x; then
18866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18867
18868  # First separate the path from the arguments. This will split at the first
18869  # space.
18870  complete="$FOUND_MAKE"
18871  path="${complete%% *}"
18872  tmp="$complete EOL"
18873  arguments="${tmp#* }"
18874
18875  # Input might be given as Windows format, start by converting to
18876  # unix format.
18877  new_path=`$CYGPATH -u "$path"`
18878
18879  # Now try to locate executable using which
18880  new_path=`$WHICH "$new_path" 2> /dev/null`
18881  # bat and cmd files are not always considered executable in cygwin causing which
18882  # to not find them
18883  if test "x$new_path" = x \
18884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18886    new_path=`$CYGPATH -u "$path"`
18887  fi
18888  if test "x$new_path" = x; then
18889    # Oops. Which didn't find the executable.
18890    # The splitting of arguments from the executable at a space might have been incorrect,
18891    # since paths with space are more likely in Windows. Give it another try with the whole
18892    # argument.
18893    path="$complete"
18894    arguments="EOL"
18895    new_path=`$CYGPATH -u "$path"`
18896    new_path=`$WHICH "$new_path" 2> /dev/null`
18897    # bat and cmd files are not always considered executable in cygwin causing which
18898    # to not find them
18899    if test "x$new_path" = x \
18900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18902      new_path=`$CYGPATH -u "$path"`
18903    fi
18904    if test "x$new_path" = x; then
18905      # It's still not found. Now this is an unrecoverable error.
18906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18908      has_space=`$ECHO "$complete" | $GREP " "`
18909      if test "x$has_space" != x; then
18910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18912      fi
18913      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18914    fi
18915  fi
18916
18917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18920  # "foo.exe" is OK but "foo" is an error.
18921  #
18922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18923  # It is also a way to make sure we got the proper file name for the real test later on.
18924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18925  if test "x$test_shortpath" = x; then
18926    # Short path failed, file does not exist as specified.
18927    # Try adding .exe or .cmd
18928    if test -f "${new_path}.exe"; then
18929      input_to_shortpath="${new_path}.exe"
18930    elif test -f "${new_path}.cmd"; then
18931      input_to_shortpath="${new_path}.cmd"
18932    else
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18938    fi
18939  else
18940    input_to_shortpath="$new_path"
18941  fi
18942
18943  # Call helper function which possibly converts this using DOS-style short mode.
18944  # If so, the updated path is stored in $new_path.
18945  new_path="$input_to_shortpath"
18946
18947  input_path="$input_to_shortpath"
18948  # Check if we need to convert this using DOS-style short mode. If the path
18949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18950  # take no chances and rewrite it.
18951  # Note: m4 eats our [], so we need to use [ and ] instead.
18952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18953  if test "x$has_forbidden_chars" != x; then
18954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18958      # Going to short mode and back again did indeed matter. Since short mode is
18959      # case insensitive, let's make it lowercase to improve readability.
18960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18961      # Now convert it back to Unix-style (cygpath)
18962      input_path=`$CYGPATH -u "$shortmode_path"`
18963      new_path="$input_path"
18964    fi
18965  fi
18966
18967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18968  if test "x$test_cygdrive_prefix" = x; then
18969    # As a simple fix, exclude /usr/bin since it's not a real path.
18970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18972      # a path prefixed by /cygdrive for fixpath to work.
18973      new_path="$CYGWIN_ROOT_PATH$input_path"
18974    fi
18975  fi
18976
18977  # remove trailing .exe if any
18978  new_path="${new_path/%.exe/}"
18979
18980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18981
18982  # First separate the path from the arguments. This will split at the first
18983  # space.
18984  complete="$FOUND_MAKE"
18985  path="${complete%% *}"
18986  tmp="$complete EOL"
18987  arguments="${tmp#* }"
18988
18989  # Input might be given as Windows format, start by converting to
18990  # unix format.
18991  new_path="$path"
18992
18993  windows_path="$new_path"
18994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18995    unix_path=`$CYGPATH -u "$windows_path"`
18996    new_path="$unix_path"
18997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18999    new_path="$unix_path"
19000  fi
19001
19002
19003  # Now try to locate executable using which
19004  new_path=`$WHICH "$new_path" 2> /dev/null`
19005
19006  if test "x$new_path" = x; then
19007    # Oops. Which didn't find the executable.
19008    # The splitting of arguments from the executable at a space might have been incorrect,
19009    # since paths with space are more likely in Windows. Give it another try with the whole
19010    # argument.
19011    path="$complete"
19012    arguments="EOL"
19013    new_path="$path"
19014
19015  windows_path="$new_path"
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017    unix_path=`$CYGPATH -u "$windows_path"`
19018    new_path="$unix_path"
19019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19021    new_path="$unix_path"
19022  fi
19023
19024
19025    new_path=`$WHICH "$new_path" 2> /dev/null`
19026    # bat and cmd files are not always considered executable in MSYS causing which
19027    # to not find them
19028    if test "x$new_path" = x \
19029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19031      new_path="$path"
19032
19033  windows_path="$new_path"
19034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19035    unix_path=`$CYGPATH -u "$windows_path"`
19036    new_path="$unix_path"
19037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19039    new_path="$unix_path"
19040  fi
19041
19042    fi
19043
19044    if test "x$new_path" = x; then
19045      # It's still not found. Now this is an unrecoverable error.
19046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19048      has_space=`$ECHO "$complete" | $GREP " "`
19049      if test "x$has_space" != x; then
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19052      fi
19053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19054    fi
19055  fi
19056
19057  # Now new_path has a complete unix path to the binary
19058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19059    # Keep paths in /bin as-is, but remove trailing .exe if any
19060    new_path="${new_path/%.exe/}"
19061    # Do not save /bin paths to all_fixpath_prefixes!
19062  else
19063    # Not in mixed or Windows style, start by that.
19064    new_path=`cmd //c echo $new_path`
19065
19066  input_path="$new_path"
19067  # Check if we need to convert this using DOS-style short mode. If the path
19068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19069  # take no chances and rewrite it.
19070  # Note: m4 eats our [], so we need to use [ and ] instead.
19071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19072  if test "x$has_forbidden_chars" != x; then
19073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19075  fi
19076
19077    # Output is in $new_path
19078
19079  windows_path="$new_path"
19080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19081    unix_path=`$CYGPATH -u "$windows_path"`
19082    new_path="$unix_path"
19083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19085    new_path="$unix_path"
19086  fi
19087
19088    # remove trailing .exe if any
19089    new_path="${new_path/%.exe/}"
19090
19091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19093  fi
19094
19095    else
19096      # We're on a unix platform. Hooray! :)
19097      # First separate the path from the arguments. This will split at the first
19098      # space.
19099      complete="$FOUND_MAKE"
19100      path="${complete%% *}"
19101      tmp="$complete EOL"
19102      arguments="${tmp#* }"
19103
19104      # Cannot rely on the command "which" here since it doesn't always work.
19105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19106      if test -z "$is_absolute_path"; then
19107        # Path to executable is not absolute. Find it.
19108        IFS_save="$IFS"
19109        IFS=:
19110        for p in $PATH; do
19111          if test -f "$p/$path" && test -x "$p/$path"; then
19112            new_path="$p/$path"
19113            break
19114          fi
19115        done
19116        IFS="$IFS_save"
19117      else
19118        # This is an absolute path, we can use it without further modifications.
19119        new_path="$path"
19120      fi
19121
19122      if test "x$new_path" = x; then
19123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19125        has_space=`$ECHO "$complete" | $GREP " "`
19126        if test "x$has_space" != x; then
19127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19129        fi
19130        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19131      fi
19132    fi
19133
19134    # Now join together the path and the arguments once again
19135    if test "x$arguments" != xEOL; then
19136      new_complete="$new_path ${arguments% *}"
19137    else
19138      new_complete="$new_path"
19139    fi
19140
19141    if test "x$complete" != "x$new_complete"; then
19142      FOUND_MAKE="$new_complete"
19143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19144$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19145    fi
19146  fi
19147
19148        fi
19149      fi
19150    fi
19151  fi
19152
19153        fi
19154        PATH=$OLD_PATH
19155      fi
19156    fi
19157
19158    if test "x$FOUND_MAKE" = x; then
19159      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
19160    fi
19161
19162  else
19163    # The variable is set, but is it from the command line or the environment?
19164
19165    # Try to remove the string !MAKE! from our list.
19166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19168      # If it failed, the variable was not from the command line. Ignore it,
19169      # but warn the user (except for BASH, which is always set by the calling BASH).
19170      if test "xMAKE" != xBASH; then
19171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19172$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19173      fi
19174      # Try to locate tool using the code snippet
19175
19176    # Try our hardest to locate a correct version of GNU make
19177    for ac_prog in gmake
19178do
19179  # Extract the first word of "$ac_prog", so it can be a program name with args.
19180set dummy $ac_prog; ac_word=$2
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19182$as_echo_n "checking for $ac_word... " >&6; }
19183if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19184  $as_echo_n "(cached) " >&6
19185else
19186  case $CHECK_GMAKE in
19187  [\\/]* | ?:[\\/]*)
19188  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19189  ;;
19190  *)
19191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19192for as_dir in $PATH
19193do
19194  IFS=$as_save_IFS
19195  test -z "$as_dir" && as_dir=.
19196    for ac_exec_ext in '' $ac_executable_extensions; do
19197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19198    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19200    break 2
19201  fi
19202done
19203  done
19204IFS=$as_save_IFS
19205
19206  ;;
19207esac
19208fi
19209CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19210if test -n "$CHECK_GMAKE"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19212$as_echo "$CHECK_GMAKE" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$CHECK_GMAKE" && break
19220done
19221
19222
19223  MAKE_CANDIDATE=""$CHECK_GMAKE""
19224  DESCRIPTION="gmake in PATH"
19225
19226  # On Cygwin, we require a newer version of make than on other platforms
19227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19228    MAKE_VERSION_EXPR="-e 4\."
19229    MAKE_REQUIRED_VERSION="4.0"
19230   else
19231    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19232    MAKE_REQUIRED_VERSION="3.81"
19233  fi
19234
19235  if test "x$MAKE_CANDIDATE" != x; then
19236    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19237$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19238    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19239    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19240    if test "x$IS_GNU_MAKE" = x; then
19241      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19242$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19243    else
19244      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19245      if test "x$IS_MODERN_MAKE" = x; then
19246        { $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
19247$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;}
19248      else
19249        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19250          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19251            MAKE_EXPECTED_ENV='cygwin'
19252          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19253            MAKE_EXPECTED_ENV='msys'
19254          else
19255            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19256          fi
19257          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19258          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19259        else
19260          # Not relevant for non-Windows
19261          IS_MAKE_CORRECT_ENV=true
19262        fi
19263        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19264          { $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
19265$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;}
19266        else
19267          FOUND_MAKE=$MAKE_CANDIDATE
19268
19269  # Only process if variable expands to non-empty
19270
19271  if test "x$FOUND_MAKE" != x; then
19272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273
19274  # First separate the path from the arguments. This will split at the first
19275  # space.
19276  complete="$FOUND_MAKE"
19277  path="${complete%% *}"
19278  tmp="$complete EOL"
19279  arguments="${tmp#* }"
19280
19281  # Input might be given as Windows format, start by converting to
19282  # unix format.
19283  new_path=`$CYGPATH -u "$path"`
19284
19285  # Now try to locate executable using which
19286  new_path=`$WHICH "$new_path" 2> /dev/null`
19287  # bat and cmd files are not always considered executable in cygwin causing which
19288  # to not find them
19289  if test "x$new_path" = x \
19290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19292    new_path=`$CYGPATH -u "$path"`
19293  fi
19294  if test "x$new_path" = x; then
19295    # Oops. Which didn't find the executable.
19296    # The splitting of arguments from the executable at a space might have been incorrect,
19297    # since paths with space are more likely in Windows. Give it another try with the whole
19298    # argument.
19299    path="$complete"
19300    arguments="EOL"
19301    new_path=`$CYGPATH -u "$path"`
19302    new_path=`$WHICH "$new_path" 2> /dev/null`
19303    # bat and cmd files are not always considered executable in cygwin causing which
19304    # to not find them
19305    if test "x$new_path" = x \
19306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19308      new_path=`$CYGPATH -u "$path"`
19309    fi
19310    if test "x$new_path" = x; then
19311      # It's still not found. Now this is an unrecoverable error.
19312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19314      has_space=`$ECHO "$complete" | $GREP " "`
19315      if test "x$has_space" != x; then
19316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19318      fi
19319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19320    fi
19321  fi
19322
19323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19326  # "foo.exe" is OK but "foo" is an error.
19327  #
19328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19329  # It is also a way to make sure we got the proper file name for the real test later on.
19330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19331  if test "x$test_shortpath" = x; then
19332    # Short path failed, file does not exist as specified.
19333    # Try adding .exe or .cmd
19334    if test -f "${new_path}.exe"; then
19335      input_to_shortpath="${new_path}.exe"
19336    elif test -f "${new_path}.cmd"; then
19337      input_to_shortpath="${new_path}.cmd"
19338    else
19339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19343      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19344    fi
19345  else
19346    input_to_shortpath="$new_path"
19347  fi
19348
19349  # Call helper function which possibly converts this using DOS-style short mode.
19350  # If so, the updated path is stored in $new_path.
19351  new_path="$input_to_shortpath"
19352
19353  input_path="$input_to_shortpath"
19354  # Check if we need to convert this using DOS-style short mode. If the path
19355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19356  # take no chances and rewrite it.
19357  # Note: m4 eats our [], so we need to use [ and ] instead.
19358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19359  if test "x$has_forbidden_chars" != x; then
19360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19364      # Going to short mode and back again did indeed matter. Since short mode is
19365      # case insensitive, let's make it lowercase to improve readability.
19366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19367      # Now convert it back to Unix-style (cygpath)
19368      input_path=`$CYGPATH -u "$shortmode_path"`
19369      new_path="$input_path"
19370    fi
19371  fi
19372
19373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19374  if test "x$test_cygdrive_prefix" = x; then
19375    # As a simple fix, exclude /usr/bin since it's not a real path.
19376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19378      # a path prefixed by /cygdrive for fixpath to work.
19379      new_path="$CYGWIN_ROOT_PATH$input_path"
19380    fi
19381  fi
19382
19383  # remove trailing .exe if any
19384  new_path="${new_path/%.exe/}"
19385
19386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19387
19388  # First separate the path from the arguments. This will split at the first
19389  # space.
19390  complete="$FOUND_MAKE"
19391  path="${complete%% *}"
19392  tmp="$complete EOL"
19393  arguments="${tmp#* }"
19394
19395  # Input might be given as Windows format, start by converting to
19396  # unix format.
19397  new_path="$path"
19398
19399  windows_path="$new_path"
19400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19401    unix_path=`$CYGPATH -u "$windows_path"`
19402    new_path="$unix_path"
19403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19405    new_path="$unix_path"
19406  fi
19407
19408
19409  # Now try to locate executable using which
19410  new_path=`$WHICH "$new_path" 2> /dev/null`
19411
19412  if test "x$new_path" = x; then
19413    # Oops. Which didn't find the executable.
19414    # The splitting of arguments from the executable at a space might have been incorrect,
19415    # since paths with space are more likely in Windows. Give it another try with the whole
19416    # argument.
19417    path="$complete"
19418    arguments="EOL"
19419    new_path="$path"
19420
19421  windows_path="$new_path"
19422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19423    unix_path=`$CYGPATH -u "$windows_path"`
19424    new_path="$unix_path"
19425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19427    new_path="$unix_path"
19428  fi
19429
19430
19431    new_path=`$WHICH "$new_path" 2> /dev/null`
19432    # bat and cmd files are not always considered executable in MSYS causing which
19433    # to not find them
19434    if test "x$new_path" = x \
19435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19437      new_path="$path"
19438
19439  windows_path="$new_path"
19440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19441    unix_path=`$CYGPATH -u "$windows_path"`
19442    new_path="$unix_path"
19443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19445    new_path="$unix_path"
19446  fi
19447
19448    fi
19449
19450    if test "x$new_path" = x; then
19451      # It's still not found. Now this is an unrecoverable error.
19452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19454      has_space=`$ECHO "$complete" | $GREP " "`
19455      if test "x$has_space" != x; then
19456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19458      fi
19459      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19460    fi
19461  fi
19462
19463  # Now new_path has a complete unix path to the binary
19464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19465    # Keep paths in /bin as-is, but remove trailing .exe if any
19466    new_path="${new_path/%.exe/}"
19467    # Do not save /bin paths to all_fixpath_prefixes!
19468  else
19469    # Not in mixed or Windows style, start by that.
19470    new_path=`cmd //c echo $new_path`
19471
19472  input_path="$new_path"
19473  # Check if we need to convert this using DOS-style short mode. If the path
19474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19475  # take no chances and rewrite it.
19476  # Note: m4 eats our [], so we need to use [ and ] instead.
19477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19478  if test "x$has_forbidden_chars" != x; then
19479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19481  fi
19482
19483    # Output is in $new_path
19484
19485  windows_path="$new_path"
19486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19487    unix_path=`$CYGPATH -u "$windows_path"`
19488    new_path="$unix_path"
19489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19491    new_path="$unix_path"
19492  fi
19493
19494    # remove trailing .exe if any
19495    new_path="${new_path/%.exe/}"
19496
19497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19499  fi
19500
19501    else
19502      # We're on a unix platform. Hooray! :)
19503      # First separate the path from the arguments. This will split at the first
19504      # space.
19505      complete="$FOUND_MAKE"
19506      path="${complete%% *}"
19507      tmp="$complete EOL"
19508      arguments="${tmp#* }"
19509
19510      # Cannot rely on the command "which" here since it doesn't always work.
19511      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19512      if test -z "$is_absolute_path"; then
19513        # Path to executable is not absolute. Find it.
19514        IFS_save="$IFS"
19515        IFS=:
19516        for p in $PATH; do
19517          if test -f "$p/$path" && test -x "$p/$path"; then
19518            new_path="$p/$path"
19519            break
19520          fi
19521        done
19522        IFS="$IFS_save"
19523      else
19524        # This is an absolute path, we can use it without further modifications.
19525        new_path="$path"
19526      fi
19527
19528      if test "x$new_path" = x; then
19529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19530$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19531        has_space=`$ECHO "$complete" | $GREP " "`
19532        if test "x$has_space" != x; then
19533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19535        fi
19536        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19537      fi
19538    fi
19539
19540    # Now join together the path and the arguments once again
19541    if test "x$arguments" != xEOL; then
19542      new_complete="$new_path ${arguments% *}"
19543    else
19544      new_complete="$new_path"
19545    fi
19546
19547    if test "x$complete" != "x$new_complete"; then
19548      FOUND_MAKE="$new_complete"
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19550$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19551    fi
19552  fi
19553
19554        fi
19555      fi
19556    fi
19557  fi
19558
19559
19560    if test "x$FOUND_MAKE" = x; then
19561      for ac_prog in make
19562do
19563  # Extract the first word of "$ac_prog", so it can be a program name with args.
19564set dummy $ac_prog; ac_word=$2
19565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19566$as_echo_n "checking for $ac_word... " >&6; }
19567if ${ac_cv_path_CHECK_MAKE+:} false; then :
19568  $as_echo_n "(cached) " >&6
19569else
19570  case $CHECK_MAKE in
19571  [\\/]* | ?:[\\/]*)
19572  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19573  ;;
19574  *)
19575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19576for as_dir in $PATH
19577do
19578  IFS=$as_save_IFS
19579  test -z "$as_dir" && as_dir=.
19580    for ac_exec_ext in '' $ac_executable_extensions; do
19581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19582    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19584    break 2
19585  fi
19586done
19587  done
19588IFS=$as_save_IFS
19589
19590  ;;
19591esac
19592fi
19593CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19594if test -n "$CHECK_MAKE"; then
19595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19596$as_echo "$CHECK_MAKE" >&6; }
19597else
19598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19599$as_echo "no" >&6; }
19600fi
19601
19602
19603  test -n "$CHECK_MAKE" && break
19604done
19605
19606
19607  MAKE_CANDIDATE=""$CHECK_MAKE""
19608  DESCRIPTION="make in PATH"
19609
19610  # On Cygwin, we require a newer version of make than on other platforms
19611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19612    MAKE_VERSION_EXPR="-e 4\."
19613    MAKE_REQUIRED_VERSION="4.0"
19614   else
19615    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19616    MAKE_REQUIRED_VERSION="3.81"
19617  fi
19618
19619  if test "x$MAKE_CANDIDATE" != x; then
19620    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19621$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19622    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19623    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19624    if test "x$IS_GNU_MAKE" = x; then
19625      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19626$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19627    else
19628      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19629      if test "x$IS_MODERN_MAKE" = x; then
19630        { $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
19631$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;}
19632      else
19633        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19634          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19635            MAKE_EXPECTED_ENV='cygwin'
19636          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637            MAKE_EXPECTED_ENV='msys'
19638          else
19639            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19640          fi
19641          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19642          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19643        else
19644          # Not relevant for non-Windows
19645          IS_MAKE_CORRECT_ENV=true
19646        fi
19647        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19648          { $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
19649$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;}
19650        else
19651          FOUND_MAKE=$MAKE_CANDIDATE
19652
19653  # Only process if variable expands to non-empty
19654
19655  if test "x$FOUND_MAKE" != x; then
19656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19657
19658  # First separate the path from the arguments. This will split at the first
19659  # space.
19660  complete="$FOUND_MAKE"
19661  path="${complete%% *}"
19662  tmp="$complete EOL"
19663  arguments="${tmp#* }"
19664
19665  # Input might be given as Windows format, start by converting to
19666  # unix format.
19667  new_path=`$CYGPATH -u "$path"`
19668
19669  # Now try to locate executable using which
19670  new_path=`$WHICH "$new_path" 2> /dev/null`
19671  # bat and cmd files are not always considered executable in cygwin causing which
19672  # to not find them
19673  if test "x$new_path" = x \
19674      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19675      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19676    new_path=`$CYGPATH -u "$path"`
19677  fi
19678  if test "x$new_path" = x; then
19679    # Oops. Which didn't find the executable.
19680    # The splitting of arguments from the executable at a space might have been incorrect,
19681    # since paths with space are more likely in Windows. Give it another try with the whole
19682    # argument.
19683    path="$complete"
19684    arguments="EOL"
19685    new_path=`$CYGPATH -u "$path"`
19686    new_path=`$WHICH "$new_path" 2> /dev/null`
19687    # bat and cmd files are not always considered executable in cygwin causing which
19688    # to not find them
19689    if test "x$new_path" = x \
19690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19692      new_path=`$CYGPATH -u "$path"`
19693    fi
19694    if test "x$new_path" = x; then
19695      # It's still not found. Now this is an unrecoverable error.
19696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19698      has_space=`$ECHO "$complete" | $GREP " "`
19699      if test "x$has_space" != x; then
19700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19702      fi
19703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19704    fi
19705  fi
19706
19707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19710  # "foo.exe" is OK but "foo" is an error.
19711  #
19712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19713  # It is also a way to make sure we got the proper file name for the real test later on.
19714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19715  if test "x$test_shortpath" = x; then
19716    # Short path failed, file does not exist as specified.
19717    # Try adding .exe or .cmd
19718    if test -f "${new_path}.exe"; then
19719      input_to_shortpath="${new_path}.exe"
19720    elif test -f "${new_path}.cmd"; then
19721      input_to_shortpath="${new_path}.cmd"
19722    else
19723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19728    fi
19729  else
19730    input_to_shortpath="$new_path"
19731  fi
19732
19733  # Call helper function which possibly converts this using DOS-style short mode.
19734  # If so, the updated path is stored in $new_path.
19735  new_path="$input_to_shortpath"
19736
19737  input_path="$input_to_shortpath"
19738  # Check if we need to convert this using DOS-style short mode. If the path
19739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19740  # take no chances and rewrite it.
19741  # Note: m4 eats our [], so we need to use [ and ] instead.
19742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19743  if test "x$has_forbidden_chars" != x; then
19744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19748      # Going to short mode and back again did indeed matter. Since short mode is
19749      # case insensitive, let's make it lowercase to improve readability.
19750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19751      # Now convert it back to Unix-style (cygpath)
19752      input_path=`$CYGPATH -u "$shortmode_path"`
19753      new_path="$input_path"
19754    fi
19755  fi
19756
19757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19758  if test "x$test_cygdrive_prefix" = x; then
19759    # As a simple fix, exclude /usr/bin since it's not a real path.
19760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19762      # a path prefixed by /cygdrive for fixpath to work.
19763      new_path="$CYGWIN_ROOT_PATH$input_path"
19764    fi
19765  fi
19766
19767  # remove trailing .exe if any
19768  new_path="${new_path/%.exe/}"
19769
19770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19771
19772  # First separate the path from the arguments. This will split at the first
19773  # space.
19774  complete="$FOUND_MAKE"
19775  path="${complete%% *}"
19776  tmp="$complete EOL"
19777  arguments="${tmp#* }"
19778
19779  # Input might be given as Windows format, start by converting to
19780  # unix format.
19781  new_path="$path"
19782
19783  windows_path="$new_path"
19784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19785    unix_path=`$CYGPATH -u "$windows_path"`
19786    new_path="$unix_path"
19787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19789    new_path="$unix_path"
19790  fi
19791
19792
19793  # Now try to locate executable using which
19794  new_path=`$WHICH "$new_path" 2> /dev/null`
19795
19796  if test "x$new_path" = x; then
19797    # Oops. Which didn't find the executable.
19798    # The splitting of arguments from the executable at a space might have been incorrect,
19799    # since paths with space are more likely in Windows. Give it another try with the whole
19800    # argument.
19801    path="$complete"
19802    arguments="EOL"
19803    new_path="$path"
19804
19805  windows_path="$new_path"
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    unix_path=`$CYGPATH -u "$windows_path"`
19808    new_path="$unix_path"
19809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19811    new_path="$unix_path"
19812  fi
19813
19814
19815    new_path=`$WHICH "$new_path" 2> /dev/null`
19816    # bat and cmd files are not always considered executable in MSYS causing which
19817    # to not find them
19818    if test "x$new_path" = x \
19819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19821      new_path="$path"
19822
19823  windows_path="$new_path"
19824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19825    unix_path=`$CYGPATH -u "$windows_path"`
19826    new_path="$unix_path"
19827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19829    new_path="$unix_path"
19830  fi
19831
19832    fi
19833
19834    if test "x$new_path" = x; then
19835      # It's still not found. Now this is an unrecoverable error.
19836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19838      has_space=`$ECHO "$complete" | $GREP " "`
19839      if test "x$has_space" != x; then
19840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19842      fi
19843      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19844    fi
19845  fi
19846
19847  # Now new_path has a complete unix path to the binary
19848  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19849    # Keep paths in /bin as-is, but remove trailing .exe if any
19850    new_path="${new_path/%.exe/}"
19851    # Do not save /bin paths to all_fixpath_prefixes!
19852  else
19853    # Not in mixed or Windows style, start by that.
19854    new_path=`cmd //c echo $new_path`
19855
19856  input_path="$new_path"
19857  # Check if we need to convert this using DOS-style short mode. If the path
19858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19859  # take no chances and rewrite it.
19860  # Note: m4 eats our [], so we need to use [ and ] instead.
19861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19862  if test "x$has_forbidden_chars" != x; then
19863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19865  fi
19866
19867    # Output is in $new_path
19868
19869  windows_path="$new_path"
19870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19871    unix_path=`$CYGPATH -u "$windows_path"`
19872    new_path="$unix_path"
19873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19875    new_path="$unix_path"
19876  fi
19877
19878    # remove trailing .exe if any
19879    new_path="${new_path/%.exe/}"
19880
19881    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19882    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19883  fi
19884
19885    else
19886      # We're on a unix platform. Hooray! :)
19887      # First separate the path from the arguments. This will split at the first
19888      # space.
19889      complete="$FOUND_MAKE"
19890      path="${complete%% *}"
19891      tmp="$complete EOL"
19892      arguments="${tmp#* }"
19893
19894      # Cannot rely on the command "which" here since it doesn't always work.
19895      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19896      if test -z "$is_absolute_path"; then
19897        # Path to executable is not absolute. Find it.
19898        IFS_save="$IFS"
19899        IFS=:
19900        for p in $PATH; do
19901          if test -f "$p/$path" && test -x "$p/$path"; then
19902            new_path="$p/$path"
19903            break
19904          fi
19905        done
19906        IFS="$IFS_save"
19907      else
19908        # This is an absolute path, we can use it without further modifications.
19909        new_path="$path"
19910      fi
19911
19912      if test "x$new_path" = x; then
19913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19915        has_space=`$ECHO "$complete" | $GREP " "`
19916        if test "x$has_space" != x; then
19917          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19918$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19919        fi
19920        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19921      fi
19922    fi
19923
19924    # Now join together the path and the arguments once again
19925    if test "x$arguments" != xEOL; then
19926      new_complete="$new_path ${arguments% *}"
19927    else
19928      new_complete="$new_path"
19929    fi
19930
19931    if test "x$complete" != "x$new_complete"; then
19932      FOUND_MAKE="$new_complete"
19933      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19934$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19935    fi
19936  fi
19937
19938        fi
19939      fi
19940    fi
19941  fi
19942
19943    fi
19944
19945    if test "x$FOUND_MAKE" = x; then
19946      if test "x$TOOLCHAIN_PATH" != x; then
19947        # We have a toolchain path, check that as well before giving up.
19948        OLD_PATH=$PATH
19949        PATH=$TOOLCHAIN_PATH:$PATH
19950        for ac_prog in gmake
19951do
19952  # Extract the first word of "$ac_prog", so it can be a program name with args.
19953set dummy $ac_prog; ac_word=$2
19954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19955$as_echo_n "checking for $ac_word... " >&6; }
19956if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19957  $as_echo_n "(cached) " >&6
19958else
19959  case $CHECK_TOOLSDIR_GMAKE in
19960  [\\/]* | ?:[\\/]*)
19961  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19962  ;;
19963  *)
19964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19965for as_dir in $PATH
19966do
19967  IFS=$as_save_IFS
19968  test -z "$as_dir" && as_dir=.
19969    for ac_exec_ext in '' $ac_executable_extensions; do
19970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19971    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19973    break 2
19974  fi
19975done
19976  done
19977IFS=$as_save_IFS
19978
19979  ;;
19980esac
19981fi
19982CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19983if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19985$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19986else
19987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19988$as_echo "no" >&6; }
19989fi
19990
19991
19992  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19993done
19994
19995
19996  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19997  DESCRIPTION="gmake in tools-dir"
19998
19999  # On Cygwin, we require a newer version of make than on other platforms
20000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20001    MAKE_VERSION_EXPR="-e 4\."
20002    MAKE_REQUIRED_VERSION="4.0"
20003   else
20004    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20005    MAKE_REQUIRED_VERSION="3.81"
20006  fi
20007
20008  if test "x$MAKE_CANDIDATE" != x; then
20009    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20010$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20011    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20012    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20013    if test "x$IS_GNU_MAKE" = x; then
20014      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20015$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20016    else
20017      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20018      if test "x$IS_MODERN_MAKE" = x; then
20019        { $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
20020$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;}
20021      else
20022        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20023          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20024            MAKE_EXPECTED_ENV='cygwin'
20025          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20026            MAKE_EXPECTED_ENV='msys'
20027          else
20028            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20029          fi
20030          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20031          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20032        else
20033          # Not relevant for non-Windows
20034          IS_MAKE_CORRECT_ENV=true
20035        fi
20036        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20037          { $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
20038$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;}
20039        else
20040          FOUND_MAKE=$MAKE_CANDIDATE
20041
20042  # Only process if variable expands to non-empty
20043
20044  if test "x$FOUND_MAKE" != x; then
20045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20046
20047  # First separate the path from the arguments. This will split at the first
20048  # space.
20049  complete="$FOUND_MAKE"
20050  path="${complete%% *}"
20051  tmp="$complete EOL"
20052  arguments="${tmp#* }"
20053
20054  # Input might be given as Windows format, start by converting to
20055  # unix format.
20056  new_path=`$CYGPATH -u "$path"`
20057
20058  # Now try to locate executable using which
20059  new_path=`$WHICH "$new_path" 2> /dev/null`
20060  # bat and cmd files are not always considered executable in cygwin causing which
20061  # to not find them
20062  if test "x$new_path" = x \
20063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20065    new_path=`$CYGPATH -u "$path"`
20066  fi
20067  if test "x$new_path" = x; then
20068    # Oops. Which didn't find the executable.
20069    # The splitting of arguments from the executable at a space might have been incorrect,
20070    # since paths with space are more likely in Windows. Give it another try with the whole
20071    # argument.
20072    path="$complete"
20073    arguments="EOL"
20074    new_path=`$CYGPATH -u "$path"`
20075    new_path=`$WHICH "$new_path" 2> /dev/null`
20076    # bat and cmd files are not always considered executable in cygwin causing which
20077    # to not find them
20078    if test "x$new_path" = x \
20079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20081      new_path=`$CYGPATH -u "$path"`
20082    fi
20083    if test "x$new_path" = x; then
20084      # It's still not found. Now this is an unrecoverable error.
20085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20087      has_space=`$ECHO "$complete" | $GREP " "`
20088      if test "x$has_space" != x; then
20089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20091      fi
20092      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20093    fi
20094  fi
20095
20096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20099  # "foo.exe" is OK but "foo" is an error.
20100  #
20101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20102  # It is also a way to make sure we got the proper file name for the real test later on.
20103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20104  if test "x$test_shortpath" = x; then
20105    # Short path failed, file does not exist as specified.
20106    # Try adding .exe or .cmd
20107    if test -f "${new_path}.exe"; then
20108      input_to_shortpath="${new_path}.exe"
20109    elif test -f "${new_path}.cmd"; then
20110      input_to_shortpath="${new_path}.cmd"
20111    else
20112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20113$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20116      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20117    fi
20118  else
20119    input_to_shortpath="$new_path"
20120  fi
20121
20122  # Call helper function which possibly converts this using DOS-style short mode.
20123  # If so, the updated path is stored in $new_path.
20124  new_path="$input_to_shortpath"
20125
20126  input_path="$input_to_shortpath"
20127  # Check if we need to convert this using DOS-style short mode. If the path
20128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20129  # take no chances and rewrite it.
20130  # Note: m4 eats our [], so we need to use [ and ] instead.
20131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20132  if test "x$has_forbidden_chars" != x; then
20133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20137      # Going to short mode and back again did indeed matter. Since short mode is
20138      # case insensitive, let's make it lowercase to improve readability.
20139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20140      # Now convert it back to Unix-style (cygpath)
20141      input_path=`$CYGPATH -u "$shortmode_path"`
20142      new_path="$input_path"
20143    fi
20144  fi
20145
20146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20147  if test "x$test_cygdrive_prefix" = x; then
20148    # As a simple fix, exclude /usr/bin since it's not a real path.
20149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20151      # a path prefixed by /cygdrive for fixpath to work.
20152      new_path="$CYGWIN_ROOT_PATH$input_path"
20153    fi
20154  fi
20155
20156  # remove trailing .exe if any
20157  new_path="${new_path/%.exe/}"
20158
20159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20160
20161  # First separate the path from the arguments. This will split at the first
20162  # space.
20163  complete="$FOUND_MAKE"
20164  path="${complete%% *}"
20165  tmp="$complete EOL"
20166  arguments="${tmp#* }"
20167
20168  # Input might be given as Windows format, start by converting to
20169  # unix format.
20170  new_path="$path"
20171
20172  windows_path="$new_path"
20173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20174    unix_path=`$CYGPATH -u "$windows_path"`
20175    new_path="$unix_path"
20176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20178    new_path="$unix_path"
20179  fi
20180
20181
20182  # Now try to locate executable using which
20183  new_path=`$WHICH "$new_path" 2> /dev/null`
20184
20185  if test "x$new_path" = x; then
20186    # Oops. Which didn't find the executable.
20187    # The splitting of arguments from the executable at a space might have been incorrect,
20188    # since paths with space are more likely in Windows. Give it another try with the whole
20189    # argument.
20190    path="$complete"
20191    arguments="EOL"
20192    new_path="$path"
20193
20194  windows_path="$new_path"
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    unix_path=`$CYGPATH -u "$windows_path"`
20197    new_path="$unix_path"
20198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20200    new_path="$unix_path"
20201  fi
20202
20203
20204    new_path=`$WHICH "$new_path" 2> /dev/null`
20205    # bat and cmd files are not always considered executable in MSYS causing which
20206    # to not find them
20207    if test "x$new_path" = x \
20208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20210      new_path="$path"
20211
20212  windows_path="$new_path"
20213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20214    unix_path=`$CYGPATH -u "$windows_path"`
20215    new_path="$unix_path"
20216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20218    new_path="$unix_path"
20219  fi
20220
20221    fi
20222
20223    if test "x$new_path" = x; then
20224      # It's still not found. Now this is an unrecoverable error.
20225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20227      has_space=`$ECHO "$complete" | $GREP " "`
20228      if test "x$has_space" != x; then
20229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20231      fi
20232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20233    fi
20234  fi
20235
20236  # Now new_path has a complete unix path to the binary
20237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20238    # Keep paths in /bin as-is, but remove trailing .exe if any
20239    new_path="${new_path/%.exe/}"
20240    # Do not save /bin paths to all_fixpath_prefixes!
20241  else
20242    # Not in mixed or Windows style, start by that.
20243    new_path=`cmd //c echo $new_path`
20244
20245  input_path="$new_path"
20246  # Check if we need to convert this using DOS-style short mode. If the path
20247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20248  # take no chances and rewrite it.
20249  # Note: m4 eats our [], so we need to use [ and ] instead.
20250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20251  if test "x$has_forbidden_chars" != x; then
20252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20254  fi
20255
20256    # Output is in $new_path
20257
20258  windows_path="$new_path"
20259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20260    unix_path=`$CYGPATH -u "$windows_path"`
20261    new_path="$unix_path"
20262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20264    new_path="$unix_path"
20265  fi
20266
20267    # remove trailing .exe if any
20268    new_path="${new_path/%.exe/}"
20269
20270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20272  fi
20273
20274    else
20275      # We're on a unix platform. Hooray! :)
20276      # First separate the path from the arguments. This will split at the first
20277      # space.
20278      complete="$FOUND_MAKE"
20279      path="${complete%% *}"
20280      tmp="$complete EOL"
20281      arguments="${tmp#* }"
20282
20283      # Cannot rely on the command "which" here since it doesn't always work.
20284      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20285      if test -z "$is_absolute_path"; then
20286        # Path to executable is not absolute. Find it.
20287        IFS_save="$IFS"
20288        IFS=:
20289        for p in $PATH; do
20290          if test -f "$p/$path" && test -x "$p/$path"; then
20291            new_path="$p/$path"
20292            break
20293          fi
20294        done
20295        IFS="$IFS_save"
20296      else
20297        # This is an absolute path, we can use it without further modifications.
20298        new_path="$path"
20299      fi
20300
20301      if test "x$new_path" = x; then
20302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20304        has_space=`$ECHO "$complete" | $GREP " "`
20305        if test "x$has_space" != x; then
20306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20308        fi
20309        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20310      fi
20311    fi
20312
20313    # Now join together the path and the arguments once again
20314    if test "x$arguments" != xEOL; then
20315      new_complete="$new_path ${arguments% *}"
20316    else
20317      new_complete="$new_path"
20318    fi
20319
20320    if test "x$complete" != "x$new_complete"; then
20321      FOUND_MAKE="$new_complete"
20322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20323$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20324    fi
20325  fi
20326
20327        fi
20328      fi
20329    fi
20330  fi
20331
20332        if test "x$FOUND_MAKE" = x; then
20333          for ac_prog in make
20334do
20335  # Extract the first word of "$ac_prog", so it can be a program name with args.
20336set dummy $ac_prog; ac_word=$2
20337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20338$as_echo_n "checking for $ac_word... " >&6; }
20339if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20340  $as_echo_n "(cached) " >&6
20341else
20342  case $CHECK_TOOLSDIR_MAKE in
20343  [\\/]* | ?:[\\/]*)
20344  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20345  ;;
20346  *)
20347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20348for as_dir in $PATH
20349do
20350  IFS=$as_save_IFS
20351  test -z "$as_dir" && as_dir=.
20352    for ac_exec_ext in '' $ac_executable_extensions; do
20353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20354    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20356    break 2
20357  fi
20358done
20359  done
20360IFS=$as_save_IFS
20361
20362  ;;
20363esac
20364fi
20365CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20366if test -n "$CHECK_TOOLSDIR_MAKE"; then
20367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20368$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20369else
20370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20371$as_echo "no" >&6; }
20372fi
20373
20374
20375  test -n "$CHECK_TOOLSDIR_MAKE" && break
20376done
20377
20378
20379  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20380  DESCRIPTION="make in tools-dir"
20381
20382  # On Cygwin, we require a newer version of make than on other platforms
20383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20384    MAKE_VERSION_EXPR="-e 4\."
20385    MAKE_REQUIRED_VERSION="4.0"
20386   else
20387    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20388    MAKE_REQUIRED_VERSION="3.81"
20389  fi
20390
20391  if test "x$MAKE_CANDIDATE" != x; then
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20393$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20394    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20395    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20396    if test "x$IS_GNU_MAKE" = x; then
20397      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20398$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20399    else
20400      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20401      if test "x$IS_MODERN_MAKE" = x; then
20402        { $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
20403$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;}
20404      else
20405        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20406          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20407            MAKE_EXPECTED_ENV='cygwin'
20408          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20409            MAKE_EXPECTED_ENV='msys'
20410          else
20411            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20412          fi
20413          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20414          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20415        else
20416          # Not relevant for non-Windows
20417          IS_MAKE_CORRECT_ENV=true
20418        fi
20419        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20420          { $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
20421$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;}
20422        else
20423          FOUND_MAKE=$MAKE_CANDIDATE
20424
20425  # Only process if variable expands to non-empty
20426
20427  if test "x$FOUND_MAKE" != x; then
20428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20429
20430  # First separate the path from the arguments. This will split at the first
20431  # space.
20432  complete="$FOUND_MAKE"
20433  path="${complete%% *}"
20434  tmp="$complete EOL"
20435  arguments="${tmp#* }"
20436
20437  # Input might be given as Windows format, start by converting to
20438  # unix format.
20439  new_path=`$CYGPATH -u "$path"`
20440
20441  # Now try to locate executable using which
20442  new_path=`$WHICH "$new_path" 2> /dev/null`
20443  # bat and cmd files are not always considered executable in cygwin causing which
20444  # to not find them
20445  if test "x$new_path" = x \
20446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20448    new_path=`$CYGPATH -u "$path"`
20449  fi
20450  if test "x$new_path" = x; then
20451    # Oops. Which didn't find the executable.
20452    # The splitting of arguments from the executable at a space might have been incorrect,
20453    # since paths with space are more likely in Windows. Give it another try with the whole
20454    # argument.
20455    path="$complete"
20456    arguments="EOL"
20457    new_path=`$CYGPATH -u "$path"`
20458    new_path=`$WHICH "$new_path" 2> /dev/null`
20459    # bat and cmd files are not always considered executable in cygwin causing which
20460    # to not find them
20461    if test "x$new_path" = x \
20462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20464      new_path=`$CYGPATH -u "$path"`
20465    fi
20466    if test "x$new_path" = x; then
20467      # It's still not found. Now this is an unrecoverable error.
20468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20470      has_space=`$ECHO "$complete" | $GREP " "`
20471      if test "x$has_space" != x; then
20472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20474      fi
20475      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20476    fi
20477  fi
20478
20479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20482  # "foo.exe" is OK but "foo" is an error.
20483  #
20484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20485  # It is also a way to make sure we got the proper file name for the real test later on.
20486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20487  if test "x$test_shortpath" = x; then
20488    # Short path failed, file does not exist as specified.
20489    # Try adding .exe or .cmd
20490    if test -f "${new_path}.exe"; then
20491      input_to_shortpath="${new_path}.exe"
20492    elif test -f "${new_path}.cmd"; then
20493      input_to_shortpath="${new_path}.cmd"
20494    else
20495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20499      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20500    fi
20501  else
20502    input_to_shortpath="$new_path"
20503  fi
20504
20505  # Call helper function which possibly converts this using DOS-style short mode.
20506  # If so, the updated path is stored in $new_path.
20507  new_path="$input_to_shortpath"
20508
20509  input_path="$input_to_shortpath"
20510  # Check if we need to convert this using DOS-style short mode. If the path
20511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20512  # take no chances and rewrite it.
20513  # Note: m4 eats our [], so we need to use [ and ] instead.
20514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20515  if test "x$has_forbidden_chars" != x; then
20516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20520      # Going to short mode and back again did indeed matter. Since short mode is
20521      # case insensitive, let's make it lowercase to improve readability.
20522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20523      # Now convert it back to Unix-style (cygpath)
20524      input_path=`$CYGPATH -u "$shortmode_path"`
20525      new_path="$input_path"
20526    fi
20527  fi
20528
20529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20530  if test "x$test_cygdrive_prefix" = x; then
20531    # As a simple fix, exclude /usr/bin since it's not a real path.
20532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20534      # a path prefixed by /cygdrive for fixpath to work.
20535      new_path="$CYGWIN_ROOT_PATH$input_path"
20536    fi
20537  fi
20538
20539  # remove trailing .exe if any
20540  new_path="${new_path/%.exe/}"
20541
20542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543
20544  # First separate the path from the arguments. This will split at the first
20545  # space.
20546  complete="$FOUND_MAKE"
20547  path="${complete%% *}"
20548  tmp="$complete EOL"
20549  arguments="${tmp#* }"
20550
20551  # Input might be given as Windows format, start by converting to
20552  # unix format.
20553  new_path="$path"
20554
20555  windows_path="$new_path"
20556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20557    unix_path=`$CYGPATH -u "$windows_path"`
20558    new_path="$unix_path"
20559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20561    new_path="$unix_path"
20562  fi
20563
20564
20565  # Now try to locate executable using which
20566  new_path=`$WHICH "$new_path" 2> /dev/null`
20567
20568  if test "x$new_path" = x; then
20569    # Oops. Which didn't find the executable.
20570    # The splitting of arguments from the executable at a space might have been incorrect,
20571    # since paths with space are more likely in Windows. Give it another try with the whole
20572    # argument.
20573    path="$complete"
20574    arguments="EOL"
20575    new_path="$path"
20576
20577  windows_path="$new_path"
20578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20579    unix_path=`$CYGPATH -u "$windows_path"`
20580    new_path="$unix_path"
20581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20583    new_path="$unix_path"
20584  fi
20585
20586
20587    new_path=`$WHICH "$new_path" 2> /dev/null`
20588    # bat and cmd files are not always considered executable in MSYS causing which
20589    # to not find them
20590    if test "x$new_path" = x \
20591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20593      new_path="$path"
20594
20595  windows_path="$new_path"
20596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20597    unix_path=`$CYGPATH -u "$windows_path"`
20598    new_path="$unix_path"
20599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20601    new_path="$unix_path"
20602  fi
20603
20604    fi
20605
20606    if test "x$new_path" = x; then
20607      # It's still not found. Now this is an unrecoverable error.
20608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20610      has_space=`$ECHO "$complete" | $GREP " "`
20611      if test "x$has_space" != x; then
20612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20614      fi
20615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20616    fi
20617  fi
20618
20619  # Now new_path has a complete unix path to the binary
20620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20621    # Keep paths in /bin as-is, but remove trailing .exe if any
20622    new_path="${new_path/%.exe/}"
20623    # Do not save /bin paths to all_fixpath_prefixes!
20624  else
20625    # Not in mixed or Windows style, start by that.
20626    new_path=`cmd //c echo $new_path`
20627
20628  input_path="$new_path"
20629  # Check if we need to convert this using DOS-style short mode. If the path
20630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20631  # take no chances and rewrite it.
20632  # Note: m4 eats our [], so we need to use [ and ] instead.
20633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20634  if test "x$has_forbidden_chars" != x; then
20635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20637  fi
20638
20639    # Output is in $new_path
20640
20641  windows_path="$new_path"
20642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20643    unix_path=`$CYGPATH -u "$windows_path"`
20644    new_path="$unix_path"
20645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20647    new_path="$unix_path"
20648  fi
20649
20650    # remove trailing .exe if any
20651    new_path="${new_path/%.exe/}"
20652
20653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20655  fi
20656
20657    else
20658      # We're on a unix platform. Hooray! :)
20659      # First separate the path from the arguments. This will split at the first
20660      # space.
20661      complete="$FOUND_MAKE"
20662      path="${complete%% *}"
20663      tmp="$complete EOL"
20664      arguments="${tmp#* }"
20665
20666      # Cannot rely on the command "which" here since it doesn't always work.
20667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20668      if test -z "$is_absolute_path"; then
20669        # Path to executable is not absolute. Find it.
20670        IFS_save="$IFS"
20671        IFS=:
20672        for p in $PATH; do
20673          if test -f "$p/$path" && test -x "$p/$path"; then
20674            new_path="$p/$path"
20675            break
20676          fi
20677        done
20678        IFS="$IFS_save"
20679      else
20680        # This is an absolute path, we can use it without further modifications.
20681        new_path="$path"
20682      fi
20683
20684      if test "x$new_path" = x; then
20685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20687        has_space=`$ECHO "$complete" | $GREP " "`
20688        if test "x$has_space" != x; then
20689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20691        fi
20692        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20693      fi
20694    fi
20695
20696    # Now join together the path and the arguments once again
20697    if test "x$arguments" != xEOL; then
20698      new_complete="$new_path ${arguments% *}"
20699    else
20700      new_complete="$new_path"
20701    fi
20702
20703    if test "x$complete" != "x$new_complete"; then
20704      FOUND_MAKE="$new_complete"
20705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20706$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20707    fi
20708  fi
20709
20710        fi
20711      fi
20712    fi
20713  fi
20714
20715        fi
20716        PATH=$OLD_PATH
20717      fi
20718    fi
20719
20720    if test "x$FOUND_MAKE" = x; then
20721      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
20722    fi
20723
20724    else
20725      # If it succeeded, then it was overridden by the user. We will use it
20726      # for the tool.
20727
20728      # First remove it from the list of overridden variables, so we can test
20729      # for unknown variables in the end.
20730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20731
20732      # Check if we try to supply an empty value
20733      if test "x$MAKE" = x; then
20734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20735$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20737$as_echo_n "checking for MAKE... " >&6; }
20738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20739$as_echo "disabled" >&6; }
20740      else
20741        # Check if the provided tool contains a complete path.
20742        tool_specified="$MAKE"
20743        tool_basename="${tool_specified##*/}"
20744        if test "x$tool_basename" = "x$tool_specified"; then
20745          # A command without a complete path is provided, search $PATH.
20746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20747$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20748          # Extract the first word of "$tool_basename", so it can be a program name with args.
20749set dummy $tool_basename; ac_word=$2
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20751$as_echo_n "checking for $ac_word... " >&6; }
20752if ${ac_cv_path_MAKE+:} false; then :
20753  $as_echo_n "(cached) " >&6
20754else
20755  case $MAKE in
20756  [\\/]* | ?:[\\/]*)
20757  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20758  ;;
20759  *)
20760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763  IFS=$as_save_IFS
20764  test -z "$as_dir" && as_dir=.
20765    for ac_exec_ext in '' $ac_executable_extensions; do
20766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20767    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20769    break 2
20770  fi
20771done
20772  done
20773IFS=$as_save_IFS
20774
20775  ;;
20776esac
20777fi
20778MAKE=$ac_cv_path_MAKE
20779if test -n "$MAKE"; then
20780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20781$as_echo "$MAKE" >&6; }
20782else
20783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20784$as_echo "no" >&6; }
20785fi
20786
20787
20788          if test "x$MAKE" = x; then
20789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20790          fi
20791        else
20792          # Otherwise we believe it is a complete path. Use it as it is.
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20794$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20796$as_echo_n "checking for MAKE... " >&6; }
20797          if test ! -x "$tool_specified"; then
20798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20799$as_echo "not found" >&6; }
20800            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20801          fi
20802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20803$as_echo "$tool_specified" >&6; }
20804        fi
20805      fi
20806    fi
20807
20808    # If MAKE was set by user, verify the version
20809
20810  MAKE_CANDIDATE=""$MAKE""
20811  DESCRIPTION="user supplied MAKE=$MAKE"
20812
20813  # On Cygwin, we require a newer version of make than on other platforms
20814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20815    MAKE_VERSION_EXPR="-e 4\."
20816    MAKE_REQUIRED_VERSION="4.0"
20817   else
20818    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20819    MAKE_REQUIRED_VERSION="3.81"
20820  fi
20821
20822  if test "x$MAKE_CANDIDATE" != x; then
20823    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20824$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20825    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20826    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20827    if test "x$IS_GNU_MAKE" = x; then
20828      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20829$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20830    else
20831      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20832      if test "x$IS_MODERN_MAKE" = x; then
20833        { $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
20834$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;}
20835      else
20836        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20837          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838            MAKE_EXPECTED_ENV='cygwin'
20839          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20840            MAKE_EXPECTED_ENV='msys'
20841          else
20842            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20843          fi
20844          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20845          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20846        else
20847          # Not relevant for non-Windows
20848          IS_MAKE_CORRECT_ENV=true
20849        fi
20850        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20851          { $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
20852$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;}
20853        else
20854          FOUND_MAKE=$MAKE_CANDIDATE
20855
20856  # Only process if variable expands to non-empty
20857
20858  if test "x$FOUND_MAKE" != x; then
20859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20860
20861  # First separate the path from the arguments. This will split at the first
20862  # space.
20863  complete="$FOUND_MAKE"
20864  path="${complete%% *}"
20865  tmp="$complete EOL"
20866  arguments="${tmp#* }"
20867
20868  # Input might be given as Windows format, start by converting to
20869  # unix format.
20870  new_path=`$CYGPATH -u "$path"`
20871
20872  # Now try to locate executable using which
20873  new_path=`$WHICH "$new_path" 2> /dev/null`
20874  # bat and cmd files are not always considered executable in cygwin causing which
20875  # to not find them
20876  if test "x$new_path" = x \
20877      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20878      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20879    new_path=`$CYGPATH -u "$path"`
20880  fi
20881  if test "x$new_path" = x; then
20882    # Oops. Which didn't find the executable.
20883    # The splitting of arguments from the executable at a space might have been incorrect,
20884    # since paths with space are more likely in Windows. Give it another try with the whole
20885    # argument.
20886    path="$complete"
20887    arguments="EOL"
20888    new_path=`$CYGPATH -u "$path"`
20889    new_path=`$WHICH "$new_path" 2> /dev/null`
20890    # bat and cmd files are not always considered executable in cygwin causing which
20891    # to not find them
20892    if test "x$new_path" = x \
20893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20895      new_path=`$CYGPATH -u "$path"`
20896    fi
20897    if test "x$new_path" = x; then
20898      # It's still not found. Now this is an unrecoverable error.
20899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20901      has_space=`$ECHO "$complete" | $GREP " "`
20902      if test "x$has_space" != x; then
20903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20905      fi
20906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20907    fi
20908  fi
20909
20910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20913  # "foo.exe" is OK but "foo" is an error.
20914  #
20915  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20916  # It is also a way to make sure we got the proper file name for the real test later on.
20917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20918  if test "x$test_shortpath" = x; then
20919    # Short path failed, file does not exist as specified.
20920    # Try adding .exe or .cmd
20921    if test -f "${new_path}.exe"; then
20922      input_to_shortpath="${new_path}.exe"
20923    elif test -f "${new_path}.cmd"; then
20924      input_to_shortpath="${new_path}.cmd"
20925    else
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20930      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20931    fi
20932  else
20933    input_to_shortpath="$new_path"
20934  fi
20935
20936  # Call helper function which possibly converts this using DOS-style short mode.
20937  # If so, the updated path is stored in $new_path.
20938  new_path="$input_to_shortpath"
20939
20940  input_path="$input_to_shortpath"
20941  # Check if we need to convert this using DOS-style short mode. If the path
20942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20943  # take no chances and rewrite it.
20944  # Note: m4 eats our [], so we need to use [ and ] instead.
20945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20946  if test "x$has_forbidden_chars" != x; then
20947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20951      # Going to short mode and back again did indeed matter. Since short mode is
20952      # case insensitive, let's make it lowercase to improve readability.
20953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20954      # Now convert it back to Unix-style (cygpath)
20955      input_path=`$CYGPATH -u "$shortmode_path"`
20956      new_path="$input_path"
20957    fi
20958  fi
20959
20960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20961  if test "x$test_cygdrive_prefix" = x; then
20962    # As a simple fix, exclude /usr/bin since it's not a real path.
20963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20965      # a path prefixed by /cygdrive for fixpath to work.
20966      new_path="$CYGWIN_ROOT_PATH$input_path"
20967    fi
20968  fi
20969
20970  # remove trailing .exe if any
20971  new_path="${new_path/%.exe/}"
20972
20973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20974
20975  # First separate the path from the arguments. This will split at the first
20976  # space.
20977  complete="$FOUND_MAKE"
20978  path="${complete%% *}"
20979  tmp="$complete EOL"
20980  arguments="${tmp#* }"
20981
20982  # Input might be given as Windows format, start by converting to
20983  # unix format.
20984  new_path="$path"
20985
20986  windows_path="$new_path"
20987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20988    unix_path=`$CYGPATH -u "$windows_path"`
20989    new_path="$unix_path"
20990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20992    new_path="$unix_path"
20993  fi
20994
20995
20996  # Now try to locate executable using which
20997  new_path=`$WHICH "$new_path" 2> /dev/null`
20998
20999  if test "x$new_path" = x; then
21000    # Oops. Which didn't find the executable.
21001    # The splitting of arguments from the executable at a space might have been incorrect,
21002    # since paths with space are more likely in Windows. Give it another try with the whole
21003    # argument.
21004    path="$complete"
21005    arguments="EOL"
21006    new_path="$path"
21007
21008  windows_path="$new_path"
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    unix_path=`$CYGPATH -u "$windows_path"`
21011    new_path="$unix_path"
21012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21014    new_path="$unix_path"
21015  fi
21016
21017
21018    new_path=`$WHICH "$new_path" 2> /dev/null`
21019    # bat and cmd files are not always considered executable in MSYS causing which
21020    # to not find them
21021    if test "x$new_path" = x \
21022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21024      new_path="$path"
21025
21026  windows_path="$new_path"
21027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21028    unix_path=`$CYGPATH -u "$windows_path"`
21029    new_path="$unix_path"
21030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21032    new_path="$unix_path"
21033  fi
21034
21035    fi
21036
21037    if test "x$new_path" = x; then
21038      # It's still not found. Now this is an unrecoverable error.
21039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21041      has_space=`$ECHO "$complete" | $GREP " "`
21042      if test "x$has_space" != x; then
21043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21045      fi
21046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21047    fi
21048  fi
21049
21050  # Now new_path has a complete unix path to the binary
21051  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21052    # Keep paths in /bin as-is, but remove trailing .exe if any
21053    new_path="${new_path/%.exe/}"
21054    # Do not save /bin paths to all_fixpath_prefixes!
21055  else
21056    # Not in mixed or Windows style, start by that.
21057    new_path=`cmd //c echo $new_path`
21058
21059  input_path="$new_path"
21060  # Check if we need to convert this using DOS-style short mode. If the path
21061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21062  # take no chances and rewrite it.
21063  # Note: m4 eats our [], so we need to use [ and ] instead.
21064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21065  if test "x$has_forbidden_chars" != x; then
21066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21068  fi
21069
21070    # Output is in $new_path
21071
21072  windows_path="$new_path"
21073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21074    unix_path=`$CYGPATH -u "$windows_path"`
21075    new_path="$unix_path"
21076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21078    new_path="$unix_path"
21079  fi
21080
21081    # remove trailing .exe if any
21082    new_path="${new_path/%.exe/}"
21083
21084    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21085    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21086  fi
21087
21088    else
21089      # We're on a unix platform. Hooray! :)
21090      # First separate the path from the arguments. This will split at the first
21091      # space.
21092      complete="$FOUND_MAKE"
21093      path="${complete%% *}"
21094      tmp="$complete EOL"
21095      arguments="${tmp#* }"
21096
21097      # Cannot rely on the command "which" here since it doesn't always work.
21098      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21099      if test -z "$is_absolute_path"; then
21100        # Path to executable is not absolute. Find it.
21101        IFS_save="$IFS"
21102        IFS=:
21103        for p in $PATH; do
21104          if test -f "$p/$path" && test -x "$p/$path"; then
21105            new_path="$p/$path"
21106            break
21107          fi
21108        done
21109        IFS="$IFS_save"
21110      else
21111        # This is an absolute path, we can use it without further modifications.
21112        new_path="$path"
21113      fi
21114
21115      if test "x$new_path" = x; then
21116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21118        has_space=`$ECHO "$complete" | $GREP " "`
21119        if test "x$has_space" != x; then
21120          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21122        fi
21123        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21124      fi
21125    fi
21126
21127    # Now join together the path and the arguments once again
21128    if test "x$arguments" != xEOL; then
21129      new_complete="$new_path ${arguments% *}"
21130    else
21131      new_complete="$new_path"
21132    fi
21133
21134    if test "x$complete" != "x$new_complete"; then
21135      FOUND_MAKE="$new_complete"
21136      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21137$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21138    fi
21139  fi
21140
21141        fi
21142      fi
21143    fi
21144  fi
21145
21146    if test "x$FOUND_MAKE" = x; then
21147      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21148    fi
21149
21150  fi
21151
21152
21153  MAKE=$FOUND_MAKE
21154
21155  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21156$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21157
21158
21159  # Check if make supports the output sync option and if so, setup using it.
21160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21161$as_echo_n "checking if make --output-sync is supported... " >&6; }
21162  if $MAKE --version -O > /dev/null 2>&1; then
21163    OUTPUT_SYNC_SUPPORTED=true
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21165$as_echo "yes" >&6; }
21166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21167$as_echo_n "checking for output-sync value... " >&6; }
21168
21169# Check whether --with-output-sync was given.
21170if test "${with_output_sync+set}" = set; then :
21171  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21172fi
21173
21174    if test "x$OUTPUT_SYNC" = "x"; then
21175      OUTPUT_SYNC=none
21176    fi
21177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21178$as_echo "$OUTPUT_SYNC" >&6; }
21179    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21180      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21181    fi
21182  else
21183    OUTPUT_SYNC_SUPPORTED=false
21184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21185$as_echo "no" >&6; }
21186  fi
21187
21188
21189
21190
21191
21192
21193  # Test if find supports -delete
21194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21195$as_echo_n "checking if find supports -delete... " >&6; }
21196  FIND_DELETE="-delete"
21197
21198  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21199
21200  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21201
21202  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21203  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21204    # No, it does not.
21205    $RM $DELETEDIR/TestIfFindSupportsDelete
21206    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21207      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21208      FIND_DELETE="-print | $XARGS $RM"
21209    else
21210      FIND_DELETE="-exec $RM \{\} \+"
21211    fi
21212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21213$as_echo "no" >&6; }
21214  else
21215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21216$as_echo "yes" >&6; }
21217  fi
21218  $RMDIR $DELETEDIR
21219
21220
21221
21222  # Test which kind of tar was found
21223  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21224    TAR_TYPE="gnu"
21225  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21226    TAR_TYPE="bsd"
21227  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21228    TAR_TYPE="bsd"
21229  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21230    TAR_TYPE="solaris"
21231  fi
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21233$as_echo_n "checking what type of tar was found... " >&6; }
21234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21235$as_echo "$TAR_TYPE" >&6; }
21236
21237  TAR_CREATE_FILE_PARAM=""
21238
21239  if test "x$TAR_TYPE" = "xgnu"; then
21240    TAR_INCLUDE_PARAM="T"
21241    TAR_SUPPORTS_TRANSFORM="true"
21242    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21243      # When using gnu tar for Solaris targets, need to use compatibility mode
21244      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21245    fi
21246  else
21247    TAR_INCLUDE_PARAM="I"
21248    TAR_SUPPORTS_TRANSFORM="false"
21249  fi
21250
21251
21252
21253
21254
21255
21256  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21257  # This is a problem for the grep resident on AIX.
21258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21259$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21260  # Multiple subsequent spaces..
21261  STACK_SPACES='aaa   bbb   ccc'
21262  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21263  # patterns in it.
21264  STACK_LIST=${STACK_SPACES// /$'\n'}
21265  NEEDLE_SPACES='ccc bbb aaa'
21266  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21267  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21268  if test "x$RESULT" == "x"; then
21269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21270$as_echo "yes" >&6; }
21271  else
21272    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21273      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21274    fi
21275    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21276  fi
21277
21278
21279  # These tools might not be installed by default,
21280  # need hint on how to install them.
21281
21282
21283
21284  # Publish this variable in the help.
21285
21286
21287  if [ -z "${UNZIP+x}" ]; then
21288    # The variable is not set by user, try to locate tool using the code snippet
21289    for ac_prog in unzip
21290do
21291  # Extract the first word of "$ac_prog", so it can be a program name with args.
21292set dummy $ac_prog; ac_word=$2
21293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21294$as_echo_n "checking for $ac_word... " >&6; }
21295if ${ac_cv_path_UNZIP+:} false; then :
21296  $as_echo_n "(cached) " >&6
21297else
21298  case $UNZIP in
21299  [\\/]* | ?:[\\/]*)
21300  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21301  ;;
21302  *)
21303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21304for as_dir in $PATH
21305do
21306  IFS=$as_save_IFS
21307  test -z "$as_dir" && as_dir=.
21308    for ac_exec_ext in '' $ac_executable_extensions; do
21309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21310    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21312    break 2
21313  fi
21314done
21315  done
21316IFS=$as_save_IFS
21317
21318  ;;
21319esac
21320fi
21321UNZIP=$ac_cv_path_UNZIP
21322if test -n "$UNZIP"; then
21323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21324$as_echo "$UNZIP" >&6; }
21325else
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21327$as_echo "no" >&6; }
21328fi
21329
21330
21331  test -n "$UNZIP" && break
21332done
21333
21334  else
21335    # The variable is set, but is it from the command line or the environment?
21336
21337    # Try to remove the string !UNZIP! from our list.
21338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21340      # If it failed, the variable was not from the command line. Ignore it,
21341      # but warn the user (except for BASH, which is always set by the calling BASH).
21342      if test "xUNZIP" != xBASH; then
21343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21344$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21345      fi
21346      # Try to locate tool using the code snippet
21347      for ac_prog in unzip
21348do
21349  # Extract the first word of "$ac_prog", so it can be a program name with args.
21350set dummy $ac_prog; ac_word=$2
21351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21352$as_echo_n "checking for $ac_word... " >&6; }
21353if ${ac_cv_path_UNZIP+:} false; then :
21354  $as_echo_n "(cached) " >&6
21355else
21356  case $UNZIP in
21357  [\\/]* | ?:[\\/]*)
21358  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21359  ;;
21360  *)
21361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21362for as_dir in $PATH
21363do
21364  IFS=$as_save_IFS
21365  test -z "$as_dir" && as_dir=.
21366    for ac_exec_ext in '' $ac_executable_extensions; do
21367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21368    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21370    break 2
21371  fi
21372done
21373  done
21374IFS=$as_save_IFS
21375
21376  ;;
21377esac
21378fi
21379UNZIP=$ac_cv_path_UNZIP
21380if test -n "$UNZIP"; then
21381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21382$as_echo "$UNZIP" >&6; }
21383else
21384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21385$as_echo "no" >&6; }
21386fi
21387
21388
21389  test -n "$UNZIP" && break
21390done
21391
21392    else
21393      # If it succeeded, then it was overridden by the user. We will use it
21394      # for the tool.
21395
21396      # First remove it from the list of overridden variables, so we can test
21397      # for unknown variables in the end.
21398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21399
21400      # Check if we try to supply an empty value
21401      if test "x$UNZIP" = x; then
21402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21403$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21405$as_echo_n "checking for UNZIP... " >&6; }
21406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21407$as_echo "disabled" >&6; }
21408      else
21409        # Check if the provided tool contains a complete path.
21410        tool_specified="$UNZIP"
21411        tool_basename="${tool_specified##*/}"
21412        if test "x$tool_basename" = "x$tool_specified"; then
21413          # A command without a complete path is provided, search $PATH.
21414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21415$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21416          # Extract the first word of "$tool_basename", so it can be a program name with args.
21417set dummy $tool_basename; ac_word=$2
21418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21419$as_echo_n "checking for $ac_word... " >&6; }
21420if ${ac_cv_path_UNZIP+:} false; then :
21421  $as_echo_n "(cached) " >&6
21422else
21423  case $UNZIP in
21424  [\\/]* | ?:[\\/]*)
21425  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21426  ;;
21427  *)
21428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21429for as_dir in $PATH
21430do
21431  IFS=$as_save_IFS
21432  test -z "$as_dir" && as_dir=.
21433    for ac_exec_ext in '' $ac_executable_extensions; do
21434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21435    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21437    break 2
21438  fi
21439done
21440  done
21441IFS=$as_save_IFS
21442
21443  ;;
21444esac
21445fi
21446UNZIP=$ac_cv_path_UNZIP
21447if test -n "$UNZIP"; then
21448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21449$as_echo "$UNZIP" >&6; }
21450else
21451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21452$as_echo "no" >&6; }
21453fi
21454
21455
21456          if test "x$UNZIP" = x; then
21457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21458          fi
21459        else
21460          # Otherwise we believe it is a complete path. Use it as it is.
21461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21462$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21464$as_echo_n "checking for UNZIP... " >&6; }
21465          if test ! -x "$tool_specified"; then
21466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21467$as_echo "not found" >&6; }
21468            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21469          fi
21470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21471$as_echo "$tool_specified" >&6; }
21472        fi
21473      fi
21474    fi
21475
21476  fi
21477
21478
21479
21480  if test "x$UNZIP" = x; then
21481    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21482  fi
21483
21484
21485  # Since zip uses "ZIP" as a environment variable for passing options, we need
21486  # to name our variable differently, hence ZIPEXE.
21487
21488
21489
21490  # Publish this variable in the help.
21491
21492
21493  if [ -z "${ZIPEXE+x}" ]; then
21494    # The variable is not set by user, try to locate tool using the code snippet
21495    for ac_prog in zip
21496do
21497  # Extract the first word of "$ac_prog", so it can be a program name with args.
21498set dummy $ac_prog; ac_word=$2
21499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21500$as_echo_n "checking for $ac_word... " >&6; }
21501if ${ac_cv_path_ZIPEXE+:} false; then :
21502  $as_echo_n "(cached) " >&6
21503else
21504  case $ZIPEXE in
21505  [\\/]* | ?:[\\/]*)
21506  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21507  ;;
21508  *)
21509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21510for as_dir in $PATH
21511do
21512  IFS=$as_save_IFS
21513  test -z "$as_dir" && as_dir=.
21514    for ac_exec_ext in '' $ac_executable_extensions; do
21515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21516    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21518    break 2
21519  fi
21520done
21521  done
21522IFS=$as_save_IFS
21523
21524  ;;
21525esac
21526fi
21527ZIPEXE=$ac_cv_path_ZIPEXE
21528if test -n "$ZIPEXE"; then
21529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21530$as_echo "$ZIPEXE" >&6; }
21531else
21532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21533$as_echo "no" >&6; }
21534fi
21535
21536
21537  test -n "$ZIPEXE" && break
21538done
21539
21540  else
21541    # The variable is set, but is it from the command line or the environment?
21542
21543    # Try to remove the string !ZIPEXE! from our list.
21544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21546      # If it failed, the variable was not from the command line. Ignore it,
21547      # but warn the user (except for BASH, which is always set by the calling BASH).
21548      if test "xZIPEXE" != xBASH; then
21549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21550$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21551      fi
21552      # Try to locate tool using the code snippet
21553      for ac_prog in zip
21554do
21555  # Extract the first word of "$ac_prog", so it can be a program name with args.
21556set dummy $ac_prog; ac_word=$2
21557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21558$as_echo_n "checking for $ac_word... " >&6; }
21559if ${ac_cv_path_ZIPEXE+:} false; then :
21560  $as_echo_n "(cached) " >&6
21561else
21562  case $ZIPEXE in
21563  [\\/]* | ?:[\\/]*)
21564  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21565  ;;
21566  *)
21567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21568for as_dir in $PATH
21569do
21570  IFS=$as_save_IFS
21571  test -z "$as_dir" && as_dir=.
21572    for ac_exec_ext in '' $ac_executable_extensions; do
21573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21574    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21576    break 2
21577  fi
21578done
21579  done
21580IFS=$as_save_IFS
21581
21582  ;;
21583esac
21584fi
21585ZIPEXE=$ac_cv_path_ZIPEXE
21586if test -n "$ZIPEXE"; then
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21588$as_echo "$ZIPEXE" >&6; }
21589else
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21591$as_echo "no" >&6; }
21592fi
21593
21594
21595  test -n "$ZIPEXE" && break
21596done
21597
21598    else
21599      # If it succeeded, then it was overridden by the user. We will use it
21600      # for the tool.
21601
21602      # First remove it from the list of overridden variables, so we can test
21603      # for unknown variables in the end.
21604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21605
21606      # Check if we try to supply an empty value
21607      if test "x$ZIPEXE" = x; then
21608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21609$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21611$as_echo_n "checking for ZIPEXE... " >&6; }
21612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21613$as_echo "disabled" >&6; }
21614      else
21615        # Check if the provided tool contains a complete path.
21616        tool_specified="$ZIPEXE"
21617        tool_basename="${tool_specified##*/}"
21618        if test "x$tool_basename" = "x$tool_specified"; then
21619          # A command without a complete path is provided, search $PATH.
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21621$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21622          # Extract the first word of "$tool_basename", so it can be a program name with args.
21623set dummy $tool_basename; ac_word=$2
21624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21625$as_echo_n "checking for $ac_word... " >&6; }
21626if ${ac_cv_path_ZIPEXE+:} false; then :
21627  $as_echo_n "(cached) " >&6
21628else
21629  case $ZIPEXE in
21630  [\\/]* | ?:[\\/]*)
21631  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21632  ;;
21633  *)
21634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21635for as_dir in $PATH
21636do
21637  IFS=$as_save_IFS
21638  test -z "$as_dir" && as_dir=.
21639    for ac_exec_ext in '' $ac_executable_extensions; do
21640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21641    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21643    break 2
21644  fi
21645done
21646  done
21647IFS=$as_save_IFS
21648
21649  ;;
21650esac
21651fi
21652ZIPEXE=$ac_cv_path_ZIPEXE
21653if test -n "$ZIPEXE"; then
21654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21655$as_echo "$ZIPEXE" >&6; }
21656else
21657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21658$as_echo "no" >&6; }
21659fi
21660
21661
21662          if test "x$ZIPEXE" = x; then
21663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21664          fi
21665        else
21666          # Otherwise we believe it is a complete path. Use it as it is.
21667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21668$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21670$as_echo_n "checking for ZIPEXE... " >&6; }
21671          if test ! -x "$tool_specified"; then
21672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21673$as_echo "not found" >&6; }
21674            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21675          fi
21676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21677$as_echo "$tool_specified" >&6; }
21678        fi
21679      fi
21680    fi
21681
21682  fi
21683
21684
21685
21686  if test "x$ZIPEXE" = x; then
21687    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21688  fi
21689
21690
21691
21692  # Non-required basic tools
21693
21694
21695
21696  # Publish this variable in the help.
21697
21698
21699  if [ -z "${LDD+x}" ]; then
21700    # The variable is not set by user, try to locate tool using the code snippet
21701    for ac_prog in ldd
21702do
21703  # Extract the first word of "$ac_prog", so it can be a program name with args.
21704set dummy $ac_prog; ac_word=$2
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21706$as_echo_n "checking for $ac_word... " >&6; }
21707if ${ac_cv_path_LDD+:} false; then :
21708  $as_echo_n "(cached) " >&6
21709else
21710  case $LDD in
21711  [\\/]* | ?:[\\/]*)
21712  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21713  ;;
21714  *)
21715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716for as_dir in $PATH
21717do
21718  IFS=$as_save_IFS
21719  test -z "$as_dir" && as_dir=.
21720    for ac_exec_ext in '' $ac_executable_extensions; do
21721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724    break 2
21725  fi
21726done
21727  done
21728IFS=$as_save_IFS
21729
21730  ;;
21731esac
21732fi
21733LDD=$ac_cv_path_LDD
21734if test -n "$LDD"; then
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21736$as_echo "$LDD" >&6; }
21737else
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21739$as_echo "no" >&6; }
21740fi
21741
21742
21743  test -n "$LDD" && break
21744done
21745
21746  else
21747    # The variable is set, but is it from the command line or the environment?
21748
21749    # Try to remove the string !LDD! from our list.
21750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21752      # If it failed, the variable was not from the command line. Ignore it,
21753      # but warn the user (except for BASH, which is always set by the calling BASH).
21754      if test "xLDD" != xBASH; then
21755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21756$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21757      fi
21758      # Try to locate tool using the code snippet
21759      for ac_prog in ldd
21760do
21761  # Extract the first word of "$ac_prog", so it can be a program name with args.
21762set dummy $ac_prog; ac_word=$2
21763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21764$as_echo_n "checking for $ac_word... " >&6; }
21765if ${ac_cv_path_LDD+:} false; then :
21766  $as_echo_n "(cached) " >&6
21767else
21768  case $LDD in
21769  [\\/]* | ?:[\\/]*)
21770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21771  ;;
21772  *)
21773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21774for as_dir in $PATH
21775do
21776  IFS=$as_save_IFS
21777  test -z "$as_dir" && as_dir=.
21778    for ac_exec_ext in '' $ac_executable_extensions; do
21779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21782    break 2
21783  fi
21784done
21785  done
21786IFS=$as_save_IFS
21787
21788  ;;
21789esac
21790fi
21791LDD=$ac_cv_path_LDD
21792if test -n "$LDD"; then
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21794$as_echo "$LDD" >&6; }
21795else
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21797$as_echo "no" >&6; }
21798fi
21799
21800
21801  test -n "$LDD" && break
21802done
21803
21804    else
21805      # If it succeeded, then it was overridden by the user. We will use it
21806      # for the tool.
21807
21808      # First remove it from the list of overridden variables, so we can test
21809      # for unknown variables in the end.
21810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21811
21812      # Check if we try to supply an empty value
21813      if test "x$LDD" = x; then
21814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21815$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21817$as_echo_n "checking for LDD... " >&6; }
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21819$as_echo "disabled" >&6; }
21820      else
21821        # Check if the provided tool contains a complete path.
21822        tool_specified="$LDD"
21823        tool_basename="${tool_specified##*/}"
21824        if test "x$tool_basename" = "x$tool_specified"; then
21825          # A command without a complete path is provided, search $PATH.
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21827$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21828          # Extract the first word of "$tool_basename", so it can be a program name with args.
21829set dummy $tool_basename; ac_word=$2
21830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21831$as_echo_n "checking for $ac_word... " >&6; }
21832if ${ac_cv_path_LDD+:} false; then :
21833  $as_echo_n "(cached) " >&6
21834else
21835  case $LDD in
21836  [\\/]* | ?:[\\/]*)
21837  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21838  ;;
21839  *)
21840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21841for as_dir in $PATH
21842do
21843  IFS=$as_save_IFS
21844  test -z "$as_dir" && as_dir=.
21845    for ac_exec_ext in '' $ac_executable_extensions; do
21846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21847    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21849    break 2
21850  fi
21851done
21852  done
21853IFS=$as_save_IFS
21854
21855  ;;
21856esac
21857fi
21858LDD=$ac_cv_path_LDD
21859if test -n "$LDD"; then
21860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21861$as_echo "$LDD" >&6; }
21862else
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21864$as_echo "no" >&6; }
21865fi
21866
21867
21868          if test "x$LDD" = x; then
21869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21870          fi
21871        else
21872          # Otherwise we believe it is a complete path. Use it as it is.
21873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21874$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21876$as_echo_n "checking for LDD... " >&6; }
21877          if test ! -x "$tool_specified"; then
21878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21879$as_echo "not found" >&6; }
21880            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21881          fi
21882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21883$as_echo "$tool_specified" >&6; }
21884        fi
21885      fi
21886    fi
21887
21888  fi
21889
21890
21891  if test "x$LDD" = "x"; then
21892    # List shared lib dependencies is used for
21893    # debug output and checking for forbidden dependencies.
21894    # We can build without it.
21895    LDD="true"
21896  fi
21897
21898
21899  # Publish this variable in the help.
21900
21901
21902  if [ -z "${OTOOL+x}" ]; then
21903    # The variable is not set by user, try to locate tool using the code snippet
21904    for ac_prog in otool
21905do
21906  # Extract the first word of "$ac_prog", so it can be a program name with args.
21907set dummy $ac_prog; ac_word=$2
21908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21909$as_echo_n "checking for $ac_word... " >&6; }
21910if ${ac_cv_path_OTOOL+:} false; then :
21911  $as_echo_n "(cached) " >&6
21912else
21913  case $OTOOL in
21914  [\\/]* | ?:[\\/]*)
21915  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21916  ;;
21917  *)
21918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21919for as_dir in $PATH
21920do
21921  IFS=$as_save_IFS
21922  test -z "$as_dir" && as_dir=.
21923    for ac_exec_ext in '' $ac_executable_extensions; do
21924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21925    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21927    break 2
21928  fi
21929done
21930  done
21931IFS=$as_save_IFS
21932
21933  ;;
21934esac
21935fi
21936OTOOL=$ac_cv_path_OTOOL
21937if test -n "$OTOOL"; then
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21939$as_echo "$OTOOL" >&6; }
21940else
21941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21942$as_echo "no" >&6; }
21943fi
21944
21945
21946  test -n "$OTOOL" && break
21947done
21948
21949  else
21950    # The variable is set, but is it from the command line or the environment?
21951
21952    # Try to remove the string !OTOOL! from our list.
21953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21955      # If it failed, the variable was not from the command line. Ignore it,
21956      # but warn the user (except for BASH, which is always set by the calling BASH).
21957      if test "xOTOOL" != xBASH; then
21958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21959$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21960      fi
21961      # Try to locate tool using the code snippet
21962      for ac_prog in otool
21963do
21964  # Extract the first word of "$ac_prog", so it can be a program name with args.
21965set dummy $ac_prog; ac_word=$2
21966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967$as_echo_n "checking for $ac_word... " >&6; }
21968if ${ac_cv_path_OTOOL+:} false; then :
21969  $as_echo_n "(cached) " >&6
21970else
21971  case $OTOOL in
21972  [\\/]* | ?:[\\/]*)
21973  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21974  ;;
21975  *)
21976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977for as_dir in $PATH
21978do
21979  IFS=$as_save_IFS
21980  test -z "$as_dir" && as_dir=.
21981    for ac_exec_ext in '' $ac_executable_extensions; do
21982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985    break 2
21986  fi
21987done
21988  done
21989IFS=$as_save_IFS
21990
21991  ;;
21992esac
21993fi
21994OTOOL=$ac_cv_path_OTOOL
21995if test -n "$OTOOL"; then
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21997$as_echo "$OTOOL" >&6; }
21998else
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000$as_echo "no" >&6; }
22001fi
22002
22003
22004  test -n "$OTOOL" && break
22005done
22006
22007    else
22008      # If it succeeded, then it was overridden by the user. We will use it
22009      # for the tool.
22010
22011      # First remove it from the list of overridden variables, so we can test
22012      # for unknown variables in the end.
22013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22014
22015      # Check if we try to supply an empty value
22016      if test "x$OTOOL" = x; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22018$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22020$as_echo_n "checking for OTOOL... " >&6; }
22021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22022$as_echo "disabled" >&6; }
22023      else
22024        # Check if the provided tool contains a complete path.
22025        tool_specified="$OTOOL"
22026        tool_basename="${tool_specified##*/}"
22027        if test "x$tool_basename" = "x$tool_specified"; then
22028          # A command without a complete path is provided, search $PATH.
22029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22030$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22031          # Extract the first word of "$tool_basename", so it can be a program name with args.
22032set dummy $tool_basename; ac_word=$2
22033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034$as_echo_n "checking for $ac_word... " >&6; }
22035if ${ac_cv_path_OTOOL+:} false; then :
22036  $as_echo_n "(cached) " >&6
22037else
22038  case $OTOOL in
22039  [\\/]* | ?:[\\/]*)
22040  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22041  ;;
22042  *)
22043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22044for as_dir in $PATH
22045do
22046  IFS=$as_save_IFS
22047  test -z "$as_dir" && as_dir=.
22048    for ac_exec_ext in '' $ac_executable_extensions; do
22049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22050    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22052    break 2
22053  fi
22054done
22055  done
22056IFS=$as_save_IFS
22057
22058  ;;
22059esac
22060fi
22061OTOOL=$ac_cv_path_OTOOL
22062if test -n "$OTOOL"; then
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22064$as_echo "$OTOOL" >&6; }
22065else
22066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22067$as_echo "no" >&6; }
22068fi
22069
22070
22071          if test "x$OTOOL" = x; then
22072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22073          fi
22074        else
22075          # Otherwise we believe it is a complete path. Use it as it is.
22076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22077$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22079$as_echo_n "checking for OTOOL... " >&6; }
22080          if test ! -x "$tool_specified"; then
22081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22082$as_echo "not found" >&6; }
22083            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22084          fi
22085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22086$as_echo "$tool_specified" >&6; }
22087        fi
22088      fi
22089    fi
22090
22091  fi
22092
22093
22094  if test "x$OTOOL" = "x"; then
22095    OTOOL="true"
22096  fi
22097
22098
22099  # Publish this variable in the help.
22100
22101
22102  if [ -z "${READELF+x}" ]; then
22103    # The variable is not set by user, try to locate tool using the code snippet
22104    for ac_prog in greadelf readelf
22105do
22106  # Extract the first word of "$ac_prog", so it can be a program name with args.
22107set dummy $ac_prog; ac_word=$2
22108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22109$as_echo_n "checking for $ac_word... " >&6; }
22110if ${ac_cv_path_READELF+:} false; then :
22111  $as_echo_n "(cached) " >&6
22112else
22113  case $READELF in
22114  [\\/]* | ?:[\\/]*)
22115  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22116  ;;
22117  *)
22118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22119for as_dir in $PATH
22120do
22121  IFS=$as_save_IFS
22122  test -z "$as_dir" && as_dir=.
22123    for ac_exec_ext in '' $ac_executable_extensions; do
22124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22125    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22127    break 2
22128  fi
22129done
22130  done
22131IFS=$as_save_IFS
22132
22133  ;;
22134esac
22135fi
22136READELF=$ac_cv_path_READELF
22137if test -n "$READELF"; then
22138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22139$as_echo "$READELF" >&6; }
22140else
22141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22142$as_echo "no" >&6; }
22143fi
22144
22145
22146  test -n "$READELF" && break
22147done
22148
22149  else
22150    # The variable is set, but is it from the command line or the environment?
22151
22152    # Try to remove the string !READELF! from our list.
22153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22155      # If it failed, the variable was not from the command line. Ignore it,
22156      # but warn the user (except for BASH, which is always set by the calling BASH).
22157      if test "xREADELF" != xBASH; then
22158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22159$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22160      fi
22161      # Try to locate tool using the code snippet
22162      for ac_prog in greadelf readelf
22163do
22164  # Extract the first word of "$ac_prog", so it can be a program name with args.
22165set dummy $ac_prog; ac_word=$2
22166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22167$as_echo_n "checking for $ac_word... " >&6; }
22168if ${ac_cv_path_READELF+:} false; then :
22169  $as_echo_n "(cached) " >&6
22170else
22171  case $READELF in
22172  [\\/]* | ?:[\\/]*)
22173  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22174  ;;
22175  *)
22176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22177for as_dir in $PATH
22178do
22179  IFS=$as_save_IFS
22180  test -z "$as_dir" && as_dir=.
22181    for ac_exec_ext in '' $ac_executable_extensions; do
22182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22183    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22185    break 2
22186  fi
22187done
22188  done
22189IFS=$as_save_IFS
22190
22191  ;;
22192esac
22193fi
22194READELF=$ac_cv_path_READELF
22195if test -n "$READELF"; then
22196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22197$as_echo "$READELF" >&6; }
22198else
22199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22200$as_echo "no" >&6; }
22201fi
22202
22203
22204  test -n "$READELF" && break
22205done
22206
22207    else
22208      # If it succeeded, then it was overridden by the user. We will use it
22209      # for the tool.
22210
22211      # First remove it from the list of overridden variables, so we can test
22212      # for unknown variables in the end.
22213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22214
22215      # Check if we try to supply an empty value
22216      if test "x$READELF" = x; then
22217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22218$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22220$as_echo_n "checking for READELF... " >&6; }
22221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22222$as_echo "disabled" >&6; }
22223      else
22224        # Check if the provided tool contains a complete path.
22225        tool_specified="$READELF"
22226        tool_basename="${tool_specified##*/}"
22227        if test "x$tool_basename" = "x$tool_specified"; then
22228          # A command without a complete path is provided, search $PATH.
22229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22230$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22231          # Extract the first word of "$tool_basename", so it can be a program name with args.
22232set dummy $tool_basename; ac_word=$2
22233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22234$as_echo_n "checking for $ac_word... " >&6; }
22235if ${ac_cv_path_READELF+:} false; then :
22236  $as_echo_n "(cached) " >&6
22237else
22238  case $READELF in
22239  [\\/]* | ?:[\\/]*)
22240  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22241  ;;
22242  *)
22243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22244for as_dir in $PATH
22245do
22246  IFS=$as_save_IFS
22247  test -z "$as_dir" && as_dir=.
22248    for ac_exec_ext in '' $ac_executable_extensions; do
22249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22250    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22252    break 2
22253  fi
22254done
22255  done
22256IFS=$as_save_IFS
22257
22258  ;;
22259esac
22260fi
22261READELF=$ac_cv_path_READELF
22262if test -n "$READELF"; then
22263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22264$as_echo "$READELF" >&6; }
22265else
22266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22267$as_echo "no" >&6; }
22268fi
22269
22270
22271          if test "x$READELF" = x; then
22272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22273          fi
22274        else
22275          # Otherwise we believe it is a complete path. Use it as it is.
22276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22277$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22279$as_echo_n "checking for READELF... " >&6; }
22280          if test ! -x "$tool_specified"; then
22281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22282$as_echo "not found" >&6; }
22283            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22284          fi
22285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22286$as_echo "$tool_specified" >&6; }
22287        fi
22288      fi
22289    fi
22290
22291  fi
22292
22293
22294
22295
22296  # Publish this variable in the help.
22297
22298
22299  if [ -z "${HG+x}" ]; then
22300    # The variable is not set by user, try to locate tool using the code snippet
22301    for ac_prog in hg
22302do
22303  # Extract the first word of "$ac_prog", so it can be a program name with args.
22304set dummy $ac_prog; ac_word=$2
22305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22306$as_echo_n "checking for $ac_word... " >&6; }
22307if ${ac_cv_path_HG+:} false; then :
22308  $as_echo_n "(cached) " >&6
22309else
22310  case $HG in
22311  [\\/]* | ?:[\\/]*)
22312  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22313  ;;
22314  *)
22315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22316for as_dir in $PATH
22317do
22318  IFS=$as_save_IFS
22319  test -z "$as_dir" && as_dir=.
22320    for ac_exec_ext in '' $ac_executable_extensions; do
22321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22322    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22324    break 2
22325  fi
22326done
22327  done
22328IFS=$as_save_IFS
22329
22330  ;;
22331esac
22332fi
22333HG=$ac_cv_path_HG
22334if test -n "$HG"; then
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22336$as_echo "$HG" >&6; }
22337else
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22339$as_echo "no" >&6; }
22340fi
22341
22342
22343  test -n "$HG" && break
22344done
22345
22346  else
22347    # The variable is set, but is it from the command line or the environment?
22348
22349    # Try to remove the string !HG! from our list.
22350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22352      # If it failed, the variable was not from the command line. Ignore it,
22353      # but warn the user (except for BASH, which is always set by the calling BASH).
22354      if test "xHG" != xBASH; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22356$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22357      fi
22358      # Try to locate tool using the code snippet
22359      for ac_prog in hg
22360do
22361  # Extract the first word of "$ac_prog", so it can be a program name with args.
22362set dummy $ac_prog; ac_word=$2
22363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22364$as_echo_n "checking for $ac_word... " >&6; }
22365if ${ac_cv_path_HG+:} false; then :
22366  $as_echo_n "(cached) " >&6
22367else
22368  case $HG in
22369  [\\/]* | ?:[\\/]*)
22370  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22371  ;;
22372  *)
22373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22374for as_dir in $PATH
22375do
22376  IFS=$as_save_IFS
22377  test -z "$as_dir" && as_dir=.
22378    for ac_exec_ext in '' $ac_executable_extensions; do
22379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22380    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22382    break 2
22383  fi
22384done
22385  done
22386IFS=$as_save_IFS
22387
22388  ;;
22389esac
22390fi
22391HG=$ac_cv_path_HG
22392if test -n "$HG"; then
22393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22394$as_echo "$HG" >&6; }
22395else
22396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22397$as_echo "no" >&6; }
22398fi
22399
22400
22401  test -n "$HG" && break
22402done
22403
22404    else
22405      # If it succeeded, then it was overridden by the user. We will use it
22406      # for the tool.
22407
22408      # First remove it from the list of overridden variables, so we can test
22409      # for unknown variables in the end.
22410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22411
22412      # Check if we try to supply an empty value
22413      if test "x$HG" = x; then
22414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22415$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22417$as_echo_n "checking for HG... " >&6; }
22418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22419$as_echo "disabled" >&6; }
22420      else
22421        # Check if the provided tool contains a complete path.
22422        tool_specified="$HG"
22423        tool_basename="${tool_specified##*/}"
22424        if test "x$tool_basename" = "x$tool_specified"; then
22425          # A command without a complete path is provided, search $PATH.
22426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22427$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22428          # Extract the first word of "$tool_basename", so it can be a program name with args.
22429set dummy $tool_basename; ac_word=$2
22430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22431$as_echo_n "checking for $ac_word... " >&6; }
22432if ${ac_cv_path_HG+:} false; then :
22433  $as_echo_n "(cached) " >&6
22434else
22435  case $HG in
22436  [\\/]* | ?:[\\/]*)
22437  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22438  ;;
22439  *)
22440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22441for as_dir in $PATH
22442do
22443  IFS=$as_save_IFS
22444  test -z "$as_dir" && as_dir=.
22445    for ac_exec_ext in '' $ac_executable_extensions; do
22446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22447    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22449    break 2
22450  fi
22451done
22452  done
22453IFS=$as_save_IFS
22454
22455  ;;
22456esac
22457fi
22458HG=$ac_cv_path_HG
22459if test -n "$HG"; then
22460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22461$as_echo "$HG" >&6; }
22462else
22463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22464$as_echo "no" >&6; }
22465fi
22466
22467
22468          if test "x$HG" = x; then
22469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22470          fi
22471        else
22472          # Otherwise we believe it is a complete path. Use it as it is.
22473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22474$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22476$as_echo_n "checking for HG... " >&6; }
22477          if test ! -x "$tool_specified"; then
22478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22479$as_echo "not found" >&6; }
22480            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22481          fi
22482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22483$as_echo "$tool_specified" >&6; }
22484        fi
22485      fi
22486    fi
22487
22488  fi
22489
22490
22491
22492
22493  # Publish this variable in the help.
22494
22495
22496  if [ -z "${STAT+x}" ]; then
22497    # The variable is not set by user, try to locate tool using the code snippet
22498    for ac_prog in stat
22499do
22500  # Extract the first word of "$ac_prog", so it can be a program name with args.
22501set dummy $ac_prog; ac_word=$2
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22503$as_echo_n "checking for $ac_word... " >&6; }
22504if ${ac_cv_path_STAT+:} false; then :
22505  $as_echo_n "(cached) " >&6
22506else
22507  case $STAT in
22508  [\\/]* | ?:[\\/]*)
22509  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22510  ;;
22511  *)
22512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22513for as_dir in $PATH
22514do
22515  IFS=$as_save_IFS
22516  test -z "$as_dir" && as_dir=.
22517    for ac_exec_ext in '' $ac_executable_extensions; do
22518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22519    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22521    break 2
22522  fi
22523done
22524  done
22525IFS=$as_save_IFS
22526
22527  ;;
22528esac
22529fi
22530STAT=$ac_cv_path_STAT
22531if test -n "$STAT"; then
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22533$as_echo "$STAT" >&6; }
22534else
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22536$as_echo "no" >&6; }
22537fi
22538
22539
22540  test -n "$STAT" && break
22541done
22542
22543  else
22544    # The variable is set, but is it from the command line or the environment?
22545
22546    # Try to remove the string !STAT! from our list.
22547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22549      # If it failed, the variable was not from the command line. Ignore it,
22550      # but warn the user (except for BASH, which is always set by the calling BASH).
22551      if test "xSTAT" != xBASH; then
22552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22553$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22554      fi
22555      # Try to locate tool using the code snippet
22556      for ac_prog in stat
22557do
22558  # Extract the first word of "$ac_prog", so it can be a program name with args.
22559set dummy $ac_prog; ac_word=$2
22560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22561$as_echo_n "checking for $ac_word... " >&6; }
22562if ${ac_cv_path_STAT+:} false; then :
22563  $as_echo_n "(cached) " >&6
22564else
22565  case $STAT in
22566  [\\/]* | ?:[\\/]*)
22567  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22568  ;;
22569  *)
22570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22571for as_dir in $PATH
22572do
22573  IFS=$as_save_IFS
22574  test -z "$as_dir" && as_dir=.
22575    for ac_exec_ext in '' $ac_executable_extensions; do
22576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22577    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22579    break 2
22580  fi
22581done
22582  done
22583IFS=$as_save_IFS
22584
22585  ;;
22586esac
22587fi
22588STAT=$ac_cv_path_STAT
22589if test -n "$STAT"; then
22590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22591$as_echo "$STAT" >&6; }
22592else
22593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22594$as_echo "no" >&6; }
22595fi
22596
22597
22598  test -n "$STAT" && break
22599done
22600
22601    else
22602      # If it succeeded, then it was overridden by the user. We will use it
22603      # for the tool.
22604
22605      # First remove it from the list of overridden variables, so we can test
22606      # for unknown variables in the end.
22607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22608
22609      # Check if we try to supply an empty value
22610      if test "x$STAT" = x; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22612$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22614$as_echo_n "checking for STAT... " >&6; }
22615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22616$as_echo "disabled" >&6; }
22617      else
22618        # Check if the provided tool contains a complete path.
22619        tool_specified="$STAT"
22620        tool_basename="${tool_specified##*/}"
22621        if test "x$tool_basename" = "x$tool_specified"; then
22622          # A command without a complete path is provided, search $PATH.
22623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22624$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22625          # Extract the first word of "$tool_basename", so it can be a program name with args.
22626set dummy $tool_basename; ac_word=$2
22627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22628$as_echo_n "checking for $ac_word... " >&6; }
22629if ${ac_cv_path_STAT+:} false; then :
22630  $as_echo_n "(cached) " >&6
22631else
22632  case $STAT in
22633  [\\/]* | ?:[\\/]*)
22634  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22635  ;;
22636  *)
22637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22638for as_dir in $PATH
22639do
22640  IFS=$as_save_IFS
22641  test -z "$as_dir" && as_dir=.
22642    for ac_exec_ext in '' $ac_executable_extensions; do
22643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22644    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22646    break 2
22647  fi
22648done
22649  done
22650IFS=$as_save_IFS
22651
22652  ;;
22653esac
22654fi
22655STAT=$ac_cv_path_STAT
22656if test -n "$STAT"; then
22657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22658$as_echo "$STAT" >&6; }
22659else
22660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22661$as_echo "no" >&6; }
22662fi
22663
22664
22665          if test "x$STAT" = x; then
22666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22667          fi
22668        else
22669          # Otherwise we believe it is a complete path. Use it as it is.
22670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22671$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22673$as_echo_n "checking for STAT... " >&6; }
22674          if test ! -x "$tool_specified"; then
22675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22676$as_echo "not found" >&6; }
22677            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22678          fi
22679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22680$as_echo "$tool_specified" >&6; }
22681        fi
22682      fi
22683    fi
22684
22685  fi
22686
22687
22688
22689
22690  # Publish this variable in the help.
22691
22692
22693  if [ -z "${TIME+x}" ]; then
22694    # The variable is not set by user, try to locate tool using the code snippet
22695    for ac_prog in time
22696do
22697  # Extract the first word of "$ac_prog", so it can be a program name with args.
22698set dummy $ac_prog; ac_word=$2
22699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22700$as_echo_n "checking for $ac_word... " >&6; }
22701if ${ac_cv_path_TIME+:} false; then :
22702  $as_echo_n "(cached) " >&6
22703else
22704  case $TIME in
22705  [\\/]* | ?:[\\/]*)
22706  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22707  ;;
22708  *)
22709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22710for as_dir in $PATH
22711do
22712  IFS=$as_save_IFS
22713  test -z "$as_dir" && as_dir=.
22714    for ac_exec_ext in '' $ac_executable_extensions; do
22715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22716    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22718    break 2
22719  fi
22720done
22721  done
22722IFS=$as_save_IFS
22723
22724  ;;
22725esac
22726fi
22727TIME=$ac_cv_path_TIME
22728if test -n "$TIME"; then
22729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22730$as_echo "$TIME" >&6; }
22731else
22732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22733$as_echo "no" >&6; }
22734fi
22735
22736
22737  test -n "$TIME" && break
22738done
22739
22740  else
22741    # The variable is set, but is it from the command line or the environment?
22742
22743    # Try to remove the string !TIME! from our list.
22744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22746      # If it failed, the variable was not from the command line. Ignore it,
22747      # but warn the user (except for BASH, which is always set by the calling BASH).
22748      if test "xTIME" != xBASH; then
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22750$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22751      fi
22752      # Try to locate tool using the code snippet
22753      for ac_prog in time
22754do
22755  # Extract the first word of "$ac_prog", so it can be a program name with args.
22756set dummy $ac_prog; ac_word=$2
22757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22758$as_echo_n "checking for $ac_word... " >&6; }
22759if ${ac_cv_path_TIME+:} false; then :
22760  $as_echo_n "(cached) " >&6
22761else
22762  case $TIME in
22763  [\\/]* | ?:[\\/]*)
22764  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22765  ;;
22766  *)
22767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22768for as_dir in $PATH
22769do
22770  IFS=$as_save_IFS
22771  test -z "$as_dir" && as_dir=.
22772    for ac_exec_ext in '' $ac_executable_extensions; do
22773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22774    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22776    break 2
22777  fi
22778done
22779  done
22780IFS=$as_save_IFS
22781
22782  ;;
22783esac
22784fi
22785TIME=$ac_cv_path_TIME
22786if test -n "$TIME"; then
22787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22788$as_echo "$TIME" >&6; }
22789else
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22791$as_echo "no" >&6; }
22792fi
22793
22794
22795  test -n "$TIME" && break
22796done
22797
22798    else
22799      # If it succeeded, then it was overridden by the user. We will use it
22800      # for the tool.
22801
22802      # First remove it from the list of overridden variables, so we can test
22803      # for unknown variables in the end.
22804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22805
22806      # Check if we try to supply an empty value
22807      if test "x$TIME" = x; then
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22809$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22811$as_echo_n "checking for TIME... " >&6; }
22812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22813$as_echo "disabled" >&6; }
22814      else
22815        # Check if the provided tool contains a complete path.
22816        tool_specified="$TIME"
22817        tool_basename="${tool_specified##*/}"
22818        if test "x$tool_basename" = "x$tool_specified"; then
22819          # A command without a complete path is provided, search $PATH.
22820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22821$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22822          # Extract the first word of "$tool_basename", so it can be a program name with args.
22823set dummy $tool_basename; ac_word=$2
22824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22825$as_echo_n "checking for $ac_word... " >&6; }
22826if ${ac_cv_path_TIME+:} false; then :
22827  $as_echo_n "(cached) " >&6
22828else
22829  case $TIME in
22830  [\\/]* | ?:[\\/]*)
22831  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22832  ;;
22833  *)
22834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22835for as_dir in $PATH
22836do
22837  IFS=$as_save_IFS
22838  test -z "$as_dir" && as_dir=.
22839    for ac_exec_ext in '' $ac_executable_extensions; do
22840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22841    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22843    break 2
22844  fi
22845done
22846  done
22847IFS=$as_save_IFS
22848
22849  ;;
22850esac
22851fi
22852TIME=$ac_cv_path_TIME
22853if test -n "$TIME"; then
22854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22855$as_echo "$TIME" >&6; }
22856else
22857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22858$as_echo "no" >&6; }
22859fi
22860
22861
22862          if test "x$TIME" = x; then
22863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22864          fi
22865        else
22866          # Otherwise we believe it is a complete path. Use it as it is.
22867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22868$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22870$as_echo_n "checking for TIME... " >&6; }
22871          if test ! -x "$tool_specified"; then
22872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22873$as_echo "not found" >&6; }
22874            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22875          fi
22876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22877$as_echo "$tool_specified" >&6; }
22878        fi
22879      fi
22880    fi
22881
22882  fi
22883
22884
22885  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22886  # be in the user path.
22887
22888
22889  # Publish this variable in the help.
22890
22891
22892  if [ -z "${DTRACE+x}" ]; then
22893    # The variable is not set by user, try to locate tool using the code snippet
22894    for ac_prog in dtrace
22895do
22896  # Extract the first word of "$ac_prog", so it can be a program name with args.
22897set dummy $ac_prog; ac_word=$2
22898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22899$as_echo_n "checking for $ac_word... " >&6; }
22900if ${ac_cv_path_DTRACE+:} false; then :
22901  $as_echo_n "(cached) " >&6
22902else
22903  case $DTRACE in
22904  [\\/]* | ?:[\\/]*)
22905  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22906  ;;
22907  *)
22908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22909as_dummy="$PATH:/usr/sbin"
22910for as_dir in $as_dummy
22911do
22912  IFS=$as_save_IFS
22913  test -z "$as_dir" && as_dir=.
22914    for ac_exec_ext in '' $ac_executable_extensions; do
22915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22916    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22918    break 2
22919  fi
22920done
22921  done
22922IFS=$as_save_IFS
22923
22924  ;;
22925esac
22926fi
22927DTRACE=$ac_cv_path_DTRACE
22928if test -n "$DTRACE"; then
22929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22930$as_echo "$DTRACE" >&6; }
22931else
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22933$as_echo "no" >&6; }
22934fi
22935
22936
22937  test -n "$DTRACE" && break
22938done
22939
22940  else
22941    # The variable is set, but is it from the command line or the environment?
22942
22943    # Try to remove the string !DTRACE! from our list.
22944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22946      # If it failed, the variable was not from the command line. Ignore it,
22947      # but warn the user (except for BASH, which is always set by the calling BASH).
22948      if test "xDTRACE" != xBASH; then
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22950$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22951      fi
22952      # Try to locate tool using the code snippet
22953      for ac_prog in dtrace
22954do
22955  # Extract the first word of "$ac_prog", so it can be a program name with args.
22956set dummy $ac_prog; ac_word=$2
22957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22958$as_echo_n "checking for $ac_word... " >&6; }
22959if ${ac_cv_path_DTRACE+:} false; then :
22960  $as_echo_n "(cached) " >&6
22961else
22962  case $DTRACE in
22963  [\\/]* | ?:[\\/]*)
22964  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22965  ;;
22966  *)
22967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22968as_dummy="$PATH:/usr/sbin"
22969for as_dir in $as_dummy
22970do
22971  IFS=$as_save_IFS
22972  test -z "$as_dir" && as_dir=.
22973    for ac_exec_ext in '' $ac_executable_extensions; do
22974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22975    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22977    break 2
22978  fi
22979done
22980  done
22981IFS=$as_save_IFS
22982
22983  ;;
22984esac
22985fi
22986DTRACE=$ac_cv_path_DTRACE
22987if test -n "$DTRACE"; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22989$as_echo "$DTRACE" >&6; }
22990else
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22992$as_echo "no" >&6; }
22993fi
22994
22995
22996  test -n "$DTRACE" && break
22997done
22998
22999    else
23000      # If it succeeded, then it was overridden by the user. We will use it
23001      # for the tool.
23002
23003      # First remove it from the list of overridden variables, so we can test
23004      # for unknown variables in the end.
23005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23006
23007      # Check if we try to supply an empty value
23008      if test "x$DTRACE" = x; then
23009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23010$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23012$as_echo_n "checking for DTRACE... " >&6; }
23013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23014$as_echo "disabled" >&6; }
23015      else
23016        # Check if the provided tool contains a complete path.
23017        tool_specified="$DTRACE"
23018        tool_basename="${tool_specified##*/}"
23019        if test "x$tool_basename" = "x$tool_specified"; then
23020          # A command without a complete path is provided, search $PATH.
23021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23022$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23023          # Extract the first word of "$tool_basename", so it can be a program name with args.
23024set dummy $tool_basename; ac_word=$2
23025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23026$as_echo_n "checking for $ac_word... " >&6; }
23027if ${ac_cv_path_DTRACE+:} false; then :
23028  $as_echo_n "(cached) " >&6
23029else
23030  case $DTRACE in
23031  [\\/]* | ?:[\\/]*)
23032  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23033  ;;
23034  *)
23035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23036for as_dir in $PATH
23037do
23038  IFS=$as_save_IFS
23039  test -z "$as_dir" && as_dir=.
23040    for ac_exec_ext in '' $ac_executable_extensions; do
23041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23042    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23044    break 2
23045  fi
23046done
23047  done
23048IFS=$as_save_IFS
23049
23050  ;;
23051esac
23052fi
23053DTRACE=$ac_cv_path_DTRACE
23054if test -n "$DTRACE"; then
23055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23056$as_echo "$DTRACE" >&6; }
23057else
23058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23059$as_echo "no" >&6; }
23060fi
23061
23062
23063          if test "x$DTRACE" = x; then
23064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23065          fi
23066        else
23067          # Otherwise we believe it is a complete path. Use it as it is.
23068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23069$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23071$as_echo_n "checking for DTRACE... " >&6; }
23072          if test ! -x "$tool_specified"; then
23073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23074$as_echo "not found" >&6; }
23075            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23076          fi
23077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23078$as_echo "$tool_specified" >&6; }
23079        fi
23080      fi
23081    fi
23082
23083  fi
23084
23085
23086
23087
23088  # Publish this variable in the help.
23089
23090
23091  if [ -z "${PATCH+x}" ]; then
23092    # The variable is not set by user, try to locate tool using the code snippet
23093    for ac_prog in gpatch patch
23094do
23095  # Extract the first word of "$ac_prog", so it can be a program name with args.
23096set dummy $ac_prog; ac_word=$2
23097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23098$as_echo_n "checking for $ac_word... " >&6; }
23099if ${ac_cv_path_PATCH+:} false; then :
23100  $as_echo_n "(cached) " >&6
23101else
23102  case $PATCH in
23103  [\\/]* | ?:[\\/]*)
23104  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23105  ;;
23106  *)
23107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23108for as_dir in $PATH
23109do
23110  IFS=$as_save_IFS
23111  test -z "$as_dir" && as_dir=.
23112    for ac_exec_ext in '' $ac_executable_extensions; do
23113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23114    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23116    break 2
23117  fi
23118done
23119  done
23120IFS=$as_save_IFS
23121
23122  ;;
23123esac
23124fi
23125PATCH=$ac_cv_path_PATCH
23126if test -n "$PATCH"; then
23127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23128$as_echo "$PATCH" >&6; }
23129else
23130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23131$as_echo "no" >&6; }
23132fi
23133
23134
23135  test -n "$PATCH" && break
23136done
23137
23138  else
23139    # The variable is set, but is it from the command line or the environment?
23140
23141    # Try to remove the string !PATCH! from our list.
23142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23144      # If it failed, the variable was not from the command line. Ignore it,
23145      # but warn the user (except for BASH, which is always set by the calling BASH).
23146      if test "xPATCH" != xBASH; then
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23148$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23149      fi
23150      # Try to locate tool using the code snippet
23151      for ac_prog in gpatch patch
23152do
23153  # Extract the first word of "$ac_prog", so it can be a program name with args.
23154set dummy $ac_prog; ac_word=$2
23155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23156$as_echo_n "checking for $ac_word... " >&6; }
23157if ${ac_cv_path_PATCH+:} false; then :
23158  $as_echo_n "(cached) " >&6
23159else
23160  case $PATCH in
23161  [\\/]* | ?:[\\/]*)
23162  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23163  ;;
23164  *)
23165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23166for as_dir in $PATH
23167do
23168  IFS=$as_save_IFS
23169  test -z "$as_dir" && as_dir=.
23170    for ac_exec_ext in '' $ac_executable_extensions; do
23171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23172    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23174    break 2
23175  fi
23176done
23177  done
23178IFS=$as_save_IFS
23179
23180  ;;
23181esac
23182fi
23183PATCH=$ac_cv_path_PATCH
23184if test -n "$PATCH"; then
23185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23186$as_echo "$PATCH" >&6; }
23187else
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23189$as_echo "no" >&6; }
23190fi
23191
23192
23193  test -n "$PATCH" && break
23194done
23195
23196    else
23197      # If it succeeded, then it was overridden by the user. We will use it
23198      # for the tool.
23199
23200      # First remove it from the list of overridden variables, so we can test
23201      # for unknown variables in the end.
23202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23203
23204      # Check if we try to supply an empty value
23205      if test "x$PATCH" = x; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23207$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23209$as_echo_n "checking for PATCH... " >&6; }
23210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23211$as_echo "disabled" >&6; }
23212      else
23213        # Check if the provided tool contains a complete path.
23214        tool_specified="$PATCH"
23215        tool_basename="${tool_specified##*/}"
23216        if test "x$tool_basename" = "x$tool_specified"; then
23217          # A command without a complete path is provided, search $PATH.
23218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23219$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23220          # Extract the first word of "$tool_basename", so it can be a program name with args.
23221set dummy $tool_basename; ac_word=$2
23222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23223$as_echo_n "checking for $ac_word... " >&6; }
23224if ${ac_cv_path_PATCH+:} false; then :
23225  $as_echo_n "(cached) " >&6
23226else
23227  case $PATCH in
23228  [\\/]* | ?:[\\/]*)
23229  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23230  ;;
23231  *)
23232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23233for as_dir in $PATH
23234do
23235  IFS=$as_save_IFS
23236  test -z "$as_dir" && as_dir=.
23237    for ac_exec_ext in '' $ac_executable_extensions; do
23238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23239    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23241    break 2
23242  fi
23243done
23244  done
23245IFS=$as_save_IFS
23246
23247  ;;
23248esac
23249fi
23250PATCH=$ac_cv_path_PATCH
23251if test -n "$PATCH"; then
23252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23253$as_echo "$PATCH" >&6; }
23254else
23255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23256$as_echo "no" >&6; }
23257fi
23258
23259
23260          if test "x$PATCH" = x; then
23261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23262          fi
23263        else
23264          # Otherwise we believe it is a complete path. Use it as it is.
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23266$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23268$as_echo_n "checking for PATCH... " >&6; }
23269          if test ! -x "$tool_specified"; then
23270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23271$as_echo "not found" >&6; }
23272            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23273          fi
23274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23275$as_echo "$tool_specified" >&6; }
23276        fi
23277      fi
23278    fi
23279
23280  fi
23281
23282
23283  # Check if it's GNU time
23284  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23285  if test "x$IS_GNU_TIME" != x; then
23286    IS_GNU_TIME=yes
23287  else
23288    IS_GNU_TIME=no
23289  fi
23290
23291
23292  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23293
23294
23295
23296  # Publish this variable in the help.
23297
23298
23299  if [ -z "${DSYMUTIL+x}" ]; then
23300    # The variable is not set by user, try to locate tool using the code snippet
23301    for ac_prog in dsymutil
23302do
23303  # Extract the first word of "$ac_prog", so it can be a program name with args.
23304set dummy $ac_prog; ac_word=$2
23305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23306$as_echo_n "checking for $ac_word... " >&6; }
23307if ${ac_cv_path_DSYMUTIL+:} false; then :
23308  $as_echo_n "(cached) " >&6
23309else
23310  case $DSYMUTIL in
23311  [\\/]* | ?:[\\/]*)
23312  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23313  ;;
23314  *)
23315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23316for as_dir in $PATH
23317do
23318  IFS=$as_save_IFS
23319  test -z "$as_dir" && as_dir=.
23320    for ac_exec_ext in '' $ac_executable_extensions; do
23321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23322    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23324    break 2
23325  fi
23326done
23327  done
23328IFS=$as_save_IFS
23329
23330  ;;
23331esac
23332fi
23333DSYMUTIL=$ac_cv_path_DSYMUTIL
23334if test -n "$DSYMUTIL"; then
23335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23336$as_echo "$DSYMUTIL" >&6; }
23337else
23338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23339$as_echo "no" >&6; }
23340fi
23341
23342
23343  test -n "$DSYMUTIL" && break
23344done
23345
23346  else
23347    # The variable is set, but is it from the command line or the environment?
23348
23349    # Try to remove the string !DSYMUTIL! from our list.
23350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23352      # If it failed, the variable was not from the command line. Ignore it,
23353      # but warn the user (except for BASH, which is always set by the calling BASH).
23354      if test "xDSYMUTIL" != xBASH; then
23355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23356$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23357      fi
23358      # Try to locate tool using the code snippet
23359      for ac_prog in dsymutil
23360do
23361  # Extract the first word of "$ac_prog", so it can be a program name with args.
23362set dummy $ac_prog; ac_word=$2
23363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23364$as_echo_n "checking for $ac_word... " >&6; }
23365if ${ac_cv_path_DSYMUTIL+:} false; then :
23366  $as_echo_n "(cached) " >&6
23367else
23368  case $DSYMUTIL in
23369  [\\/]* | ?:[\\/]*)
23370  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23371  ;;
23372  *)
23373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23374for as_dir in $PATH
23375do
23376  IFS=$as_save_IFS
23377  test -z "$as_dir" && as_dir=.
23378    for ac_exec_ext in '' $ac_executable_extensions; do
23379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23380    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23382    break 2
23383  fi
23384done
23385  done
23386IFS=$as_save_IFS
23387
23388  ;;
23389esac
23390fi
23391DSYMUTIL=$ac_cv_path_DSYMUTIL
23392if test -n "$DSYMUTIL"; then
23393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23394$as_echo "$DSYMUTIL" >&6; }
23395else
23396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23397$as_echo "no" >&6; }
23398fi
23399
23400
23401  test -n "$DSYMUTIL" && break
23402done
23403
23404    else
23405      # If it succeeded, then it was overridden by the user. We will use it
23406      # for the tool.
23407
23408      # First remove it from the list of overridden variables, so we can test
23409      # for unknown variables in the end.
23410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23411
23412      # Check if we try to supply an empty value
23413      if test "x$DSYMUTIL" = x; then
23414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23415$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23417$as_echo_n "checking for DSYMUTIL... " >&6; }
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23419$as_echo "disabled" >&6; }
23420      else
23421        # Check if the provided tool contains a complete path.
23422        tool_specified="$DSYMUTIL"
23423        tool_basename="${tool_specified##*/}"
23424        if test "x$tool_basename" = "x$tool_specified"; then
23425          # A command without a complete path is provided, search $PATH.
23426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23427$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23428          # Extract the first word of "$tool_basename", so it can be a program name with args.
23429set dummy $tool_basename; ac_word=$2
23430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23431$as_echo_n "checking for $ac_word... " >&6; }
23432if ${ac_cv_path_DSYMUTIL+:} false; then :
23433  $as_echo_n "(cached) " >&6
23434else
23435  case $DSYMUTIL in
23436  [\\/]* | ?:[\\/]*)
23437  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23438  ;;
23439  *)
23440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23441for as_dir in $PATH
23442do
23443  IFS=$as_save_IFS
23444  test -z "$as_dir" && as_dir=.
23445    for ac_exec_ext in '' $ac_executable_extensions; do
23446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23447    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23449    break 2
23450  fi
23451done
23452  done
23453IFS=$as_save_IFS
23454
23455  ;;
23456esac
23457fi
23458DSYMUTIL=$ac_cv_path_DSYMUTIL
23459if test -n "$DSYMUTIL"; then
23460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23461$as_echo "$DSYMUTIL" >&6; }
23462else
23463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23464$as_echo "no" >&6; }
23465fi
23466
23467
23468          if test "x$DSYMUTIL" = x; then
23469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23470          fi
23471        else
23472          # Otherwise we believe it is a complete path. Use it as it is.
23473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23474$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23476$as_echo_n "checking for DSYMUTIL... " >&6; }
23477          if test ! -x "$tool_specified"; then
23478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23479$as_echo "not found" >&6; }
23480            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23481          fi
23482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23483$as_echo "$tool_specified" >&6; }
23484        fi
23485      fi
23486    fi
23487
23488  fi
23489
23490
23491
23492  if test "x$DSYMUTIL" = x; then
23493    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23494  fi
23495
23496
23497
23498
23499
23500  # Publish this variable in the help.
23501
23502
23503  if [ -z "${XATTR+x}" ]; then
23504    # The variable is not set by user, try to locate tool using the code snippet
23505    for ac_prog in xattr
23506do
23507  # Extract the first word of "$ac_prog", so it can be a program name with args.
23508set dummy $ac_prog; ac_word=$2
23509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23510$as_echo_n "checking for $ac_word... " >&6; }
23511if ${ac_cv_path_XATTR+:} false; then :
23512  $as_echo_n "(cached) " >&6
23513else
23514  case $XATTR in
23515  [\\/]* | ?:[\\/]*)
23516  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23517  ;;
23518  *)
23519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23520for as_dir in $PATH
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23528    break 2
23529  fi
23530done
23531  done
23532IFS=$as_save_IFS
23533
23534  ;;
23535esac
23536fi
23537XATTR=$ac_cv_path_XATTR
23538if test -n "$XATTR"; then
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23540$as_echo "$XATTR" >&6; }
23541else
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543$as_echo "no" >&6; }
23544fi
23545
23546
23547  test -n "$XATTR" && break
23548done
23549
23550  else
23551    # The variable is set, but is it from the command line or the environment?
23552
23553    # Try to remove the string !XATTR! from our list.
23554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23556      # If it failed, the variable was not from the command line. Ignore it,
23557      # but warn the user (except for BASH, which is always set by the calling BASH).
23558      if test "xXATTR" != xBASH; then
23559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23560$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23561      fi
23562      # Try to locate tool using the code snippet
23563      for ac_prog in xattr
23564do
23565  # Extract the first word of "$ac_prog", so it can be a program name with args.
23566set dummy $ac_prog; ac_word=$2
23567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23568$as_echo_n "checking for $ac_word... " >&6; }
23569if ${ac_cv_path_XATTR+:} false; then :
23570  $as_echo_n "(cached) " >&6
23571else
23572  case $XATTR in
23573  [\\/]* | ?:[\\/]*)
23574  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23575  ;;
23576  *)
23577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23578for as_dir in $PATH
23579do
23580  IFS=$as_save_IFS
23581  test -z "$as_dir" && as_dir=.
23582    for ac_exec_ext in '' $ac_executable_extensions; do
23583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23584    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23586    break 2
23587  fi
23588done
23589  done
23590IFS=$as_save_IFS
23591
23592  ;;
23593esac
23594fi
23595XATTR=$ac_cv_path_XATTR
23596if test -n "$XATTR"; then
23597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23598$as_echo "$XATTR" >&6; }
23599else
23600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23601$as_echo "no" >&6; }
23602fi
23603
23604
23605  test -n "$XATTR" && break
23606done
23607
23608    else
23609      # If it succeeded, then it was overridden by the user. We will use it
23610      # for the tool.
23611
23612      # First remove it from the list of overridden variables, so we can test
23613      # for unknown variables in the end.
23614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23615
23616      # Check if we try to supply an empty value
23617      if test "x$XATTR" = x; then
23618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23619$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23621$as_echo_n "checking for XATTR... " >&6; }
23622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23623$as_echo "disabled" >&6; }
23624      else
23625        # Check if the provided tool contains a complete path.
23626        tool_specified="$XATTR"
23627        tool_basename="${tool_specified##*/}"
23628        if test "x$tool_basename" = "x$tool_specified"; then
23629          # A command without a complete path is provided, search $PATH.
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23631$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23632          # Extract the first word of "$tool_basename", so it can be a program name with args.
23633set dummy $tool_basename; ac_word=$2
23634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23635$as_echo_n "checking for $ac_word... " >&6; }
23636if ${ac_cv_path_XATTR+:} false; then :
23637  $as_echo_n "(cached) " >&6
23638else
23639  case $XATTR in
23640  [\\/]* | ?:[\\/]*)
23641  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23642  ;;
23643  *)
23644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23645for as_dir in $PATH
23646do
23647  IFS=$as_save_IFS
23648  test -z "$as_dir" && as_dir=.
23649    for ac_exec_ext in '' $ac_executable_extensions; do
23650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23651    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23653    break 2
23654  fi
23655done
23656  done
23657IFS=$as_save_IFS
23658
23659  ;;
23660esac
23661fi
23662XATTR=$ac_cv_path_XATTR
23663if test -n "$XATTR"; then
23664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23665$as_echo "$XATTR" >&6; }
23666else
23667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23668$as_echo "no" >&6; }
23669fi
23670
23671
23672          if test "x$XATTR" = x; then
23673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23674          fi
23675        else
23676          # Otherwise we believe it is a complete path. Use it as it is.
23677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23678$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23680$as_echo_n "checking for XATTR... " >&6; }
23681          if test ! -x "$tool_specified"; then
23682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23683$as_echo "not found" >&6; }
23684            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23685          fi
23686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23687$as_echo "$tool_specified" >&6; }
23688        fi
23689      fi
23690    fi
23691
23692  fi
23693
23694
23695
23696  if test "x$XATTR" = x; then
23697    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23698  fi
23699
23700
23701
23702
23703  # Publish this variable in the help.
23704
23705
23706  if [ -z "${CODESIGN+x}" ]; then
23707    # The variable is not set by user, try to locate tool using the code snippet
23708    for ac_prog in codesign
23709do
23710  # Extract the first word of "$ac_prog", so it can be a program name with args.
23711set dummy $ac_prog; ac_word=$2
23712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23713$as_echo_n "checking for $ac_word... " >&6; }
23714if ${ac_cv_path_CODESIGN+:} false; then :
23715  $as_echo_n "(cached) " >&6
23716else
23717  case $CODESIGN in
23718  [\\/]* | ?:[\\/]*)
23719  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23720  ;;
23721  *)
23722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23723for as_dir in $PATH
23724do
23725  IFS=$as_save_IFS
23726  test -z "$as_dir" && as_dir=.
23727    for ac_exec_ext in '' $ac_executable_extensions; do
23728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23729    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23731    break 2
23732  fi
23733done
23734  done
23735IFS=$as_save_IFS
23736
23737  ;;
23738esac
23739fi
23740CODESIGN=$ac_cv_path_CODESIGN
23741if test -n "$CODESIGN"; then
23742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23743$as_echo "$CODESIGN" >&6; }
23744else
23745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23746$as_echo "no" >&6; }
23747fi
23748
23749
23750  test -n "$CODESIGN" && break
23751done
23752
23753  else
23754    # The variable is set, but is it from the command line or the environment?
23755
23756    # Try to remove the string !CODESIGN! from our list.
23757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23759      # If it failed, the variable was not from the command line. Ignore it,
23760      # but warn the user (except for BASH, which is always set by the calling BASH).
23761      if test "xCODESIGN" != xBASH; then
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23763$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23764      fi
23765      # Try to locate tool using the code snippet
23766      for ac_prog in codesign
23767do
23768  # Extract the first word of "$ac_prog", so it can be a program name with args.
23769set dummy $ac_prog; ac_word=$2
23770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23771$as_echo_n "checking for $ac_word... " >&6; }
23772if ${ac_cv_path_CODESIGN+:} false; then :
23773  $as_echo_n "(cached) " >&6
23774else
23775  case $CODESIGN in
23776  [\\/]* | ?:[\\/]*)
23777  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23778  ;;
23779  *)
23780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23781for as_dir in $PATH
23782do
23783  IFS=$as_save_IFS
23784  test -z "$as_dir" && as_dir=.
23785    for ac_exec_ext in '' $ac_executable_extensions; do
23786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23787    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23789    break 2
23790  fi
23791done
23792  done
23793IFS=$as_save_IFS
23794
23795  ;;
23796esac
23797fi
23798CODESIGN=$ac_cv_path_CODESIGN
23799if test -n "$CODESIGN"; then
23800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23801$as_echo "$CODESIGN" >&6; }
23802else
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23804$as_echo "no" >&6; }
23805fi
23806
23807
23808  test -n "$CODESIGN" && break
23809done
23810
23811    else
23812      # If it succeeded, then it was overridden by the user. We will use it
23813      # for the tool.
23814
23815      # First remove it from the list of overridden variables, so we can test
23816      # for unknown variables in the end.
23817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23818
23819      # Check if we try to supply an empty value
23820      if test "x$CODESIGN" = x; then
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23822$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23824$as_echo_n "checking for CODESIGN... " >&6; }
23825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23826$as_echo "disabled" >&6; }
23827      else
23828        # Check if the provided tool contains a complete path.
23829        tool_specified="$CODESIGN"
23830        tool_basename="${tool_specified##*/}"
23831        if test "x$tool_basename" = "x$tool_specified"; then
23832          # A command without a complete path is provided, search $PATH.
23833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23834$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23835          # Extract the first word of "$tool_basename", so it can be a program name with args.
23836set dummy $tool_basename; ac_word=$2
23837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23838$as_echo_n "checking for $ac_word... " >&6; }
23839if ${ac_cv_path_CODESIGN+:} false; then :
23840  $as_echo_n "(cached) " >&6
23841else
23842  case $CODESIGN in
23843  [\\/]* | ?:[\\/]*)
23844  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23845  ;;
23846  *)
23847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23848for as_dir in $PATH
23849do
23850  IFS=$as_save_IFS
23851  test -z "$as_dir" && as_dir=.
23852    for ac_exec_ext in '' $ac_executable_extensions; do
23853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23854    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23856    break 2
23857  fi
23858done
23859  done
23860IFS=$as_save_IFS
23861
23862  ;;
23863esac
23864fi
23865CODESIGN=$ac_cv_path_CODESIGN
23866if test -n "$CODESIGN"; then
23867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23868$as_echo "$CODESIGN" >&6; }
23869else
23870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23871$as_echo "no" >&6; }
23872fi
23873
23874
23875          if test "x$CODESIGN" = x; then
23876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23877          fi
23878        else
23879          # Otherwise we believe it is a complete path. Use it as it is.
23880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23881$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23883$as_echo_n "checking for CODESIGN... " >&6; }
23884          if test ! -x "$tool_specified"; then
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23886$as_echo "not found" >&6; }
23887            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23888          fi
23889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23890$as_echo "$tool_specified" >&6; }
23891        fi
23892      fi
23893    fi
23894
23895  fi
23896
23897
23898    if test "x$CODESIGN" != "x"; then
23899      # Verify that the openjdk_codesign certificate is present
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23901$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23902      $RM codesign-testfile
23903      $TOUCH codesign-testfile
23904      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23905      $RM codesign-testfile
23906      if test "x$CODESIGN" = x; then
23907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23908$as_echo "no" >&6; }
23909      else
23910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23911$as_echo "yes" >&6; }
23912      fi
23913    fi
23914
23915
23916
23917  # Publish this variable in the help.
23918
23919
23920  if [ -z "${SETFILE+x}" ]; then
23921    # The variable is not set by user, try to locate tool using the code snippet
23922    for ac_prog in SetFile
23923do
23924  # Extract the first word of "$ac_prog", so it can be a program name with args.
23925set dummy $ac_prog; ac_word=$2
23926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23927$as_echo_n "checking for $ac_word... " >&6; }
23928if ${ac_cv_path_SETFILE+:} false; then :
23929  $as_echo_n "(cached) " >&6
23930else
23931  case $SETFILE in
23932  [\\/]* | ?:[\\/]*)
23933  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23934  ;;
23935  *)
23936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23937for as_dir in $PATH
23938do
23939  IFS=$as_save_IFS
23940  test -z "$as_dir" && as_dir=.
23941    for ac_exec_ext in '' $ac_executable_extensions; do
23942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23943    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23945    break 2
23946  fi
23947done
23948  done
23949IFS=$as_save_IFS
23950
23951  ;;
23952esac
23953fi
23954SETFILE=$ac_cv_path_SETFILE
23955if test -n "$SETFILE"; then
23956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23957$as_echo "$SETFILE" >&6; }
23958else
23959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23960$as_echo "no" >&6; }
23961fi
23962
23963
23964  test -n "$SETFILE" && break
23965done
23966
23967  else
23968    # The variable is set, but is it from the command line or the environment?
23969
23970    # Try to remove the string !SETFILE! from our list.
23971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23973      # If it failed, the variable was not from the command line. Ignore it,
23974      # but warn the user (except for BASH, which is always set by the calling BASH).
23975      if test "xSETFILE" != xBASH; then
23976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23977$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23978      fi
23979      # Try to locate tool using the code snippet
23980      for ac_prog in SetFile
23981do
23982  # Extract the first word of "$ac_prog", so it can be a program name with args.
23983set dummy $ac_prog; ac_word=$2
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23985$as_echo_n "checking for $ac_word... " >&6; }
23986if ${ac_cv_path_SETFILE+:} false; then :
23987  $as_echo_n "(cached) " >&6
23988else
23989  case $SETFILE in
23990  [\\/]* | ?:[\\/]*)
23991  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23992  ;;
23993  *)
23994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24001    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009  ;;
24010esac
24011fi
24012SETFILE=$ac_cv_path_SETFILE
24013if test -n "$SETFILE"; then
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24015$as_echo "$SETFILE" >&6; }
24016else
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018$as_echo "no" >&6; }
24019fi
24020
24021
24022  test -n "$SETFILE" && break
24023done
24024
24025    else
24026      # If it succeeded, then it was overridden by the user. We will use it
24027      # for the tool.
24028
24029      # First remove it from the list of overridden variables, so we can test
24030      # for unknown variables in the end.
24031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24032
24033      # Check if we try to supply an empty value
24034      if test "x$SETFILE" = x; then
24035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24036$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24038$as_echo_n "checking for SETFILE... " >&6; }
24039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24040$as_echo "disabled" >&6; }
24041      else
24042        # Check if the provided tool contains a complete path.
24043        tool_specified="$SETFILE"
24044        tool_basename="${tool_specified##*/}"
24045        if test "x$tool_basename" = "x$tool_specified"; then
24046          # A command without a complete path is provided, search $PATH.
24047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24048$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24049          # Extract the first word of "$tool_basename", so it can be a program name with args.
24050set dummy $tool_basename; ac_word=$2
24051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24052$as_echo_n "checking for $ac_word... " >&6; }
24053if ${ac_cv_path_SETFILE+:} false; then :
24054  $as_echo_n "(cached) " >&6
24055else
24056  case $SETFILE in
24057  [\\/]* | ?:[\\/]*)
24058  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24059  ;;
24060  *)
24061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24062for as_dir in $PATH
24063do
24064  IFS=$as_save_IFS
24065  test -z "$as_dir" && as_dir=.
24066    for ac_exec_ext in '' $ac_executable_extensions; do
24067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24068    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24070    break 2
24071  fi
24072done
24073  done
24074IFS=$as_save_IFS
24075
24076  ;;
24077esac
24078fi
24079SETFILE=$ac_cv_path_SETFILE
24080if test -n "$SETFILE"; then
24081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24082$as_echo "$SETFILE" >&6; }
24083else
24084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24085$as_echo "no" >&6; }
24086fi
24087
24088
24089          if test "x$SETFILE" = x; then
24090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24091          fi
24092        else
24093          # Otherwise we believe it is a complete path. Use it as it is.
24094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24095$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24097$as_echo_n "checking for SETFILE... " >&6; }
24098          if test ! -x "$tool_specified"; then
24099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24100$as_echo "not found" >&6; }
24101            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24102          fi
24103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24104$as_echo "$tool_specified" >&6; }
24105        fi
24106      fi
24107    fi
24108
24109  fi
24110
24111
24112
24113  if test "x$SETFILE" = x; then
24114    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24115  fi
24116
24117
24118  fi
24119
24120
24121  # Test if bash supports pipefail.
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24123$as_echo_n "checking if bash supports pipefail... " >&6; }
24124  if ${BASH} -c 'set -o pipefail'; then
24125    BASH_ARGS="$BASH_ARGS -o pipefail"
24126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24127$as_echo "yes" >&6; }
24128  else
24129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24130$as_echo "no" >&6; }
24131  fi
24132
24133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24134$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24135  if ${BASH} -e -c 'true'; then
24136    BASH_ARGS="$BASH_ARGS -e"
24137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24138$as_echo "yes" >&6; }
24139  else
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24141$as_echo "no" >&6; }
24142  fi
24143
24144
24145
24146
24147# Check if pkg-config is available.
24148
24149
24150if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24151	if test -n "$ac_tool_prefix"; then
24152  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24155$as_echo_n "checking for $ac_word... " >&6; }
24156if ${ac_cv_path_PKG_CONFIG+:} false; then :
24157  $as_echo_n "(cached) " >&6
24158else
24159  case $PKG_CONFIG in
24160  [\\/]* | ?:[\\/]*)
24161  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24162  ;;
24163  *)
24164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24165for as_dir in $PATH
24166do
24167  IFS=$as_save_IFS
24168  test -z "$as_dir" && as_dir=.
24169    for ac_exec_ext in '' $ac_executable_extensions; do
24170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24171    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24173    break 2
24174  fi
24175done
24176  done
24177IFS=$as_save_IFS
24178
24179  ;;
24180esac
24181fi
24182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24183if test -n "$PKG_CONFIG"; then
24184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24185$as_echo "$PKG_CONFIG" >&6; }
24186else
24187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24188$as_echo "no" >&6; }
24189fi
24190
24191
24192fi
24193if test -z "$ac_cv_path_PKG_CONFIG"; then
24194  ac_pt_PKG_CONFIG=$PKG_CONFIG
24195  # Extract the first word of "pkg-config", so it can be a program name with args.
24196set dummy pkg-config; ac_word=$2
24197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24198$as_echo_n "checking for $ac_word... " >&6; }
24199if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24200  $as_echo_n "(cached) " >&6
24201else
24202  case $ac_pt_PKG_CONFIG in
24203  [\\/]* | ?:[\\/]*)
24204  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24205  ;;
24206  *)
24207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24208for as_dir in $PATH
24209do
24210  IFS=$as_save_IFS
24211  test -z "$as_dir" && as_dir=.
24212    for ac_exec_ext in '' $ac_executable_extensions; do
24213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24214    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24216    break 2
24217  fi
24218done
24219  done
24220IFS=$as_save_IFS
24221
24222  ;;
24223esac
24224fi
24225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24226if test -n "$ac_pt_PKG_CONFIG"; then
24227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24229else
24230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24231$as_echo "no" >&6; }
24232fi
24233
24234  if test "x$ac_pt_PKG_CONFIG" = x; then
24235    PKG_CONFIG=""
24236  else
24237    case $cross_compiling:$ac_tool_warned in
24238yes:)
24239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24241ac_tool_warned=yes ;;
24242esac
24243    PKG_CONFIG=$ac_pt_PKG_CONFIG
24244  fi
24245else
24246  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24247fi
24248
24249fi
24250if test -n "$PKG_CONFIG"; then
24251	_pkg_min_version=0.9.0
24252	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24253$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24254	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24255		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24256$as_echo "yes" >&6; }
24257	else
24258		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24259$as_echo "no" >&6; }
24260		PKG_CONFIG=""
24261	fi
24262
24263fi
24264
24265# After basic tools have been setup, we can check build os specific details.
24266
24267  ###############################################################################
24268
24269  # Note that this is the build platform OS version!
24270
24271  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24272  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24273  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24274  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24275
24276
24277
24278
24279
24280# Misc basic settings
24281
24282
24283# Check whether --with-default-make-target was given.
24284if test "${with_default_make_target+set}" = set; then :
24285  withval=$with_default_make_target;
24286fi
24287
24288  if test "x$with_default_make_target" = "x" \
24289      || test "x$with_default_make_target" = "xyes"; then
24290    DEFAULT_MAKE_TARGET="exploded-image"
24291  elif test "x$with_default_make_target" = "xno"; then
24292    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24293  else
24294    DEFAULT_MAKE_TARGET="$with_default_make_target"
24295  fi
24296
24297
24298
24299
24300###############################################################################
24301#
24302# Determine OpenJDK variants, options and version numbers.
24303#
24304###############################################################################
24305
24306# We need build & target for this.
24307
24308  # Should we build a JDK without a graphical UI?
24309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24310$as_echo_n "checking headless only... " >&6; }
24311  # Check whether --enable-headless-only was given.
24312if test "${enable_headless_only+set}" = set; then :
24313  enableval=$enable_headless_only;
24314fi
24315
24316
24317  if test "x$enable_headless_only" = "xyes"; then
24318    ENABLE_HEADLESS_ONLY="true"
24319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24320$as_echo "yes" >&6; }
24321  elif test "x$enable_headless_only" = "xno"; then
24322    ENABLE_HEADLESS_ONLY="false"
24323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24324$as_echo "no" >&6; }
24325  elif test "x$enable_headless_only" = "x"; then
24326    ENABLE_HEADLESS_ONLY="false"
24327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24328$as_echo "no" >&6; }
24329  else
24330    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24331  fi
24332
24333
24334
24335  # Choose cacerts source file
24336
24337# Check whether --with-cacerts-file was given.
24338if test "${with_cacerts_file+set}" = set; then :
24339  withval=$with_cacerts_file;
24340fi
24341
24342  if test "x$with_cacerts_file" != x; then
24343    CACERTS_FILE=$with_cacerts_file
24344  fi
24345
24346
24347  # Enable or disable unlimited crypto
24348  # Check whether --enable-unlimited-crypto was given.
24349if test "${enable_unlimited_crypto+set}" = set; then :
24350  enableval=$enable_unlimited_crypto;
24351else
24352  enable_unlimited_crypto=yes
24353fi
24354
24355  if test "x$enable_unlimited_crypto" = "xyes"; then
24356    UNLIMITED_CRYPTO=true
24357  else
24358    UNLIMITED_CRYPTO=false
24359  fi
24360
24361
24362  # Should we build the serviceability agent (SA)?
24363  INCLUDE_SA=true
24364  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24365    INCLUDE_SA=false
24366  fi
24367  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24368    INCLUDE_SA=false
24369  fi
24370
24371
24372  # Compress jars
24373  COMPRESS_JARS=false
24374
24375
24376
24377  # Setup default copyright year. Mostly overridden when building close to a new year.
24378
24379# Check whether --with-copyright-year was given.
24380if test "${with_copyright_year+set}" = set; then :
24381  withval=$with_copyright_year;
24382fi
24383
24384  if test "x$with_copyright_year" = xyes; then
24385    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24386  elif test "x$with_copyright_year" != x; then
24387    COPYRIGHT_YEAR="$with_copyright_year"
24388  else
24389    COPYRIGHT_YEAR=`$DATE +'%Y'`
24390  fi
24391
24392
24393
24394  # Check whether --enable-keep-packaged-modules was given.
24395if test "${enable_keep_packaged_modules+set}" = set; then :
24396  enableval=$enable_keep_packaged_modules;
24397fi
24398
24399
24400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24401$as_echo_n "checking if packaged modules are kept... " >&6; }
24402  if test "x$enable_keep_packaged_modules" = "xyes"; then
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24404$as_echo "yes" >&6; }
24405    JLINK_KEEP_PACKAGED_MODULES=true
24406  elif test "x$enable_keep_packaged_modules" = "xno"; then
24407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24408$as_echo "no" >&6; }
24409    JLINK_KEEP_PACKAGED_MODULES=false
24410  elif test "x$enable_keep_packaged_modules" = "x"; then
24411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24412$as_echo "yes (default)" >&6; }
24413    JLINK_KEEP_PACKAGED_MODULES=true
24414  else
24415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24416$as_echo "error" >&6; }
24417    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24418  fi
24419
24420
24421
24422
24423  # Warn user that old version arguments are deprecated.
24424
24425
24426# Check whether --with-milestone was given.
24427if test "${with_milestone+set}" = set; then :
24428  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24429$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24430fi
24431
24432
24433
24434
24435# Check whether --with-update-version was given.
24436if test "${with_update_version+set}" = set; then :
24437  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24438$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24439fi
24440
24441
24442
24443
24444# Check whether --with-user-release-suffix was given.
24445if test "${with_user_release_suffix+set}" = set; then :
24446  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
24447$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24448fi
24449
24450
24451
24452
24453# Check whether --with-build-number was given.
24454if test "${with_build_number+set}" = set; then :
24455  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24456$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24457fi
24458
24459
24460
24461  # Source the version numbers file
24462  . $AUTOCONF_DIR/version-numbers
24463
24464  # Some non-version number information is set in that file
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474  # Override version from arguments
24475
24476  # If --with-version-string is set, process it first. It is possible to
24477  # override parts with more specific flags, since these are processed later.
24478
24479# Check whether --with-version-string was given.
24480if test "${with_version_string+set}" = set; then :
24481  withval=$with_version_string;
24482fi
24483
24484  if test "x$with_version_string" = xyes; then
24485    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24486  elif test "x$with_version_string" != x; then
24487    # Additional [] needed to keep m4 from mangling shell constructs.
24488    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24489      VERSION_MAJOR=${BASH_REMATCH[1]}
24490      VERSION_MINOR=${BASH_REMATCH[3]}
24491      VERSION_SECURITY=${BASH_REMATCH[5]}
24492      VERSION_PATCH=${BASH_REMATCH[7]}
24493      VERSION_PRE=${BASH_REMATCH[9]}
24494      version_plus_separator=${BASH_REMATCH[11]}
24495      VERSION_BUILD=${BASH_REMATCH[12]}
24496      VERSION_OPT=${BASH_REMATCH[14]}
24497      # Unspecified numerical fields are interpreted as 0.
24498      if test "x$VERSION_MINOR" = x; then
24499        VERSION_MINOR=0
24500      fi
24501      if test "x$VERSION_SECURITY" = x; then
24502        VERSION_SECURITY=0
24503      fi
24504      if test "x$VERSION_PATCH" = x; then
24505        VERSION_PATCH=0
24506      fi
24507      if test "x$version_plus_separator" != x \
24508          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24509        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24510      fi
24511      # Stop the version part process from setting default values.
24512      # We still allow them to explicitly override though.
24513      NO_DEFAULT_VERSION_PARTS=true
24514    else
24515      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24516    fi
24517  fi
24518
24519
24520# Check whether --with-version-pre was given.
24521if test "${with_version_pre+set}" = set; then :
24522  withval=$with_version_pre; with_version_pre_present=true
24523else
24524  with_version_pre_present=false
24525fi
24526
24527
24528  if test "x$with_version_pre_present" = xtrue; then
24529    if test "x$with_version_pre" = xyes; then
24530      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24531    elif test "x$with_version_pre" = xno; then
24532      # Interpret --without-* as empty string instead of the literal "no"
24533      VERSION_PRE=
24534    else
24535      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24536       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24537      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24539$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24540      fi
24541    fi
24542  else
24543    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24544      # Default is to use "internal" as pre
24545      VERSION_PRE="internal"
24546    fi
24547  fi
24548
24549
24550# Check whether --with-version-opt was given.
24551if test "${with_version_opt+set}" = set; then :
24552  withval=$with_version_opt; with_version_opt_present=true
24553else
24554  with_version_opt_present=false
24555fi
24556
24557
24558  if test "x$with_version_opt_present" = xtrue; then
24559    if test "x$with_version_opt" = xyes; then
24560      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24561    elif test "x$with_version_opt" = xno; then
24562      # Interpret --without-* as empty string instead of the literal "no"
24563      VERSION_OPT=
24564    else
24565      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24566       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24567      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24569$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24570      fi
24571    fi
24572  else
24573    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24574      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24575      # Outer [ ] to quote m4.
24576       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24577      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24578    fi
24579  fi
24580
24581
24582# Check whether --with-version-build was given.
24583if test "${with_version_build+set}" = set; then :
24584  withval=$with_version_build; with_version_build_present=true
24585else
24586  with_version_build_present=false
24587fi
24588
24589
24590  if test "x$with_version_build_present" = xtrue; then
24591    if test "x$with_version_build" = xyes; then
24592      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24593    elif test "x$with_version_build" = xno; then
24594      # Interpret --without-* as empty string instead of the literal "no"
24595      VERSION_BUILD=
24596    elif test "x$with_version_build" = x; then
24597      VERSION_BUILD=
24598    else
24599
24600  # Additional [] needed to keep m4 from mangling shell constructs.
24601  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24602    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24603  fi
24604  # Extract the version number without leading zeros.
24605  cleaned_value=${BASH_REMATCH[1]}
24606  if test "x$cleaned_value" = x; then
24607    # Special case for zero
24608    cleaned_value=${BASH_REMATCH[2]}
24609  fi
24610
24611  if test $cleaned_value -gt 255; then
24612    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24613  fi
24614  if test "x$cleaned_value" != "x$with_version_build"; then
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24616$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24617  fi
24618  VERSION_BUILD=$cleaned_value
24619
24620    fi
24621  else
24622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24623      # Default is to not have a build number.
24624      VERSION_BUILD=""
24625      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24626      VERSION_BUILD=0
24627    fi
24628  fi
24629
24630
24631# Check whether --with-version-major was given.
24632if test "${with_version_major+set}" = set; then :
24633  withval=$with_version_major; with_version_major_present=true
24634else
24635  with_version_major_present=false
24636fi
24637
24638
24639  if test "x$with_version_major_present" = xtrue; then
24640    if test "x$with_version_major" = xyes; then
24641      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24642    else
24643
24644  # Additional [] needed to keep m4 from mangling shell constructs.
24645  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24646    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24647  fi
24648  # Extract the version number without leading zeros.
24649  cleaned_value=${BASH_REMATCH[1]}
24650  if test "x$cleaned_value" = x; then
24651    # Special case for zero
24652    cleaned_value=${BASH_REMATCH[2]}
24653  fi
24654
24655  if test $cleaned_value -gt 255; then
24656    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24657  fi
24658  if test "x$cleaned_value" != "x$with_version_major"; then
24659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24660$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24661  fi
24662  VERSION_MAJOR=$cleaned_value
24663
24664    fi
24665  else
24666    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24667      # Default is to get value from version-numbers
24668      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24669    fi
24670  fi
24671
24672
24673# Check whether --with-version-minor was given.
24674if test "${with_version_minor+set}" = set; then :
24675  withval=$with_version_minor; with_version_minor_present=true
24676else
24677  with_version_minor_present=false
24678fi
24679
24680
24681  if test "x$with_version_minor_present" = xtrue; then
24682    if test "x$with_version_minor" = xyes; then
24683      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24684    elif test "x$with_version_minor" = xno; then
24685      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24686      VERSION_MINOR=0
24687    elif test "x$with_version_minor" = x; then
24688      VERSION_MINOR=0
24689    else
24690
24691  # Additional [] needed to keep m4 from mangling shell constructs.
24692  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24693    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24694  fi
24695  # Extract the version number without leading zeros.
24696  cleaned_value=${BASH_REMATCH[1]}
24697  if test "x$cleaned_value" = x; then
24698    # Special case for zero
24699    cleaned_value=${BASH_REMATCH[2]}
24700  fi
24701
24702  if test $cleaned_value -gt 255; then
24703    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24704  fi
24705  if test "x$cleaned_value" != "x$with_version_minor"; then
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24707$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24708  fi
24709  VERSION_MINOR=$cleaned_value
24710
24711    fi
24712  else
24713    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24714      # Default is 0, if unspecified
24715      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24716    fi
24717  fi
24718
24719
24720# Check whether --with-version-security was given.
24721if test "${with_version_security+set}" = set; then :
24722  withval=$with_version_security; with_version_security_present=true
24723else
24724  with_version_security_present=false
24725fi
24726
24727
24728  if test "x$with_version_security_present" = xtrue; then
24729    if test "x$with_version_security" = xyes; then
24730      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24731    elif test "x$with_version_security" = xno; then
24732      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24733      VERSION_SECURITY=0
24734    elif test "x$with_version_security" = x; then
24735      VERSION_SECURITY=0
24736    else
24737
24738  # Additional [] needed to keep m4 from mangling shell constructs.
24739  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24740    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24741  fi
24742  # Extract the version number without leading zeros.
24743  cleaned_value=${BASH_REMATCH[1]}
24744  if test "x$cleaned_value" = x; then
24745    # Special case for zero
24746    cleaned_value=${BASH_REMATCH[2]}
24747  fi
24748
24749  if test $cleaned_value -gt 255; then
24750    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24751  fi
24752  if test "x$cleaned_value" != "x$with_version_security"; then
24753    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24754$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24755  fi
24756  VERSION_SECURITY=$cleaned_value
24757
24758    fi
24759  else
24760    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24761      # Default is 0, if unspecified
24762      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24763    fi
24764  fi
24765
24766
24767# Check whether --with-version-patch was given.
24768if test "${with_version_patch+set}" = set; then :
24769  withval=$with_version_patch; with_version_patch_present=true
24770else
24771  with_version_patch_present=false
24772fi
24773
24774
24775  if test "x$with_version_patch_present" = xtrue; then
24776    if test "x$with_version_patch" = xyes; then
24777      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24778    elif test "x$with_version_patch" = xno; then
24779      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24780      VERSION_PATCH=0
24781    elif test "x$with_version_patch" = x; then
24782      VERSION_PATCH=0
24783    else
24784
24785  # Additional [] needed to keep m4 from mangling shell constructs.
24786  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24787    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24788  fi
24789  # Extract the version number without leading zeros.
24790  cleaned_value=${BASH_REMATCH[1]}
24791  if test "x$cleaned_value" = x; then
24792    # Special case for zero
24793    cleaned_value=${BASH_REMATCH[2]}
24794  fi
24795
24796  if test $cleaned_value -gt 255; then
24797    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24798  fi
24799  if test "x$cleaned_value" != "x$with_version_patch"; then
24800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24801$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24802  fi
24803  VERSION_PATCH=$cleaned_value
24804
24805    fi
24806  else
24807    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24808      # Default is 0, if unspecified
24809      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24810    fi
24811  fi
24812
24813  # Calculate derived version properties
24814
24815  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24816  if test "x$VERSION_PRE" = x; then
24817    VERSION_IS_GA=true
24818  else
24819    VERSION_IS_GA=false
24820  fi
24821
24822  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24823  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24824
24825  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24826  # Strip trailing zeroes from stripped_version_number
24827  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24828  VERSION_NUMBER=$stripped_version_number
24829
24830  # The complete version string, with additional build information
24831  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24832    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24833  else
24834    # If either build or opt is set, we need a + separator
24835    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24836  fi
24837
24838  # The short version string, just VERSION_NUMBER and PRE, if present.
24839  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24840
24841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24842$as_echo_n "checking for version string... " >&6; }
24843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24844$as_echo "$VERSION_STRING" >&6; }
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860###############################################################################
24861#
24862# Setup BootJDK, used to bootstrap the build.
24863#
24864###############################################################################
24865
24866
24867  BOOT_JDK_FOUND=no
24868
24869# Check whether --with-boot-jdk was given.
24870if test "${with_boot_jdk+set}" = set; then :
24871  withval=$with_boot_jdk;
24872fi
24873
24874
24875  # We look for the Boot JDK through various means, going from more certain to
24876  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24877  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24878  # must check if this is indeed valid; otherwise we'll continue looking.
24879
24880  # Test: Is bootjdk explicitly set by command line arguments?
24881
24882  if test "x$BOOT_JDK_FOUND" = xno; then
24883    # Now execute the test
24884
24885  if test "x$with_boot_jdk" != x; then
24886    BOOT_JDK=$with_boot_jdk
24887    BOOT_JDK_FOUND=maybe
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24889$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24890  fi
24891
24892
24893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24895      # Do we have a bin/java?
24896      if test ! -x "$BOOT_JDK/bin/java"; then
24897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24899        BOOT_JDK_FOUND=no
24900      else
24901        # Do we have a bin/javac?
24902        if test ! -x "$BOOT_JDK/bin/javac"; then
24903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24907          BOOT_JDK_FOUND=no
24908        else
24909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24911
24912          # Extra M4 quote needed to protect [] in grep expression.
24913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24914          if test "x$FOUND_CORRECT_VERSION" = x; then
24915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24919            BOOT_JDK_FOUND=no
24920          else
24921            # We're done! :-)
24922            BOOT_JDK_FOUND=yes
24923
24924  # Only process if variable expands to non-empty
24925
24926  if test "x$BOOT_JDK" != x; then
24927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24928
24929  # Input might be given as Windows format, start by converting to
24930  # unix format.
24931  path="$BOOT_JDK"
24932  new_path=`$CYGPATH -u "$path"`
24933
24934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24937  # "foo.exe" is OK but "foo" is an error.
24938  #
24939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24940  # It is also a way to make sure we got the proper file name for the real test later on.
24941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24942  if test "x$test_shortpath" = x; then
24943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24946  fi
24947
24948  # Call helper function which possibly converts this using DOS-style short mode.
24949  # If so, the updated path is stored in $new_path.
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24962      # Going to short mode and back again did indeed matter. Since short mode is
24963      # case insensitive, let's make it lowercase to improve readability.
24964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24965      # Now convert it back to Unix-style (cygpath)
24966      input_path=`$CYGPATH -u "$shortmode_path"`
24967      new_path="$input_path"
24968    fi
24969  fi
24970
24971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24972  if test "x$test_cygdrive_prefix" = x; then
24973    # As a simple fix, exclude /usr/bin since it's not a real path.
24974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24976      # a path prefixed by /cygdrive for fixpath to work.
24977      new_path="$CYGWIN_ROOT_PATH$input_path"
24978    fi
24979  fi
24980
24981
24982  if test "x$path" != "x$new_path"; then
24983    BOOT_JDK="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24986  fi
24987
24988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24989
24990  path="$BOOT_JDK"
24991  has_colon=`$ECHO $path | $GREP ^.:`
24992  new_path="$path"
24993  if test "x$has_colon" = x; then
24994    # Not in mixed or Windows style, start by that.
24995    new_path=`cmd //c echo $path`
24996  fi
24997
24998
24999  input_path="$new_path"
25000  # Check if we need to convert this using DOS-style short mode. If the path
25001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25002  # take no chances and rewrite it.
25003  # Note: m4 eats our [], so we need to use [ and ] instead.
25004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25005  if test "x$has_forbidden_chars" != x; then
25006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25008  fi
25009
25010
25011  windows_path="$new_path"
25012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013    unix_path=`$CYGPATH -u "$windows_path"`
25014    new_path="$unix_path"
25015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25017    new_path="$unix_path"
25018  fi
25019
25020  if test "x$path" != "x$new_path"; then
25021    BOOT_JDK="$new_path"
25022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25024  fi
25025
25026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25028
25029    else
25030      # We're on a unix platform. Hooray! :)
25031      path="$BOOT_JDK"
25032      has_space=`$ECHO "$path" | $GREP " "`
25033      if test "x$has_space" != x; then
25034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25037      fi
25038
25039      # Use eval to expand a potential ~
25040      eval path="$path"
25041      if test ! -f "$path" && test ! -d "$path"; then
25042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25043      fi
25044
25045      if test -d "$path"; then
25046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25047      else
25048        dir="`$DIRNAME "$path"`"
25049        base="`$BASENAME "$path"`"
25050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25051      fi
25052    fi
25053  fi
25054
25055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25056$as_echo_n "checking for Boot JDK... " >&6; }
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25058$as_echo "$BOOT_JDK" >&6; }
25059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25060$as_echo_n "checking Boot JDK version... " >&6; }
25061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25063$as_echo "$BOOT_JDK_VERSION" >&6; }
25064          fi # end check jdk version
25065        fi # end check javac
25066      fi # end check java
25067    fi # end check boot jdk found
25068  fi
25069
25070  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25071    # Having specified an argument which is incorrect will produce an instant failure;
25072    # we should not go on looking
25073    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25074  fi
25075
25076  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25077
25078  if test "x$BOOT_JDK_FOUND" = xno; then
25079    # Now execute the test
25080
25081  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25082    # First check at user selected default
25083
25084  if test "x$BOOT_JDK_FOUND" = xno; then
25085    # Now execute the test
25086
25087  if test -x /usr/libexec/java_home; then
25088    BOOT_JDK=`/usr/libexec/java_home `
25089    BOOT_JDK_FOUND=maybe
25090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25091$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25092  fi
25093
25094
25095    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25096    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25097      # Do we have a bin/java?
25098      if test ! -x "$BOOT_JDK/bin/java"; then
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25101        BOOT_JDK_FOUND=no
25102      else
25103        # Do we have a bin/javac?
25104        if test ! -x "$BOOT_JDK/bin/javac"; then
25105          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25107          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25108$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25109          BOOT_JDK_FOUND=no
25110        else
25111          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25112          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25113
25114          # Extra M4 quote needed to protect [] in grep expression.
25115          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25116          if test "x$FOUND_CORRECT_VERSION" = x; then
25117            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25119            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25120$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25121            BOOT_JDK_FOUND=no
25122          else
25123            # We're done! :-)
25124            BOOT_JDK_FOUND=yes
25125
25126  # Only process if variable expands to non-empty
25127
25128  if test "x$BOOT_JDK" != x; then
25129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25130
25131  # Input might be given as Windows format, start by converting to
25132  # unix format.
25133  path="$BOOT_JDK"
25134  new_path=`$CYGPATH -u "$path"`
25135
25136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25139  # "foo.exe" is OK but "foo" is an error.
25140  #
25141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25142  # It is also a way to make sure we got the proper file name for the real test later on.
25143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25144  if test "x$test_shortpath" = x; then
25145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25146$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25147    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25148  fi
25149
25150  # Call helper function which possibly converts this using DOS-style short mode.
25151  # If so, the updated path is stored in $new_path.
25152
25153  input_path="$new_path"
25154  # Check if we need to convert this using DOS-style short mode. If the path
25155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25156  # take no chances and rewrite it.
25157  # Note: m4 eats our [], so we need to use [ and ] instead.
25158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25159  if test "x$has_forbidden_chars" != x; then
25160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25164      # Going to short mode and back again did indeed matter. Since short mode is
25165      # case insensitive, let's make it lowercase to improve readability.
25166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25167      # Now convert it back to Unix-style (cygpath)
25168      input_path=`$CYGPATH -u "$shortmode_path"`
25169      new_path="$input_path"
25170    fi
25171  fi
25172
25173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25174  if test "x$test_cygdrive_prefix" = x; then
25175    # As a simple fix, exclude /usr/bin since it's not a real path.
25176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25178      # a path prefixed by /cygdrive for fixpath to work.
25179      new_path="$CYGWIN_ROOT_PATH$input_path"
25180    fi
25181  fi
25182
25183
25184  if test "x$path" != "x$new_path"; then
25185    BOOT_JDK="$new_path"
25186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25187$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25188  fi
25189
25190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25191
25192  path="$BOOT_JDK"
25193  has_colon=`$ECHO $path | $GREP ^.:`
25194  new_path="$path"
25195  if test "x$has_colon" = x; then
25196    # Not in mixed or Windows style, start by that.
25197    new_path=`cmd //c echo $path`
25198  fi
25199
25200
25201  input_path="$new_path"
25202  # Check if we need to convert this using DOS-style short mode. If the path
25203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25204  # take no chances and rewrite it.
25205  # Note: m4 eats our [], so we need to use [ and ] instead.
25206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25207  if test "x$has_forbidden_chars" != x; then
25208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25210  fi
25211
25212
25213  windows_path="$new_path"
25214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25215    unix_path=`$CYGPATH -u "$windows_path"`
25216    new_path="$unix_path"
25217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25219    new_path="$unix_path"
25220  fi
25221
25222  if test "x$path" != "x$new_path"; then
25223    BOOT_JDK="$new_path"
25224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25225$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25226  fi
25227
25228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25230
25231    else
25232      # We're on a unix platform. Hooray! :)
25233      path="$BOOT_JDK"
25234      has_space=`$ECHO "$path" | $GREP " "`
25235      if test "x$has_space" != x; then
25236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25239      fi
25240
25241      # Use eval to expand a potential ~
25242      eval path="$path"
25243      if test ! -f "$path" && test ! -d "$path"; then
25244        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25245      fi
25246
25247      if test -d "$path"; then
25248        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25249      else
25250        dir="`$DIRNAME "$path"`"
25251        base="`$BASENAME "$path"`"
25252        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25253      fi
25254    fi
25255  fi
25256
25257            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25258$as_echo_n "checking for Boot JDK... " >&6; }
25259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25260$as_echo "$BOOT_JDK" >&6; }
25261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25262$as_echo_n "checking Boot JDK version... " >&6; }
25263            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25265$as_echo "$BOOT_JDK_VERSION" >&6; }
25266          fi # end check jdk version
25267        fi # end check javac
25268      fi # end check java
25269    fi # end check boot jdk found
25270  fi
25271
25272    # If that did not work out (e.g. too old), try explicit versions instead
25273
25274  if test "x$BOOT_JDK_FOUND" = xno; then
25275    # Now execute the test
25276
25277  if test -x /usr/libexec/java_home; then
25278    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25279    BOOT_JDK_FOUND=maybe
25280    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25281$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25282  fi
25283
25284
25285    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25286    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25287      # Do we have a bin/java?
25288      if test ! -x "$BOOT_JDK/bin/java"; then
25289        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25291        BOOT_JDK_FOUND=no
25292      else
25293        # Do we have a bin/javac?
25294        if test ! -x "$BOOT_JDK/bin/javac"; then
25295          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25297          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25298$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25299          BOOT_JDK_FOUND=no
25300        else
25301          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25302          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25303
25304          # Extra M4 quote needed to protect [] in grep expression.
25305          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25306          if test "x$FOUND_CORRECT_VERSION" = x; then
25307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25309            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25310$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25311            BOOT_JDK_FOUND=no
25312          else
25313            # We're done! :-)
25314            BOOT_JDK_FOUND=yes
25315
25316  # Only process if variable expands to non-empty
25317
25318  if test "x$BOOT_JDK" != x; then
25319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25320
25321  # Input might be given as Windows format, start by converting to
25322  # unix format.
25323  path="$BOOT_JDK"
25324  new_path=`$CYGPATH -u "$path"`
25325
25326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25329  # "foo.exe" is OK but "foo" is an error.
25330  #
25331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25332  # It is also a way to make sure we got the proper file name for the real test later on.
25333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25334  if test "x$test_shortpath" = x; then
25335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25337    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25338  fi
25339
25340  # Call helper function which possibly converts this using DOS-style short mode.
25341  # If so, the updated path is stored in $new_path.
25342
25343  input_path="$new_path"
25344  # Check if we need to convert this using DOS-style short mode. If the path
25345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25346  # take no chances and rewrite it.
25347  # Note: m4 eats our [], so we need to use [ and ] instead.
25348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25349  if test "x$has_forbidden_chars" != x; then
25350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25354      # Going to short mode and back again did indeed matter. Since short mode is
25355      # case insensitive, let's make it lowercase to improve readability.
25356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25357      # Now convert it back to Unix-style (cygpath)
25358      input_path=`$CYGPATH -u "$shortmode_path"`
25359      new_path="$input_path"
25360    fi
25361  fi
25362
25363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25364  if test "x$test_cygdrive_prefix" = x; then
25365    # As a simple fix, exclude /usr/bin since it's not a real path.
25366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25368      # a path prefixed by /cygdrive for fixpath to work.
25369      new_path="$CYGWIN_ROOT_PATH$input_path"
25370    fi
25371  fi
25372
25373
25374  if test "x$path" != "x$new_path"; then
25375    BOOT_JDK="$new_path"
25376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25378  fi
25379
25380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381
25382  path="$BOOT_JDK"
25383  has_colon=`$ECHO $path | $GREP ^.:`
25384  new_path="$path"
25385  if test "x$has_colon" = x; then
25386    # Not in mixed or Windows style, start by that.
25387    new_path=`cmd //c echo $path`
25388  fi
25389
25390
25391  input_path="$new_path"
25392  # Check if we need to convert this using DOS-style short mode. If the path
25393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25394  # take no chances and rewrite it.
25395  # Note: m4 eats our [], so we need to use [ and ] instead.
25396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25397  if test "x$has_forbidden_chars" != x; then
25398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25400  fi
25401
25402
25403  windows_path="$new_path"
25404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405    unix_path=`$CYGPATH -u "$windows_path"`
25406    new_path="$unix_path"
25407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25409    new_path="$unix_path"
25410  fi
25411
25412  if test "x$path" != "x$new_path"; then
25413    BOOT_JDK="$new_path"
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25416  fi
25417
25418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25420
25421    else
25422      # We're on a unix platform. Hooray! :)
25423      path="$BOOT_JDK"
25424      has_space=`$ECHO "$path" | $GREP " "`
25425      if test "x$has_space" != x; then
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25429      fi
25430
25431      # Use eval to expand a potential ~
25432      eval path="$path"
25433      if test ! -f "$path" && test ! -d "$path"; then
25434        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25435      fi
25436
25437      if test -d "$path"; then
25438        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25439      else
25440        dir="`$DIRNAME "$path"`"
25441        base="`$BASENAME "$path"`"
25442        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25443      fi
25444    fi
25445  fi
25446
25447            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25448$as_echo_n "checking for Boot JDK... " >&6; }
25449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25450$as_echo "$BOOT_JDK" >&6; }
25451            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25452$as_echo_n "checking Boot JDK version... " >&6; }
25453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25455$as_echo "$BOOT_JDK_VERSION" >&6; }
25456          fi # end check jdk version
25457        fi # end check javac
25458      fi # end check java
25459    fi # end check boot jdk found
25460  fi
25461
25462
25463  if test "x$BOOT_JDK_FOUND" = xno; then
25464    # Now execute the test
25465
25466  if test -x /usr/libexec/java_home; then
25467    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25468    BOOT_JDK_FOUND=maybe
25469    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25470$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25471  fi
25472
25473
25474    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25475    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25476      # Do we have a bin/java?
25477      if test ! -x "$BOOT_JDK/bin/java"; then
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25480        BOOT_JDK_FOUND=no
25481      else
25482        # Do we have a bin/javac?
25483        if test ! -x "$BOOT_JDK/bin/javac"; then
25484          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25486          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25487$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25488          BOOT_JDK_FOUND=no
25489        else
25490          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25491          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25492
25493          # Extra M4 quote needed to protect [] in grep expression.
25494          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25495          if test "x$FOUND_CORRECT_VERSION" = x; then
25496            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25498            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25499$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25500            BOOT_JDK_FOUND=no
25501          else
25502            # We're done! :-)
25503            BOOT_JDK_FOUND=yes
25504
25505  # Only process if variable expands to non-empty
25506
25507  if test "x$BOOT_JDK" != x; then
25508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25509
25510  # Input might be given as Windows format, start by converting to
25511  # unix format.
25512  path="$BOOT_JDK"
25513  new_path=`$CYGPATH -u "$path"`
25514
25515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25518  # "foo.exe" is OK but "foo" is an error.
25519  #
25520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25521  # It is also a way to make sure we got the proper file name for the real test later on.
25522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25523  if test "x$test_shortpath" = x; then
25524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25526    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25527  fi
25528
25529  # Call helper function which possibly converts this using DOS-style short mode.
25530  # If so, the updated path is stored in $new_path.
25531
25532  input_path="$new_path"
25533  # Check if we need to convert this using DOS-style short mode. If the path
25534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25535  # take no chances and rewrite it.
25536  # Note: m4 eats our [], so we need to use [ and ] instead.
25537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25538  if test "x$has_forbidden_chars" != x; then
25539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25543      # Going to short mode and back again did indeed matter. Since short mode is
25544      # case insensitive, let's make it lowercase to improve readability.
25545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25546      # Now convert it back to Unix-style (cygpath)
25547      input_path=`$CYGPATH -u "$shortmode_path"`
25548      new_path="$input_path"
25549    fi
25550  fi
25551
25552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25553  if test "x$test_cygdrive_prefix" = x; then
25554    # As a simple fix, exclude /usr/bin since it's not a real path.
25555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25557      # a path prefixed by /cygdrive for fixpath to work.
25558      new_path="$CYGWIN_ROOT_PATH$input_path"
25559    fi
25560  fi
25561
25562
25563  if test "x$path" != "x$new_path"; then
25564    BOOT_JDK="$new_path"
25565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25567  fi
25568
25569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25570
25571  path="$BOOT_JDK"
25572  has_colon=`$ECHO $path | $GREP ^.:`
25573  new_path="$path"
25574  if test "x$has_colon" = x; then
25575    # Not in mixed or Windows style, start by that.
25576    new_path=`cmd //c echo $path`
25577  fi
25578
25579
25580  input_path="$new_path"
25581  # Check if we need to convert this using DOS-style short mode. If the path
25582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25583  # take no chances and rewrite it.
25584  # Note: m4 eats our [], so we need to use [ and ] instead.
25585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25586  if test "x$has_forbidden_chars" != x; then
25587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25589  fi
25590
25591
25592  windows_path="$new_path"
25593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25594    unix_path=`$CYGPATH -u "$windows_path"`
25595    new_path="$unix_path"
25596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25598    new_path="$unix_path"
25599  fi
25600
25601  if test "x$path" != "x$new_path"; then
25602    BOOT_JDK="$new_path"
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25605  fi
25606
25607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25609
25610    else
25611      # We're on a unix platform. Hooray! :)
25612      path="$BOOT_JDK"
25613      has_space=`$ECHO "$path" | $GREP " "`
25614      if test "x$has_space" != x; then
25615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25618      fi
25619
25620      # Use eval to expand a potential ~
25621      eval path="$path"
25622      if test ! -f "$path" && test ! -d "$path"; then
25623        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25624      fi
25625
25626      if test -d "$path"; then
25627        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25628      else
25629        dir="`$DIRNAME "$path"`"
25630        base="`$BASENAME "$path"`"
25631        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25632      fi
25633    fi
25634  fi
25635
25636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25637$as_echo_n "checking for Boot JDK... " >&6; }
25638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25639$as_echo "$BOOT_JDK" >&6; }
25640            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25641$as_echo_n "checking Boot JDK version... " >&6; }
25642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25644$as_echo "$BOOT_JDK_VERSION" >&6; }
25645          fi # end check jdk version
25646        fi # end check javac
25647      fi # end check java
25648    fi # end check boot jdk found
25649  fi
25650
25651
25652  if test "x$BOOT_JDK_FOUND" = xno; then
25653    # Now execute the test
25654
25655  if test -x /usr/libexec/java_home; then
25656    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25657    BOOT_JDK_FOUND=maybe
25658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25659$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25660  fi
25661
25662
25663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25665      # Do we have a bin/java?
25666      if test ! -x "$BOOT_JDK/bin/java"; then
25667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25669        BOOT_JDK_FOUND=no
25670      else
25671        # Do we have a bin/javac?
25672        if test ! -x "$BOOT_JDK/bin/javac"; then
25673          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25675          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25677          BOOT_JDK_FOUND=no
25678        else
25679          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25680          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25681
25682          # Extra M4 quote needed to protect [] in grep expression.
25683          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25684          if test "x$FOUND_CORRECT_VERSION" = x; then
25685            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25687            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25688$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25689            BOOT_JDK_FOUND=no
25690          else
25691            # We're done! :-)
25692            BOOT_JDK_FOUND=yes
25693
25694  # Only process if variable expands to non-empty
25695
25696  if test "x$BOOT_JDK" != x; then
25697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25698
25699  # Input might be given as Windows format, start by converting to
25700  # unix format.
25701  path="$BOOT_JDK"
25702  new_path=`$CYGPATH -u "$path"`
25703
25704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25707  # "foo.exe" is OK but "foo" is an error.
25708  #
25709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25710  # It is also a way to make sure we got the proper file name for the real test later on.
25711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25712  if test "x$test_shortpath" = x; then
25713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25716  fi
25717
25718  # Call helper function which possibly converts this using DOS-style short mode.
25719  # If so, the updated path is stored in $new_path.
25720
25721  input_path="$new_path"
25722  # Check if we need to convert this using DOS-style short mode. If the path
25723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25724  # take no chances and rewrite it.
25725  # Note: m4 eats our [], so we need to use [ and ] instead.
25726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25727  if test "x$has_forbidden_chars" != x; then
25728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25732      # Going to short mode and back again did indeed matter. Since short mode is
25733      # case insensitive, let's make it lowercase to improve readability.
25734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25735      # Now convert it back to Unix-style (cygpath)
25736      input_path=`$CYGPATH -u "$shortmode_path"`
25737      new_path="$input_path"
25738    fi
25739  fi
25740
25741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25742  if test "x$test_cygdrive_prefix" = x; then
25743    # As a simple fix, exclude /usr/bin since it's not a real path.
25744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25746      # a path prefixed by /cygdrive for fixpath to work.
25747      new_path="$CYGWIN_ROOT_PATH$input_path"
25748    fi
25749  fi
25750
25751
25752  if test "x$path" != "x$new_path"; then
25753    BOOT_JDK="$new_path"
25754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25756  fi
25757
25758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25759
25760  path="$BOOT_JDK"
25761  has_colon=`$ECHO $path | $GREP ^.:`
25762  new_path="$path"
25763  if test "x$has_colon" = x; then
25764    # Not in mixed or Windows style, start by that.
25765    new_path=`cmd //c echo $path`
25766  fi
25767
25768
25769  input_path="$new_path"
25770  # Check if we need to convert this using DOS-style short mode. If the path
25771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25772  # take no chances and rewrite it.
25773  # Note: m4 eats our [], so we need to use [ and ] instead.
25774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25775  if test "x$has_forbidden_chars" != x; then
25776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25778  fi
25779
25780
25781  windows_path="$new_path"
25782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25783    unix_path=`$CYGPATH -u "$windows_path"`
25784    new_path="$unix_path"
25785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25787    new_path="$unix_path"
25788  fi
25789
25790  if test "x$path" != "x$new_path"; then
25791    BOOT_JDK="$new_path"
25792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25794  fi
25795
25796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25798
25799    else
25800      # We're on a unix platform. Hooray! :)
25801      path="$BOOT_JDK"
25802      has_space=`$ECHO "$path" | $GREP " "`
25803      if test "x$has_space" != x; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25806        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25807      fi
25808
25809      # Use eval to expand a potential ~
25810      eval path="$path"
25811      if test ! -f "$path" && test ! -d "$path"; then
25812        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25813      fi
25814
25815      if test -d "$path"; then
25816        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25817      else
25818        dir="`$DIRNAME "$path"`"
25819        base="`$BASENAME "$path"`"
25820        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25821      fi
25822    fi
25823  fi
25824
25825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25826$as_echo_n "checking for Boot JDK... " >&6; }
25827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25828$as_echo "$BOOT_JDK" >&6; }
25829            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25830$as_echo_n "checking Boot JDK version... " >&6; }
25831            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25833$as_echo "$BOOT_JDK_VERSION" >&6; }
25834          fi # end check jdk version
25835        fi # end check javac
25836      fi # end check java
25837    fi # end check boot jdk found
25838  fi
25839
25840  fi
25841
25842
25843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25845      # Do we have a bin/java?
25846      if test ! -x "$BOOT_JDK/bin/java"; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25849        BOOT_JDK_FOUND=no
25850      else
25851        # Do we have a bin/javac?
25852        if test ! -x "$BOOT_JDK/bin/javac"; then
25853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25857          BOOT_JDK_FOUND=no
25858        else
25859          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25860          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25861
25862          # Extra M4 quote needed to protect [] in grep expression.
25863          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25864          if test "x$FOUND_CORRECT_VERSION" = x; then
25865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25867            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25869            BOOT_JDK_FOUND=no
25870          else
25871            # We're done! :-)
25872            BOOT_JDK_FOUND=yes
25873
25874  # Only process if variable expands to non-empty
25875
25876  if test "x$BOOT_JDK" != x; then
25877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878
25879  # Input might be given as Windows format, start by converting to
25880  # unix format.
25881  path="$BOOT_JDK"
25882  new_path=`$CYGPATH -u "$path"`
25883
25884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25887  # "foo.exe" is OK but "foo" is an error.
25888  #
25889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25890  # It is also a way to make sure we got the proper file name for the real test later on.
25891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25892  if test "x$test_shortpath" = x; then
25893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25896  fi
25897
25898  # Call helper function which possibly converts this using DOS-style short mode.
25899  # If so, the updated path is stored in $new_path.
25900
25901  input_path="$new_path"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25912      # Going to short mode and back again did indeed matter. Since short mode is
25913      # case insensitive, let's make it lowercase to improve readability.
25914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25915      # Now convert it back to Unix-style (cygpath)
25916      input_path=`$CYGPATH -u "$shortmode_path"`
25917      new_path="$input_path"
25918    fi
25919  fi
25920
25921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25922  if test "x$test_cygdrive_prefix" = x; then
25923    # As a simple fix, exclude /usr/bin since it's not a real path.
25924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25926      # a path prefixed by /cygdrive for fixpath to work.
25927      new_path="$CYGWIN_ROOT_PATH$input_path"
25928    fi
25929  fi
25930
25931
25932  if test "x$path" != "x$new_path"; then
25933    BOOT_JDK="$new_path"
25934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25936  fi
25937
25938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25939
25940  path="$BOOT_JDK"
25941  has_colon=`$ECHO $path | $GREP ^.:`
25942  new_path="$path"
25943  if test "x$has_colon" = x; then
25944    # Not in mixed or Windows style, start by that.
25945    new_path=`cmd //c echo $path`
25946  fi
25947
25948
25949  input_path="$new_path"
25950  # Check if we need to convert this using DOS-style short mode. If the path
25951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25952  # take no chances and rewrite it.
25953  # Note: m4 eats our [], so we need to use [ and ] instead.
25954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25955  if test "x$has_forbidden_chars" != x; then
25956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25958  fi
25959
25960
25961  windows_path="$new_path"
25962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963    unix_path=`$CYGPATH -u "$windows_path"`
25964    new_path="$unix_path"
25965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25967    new_path="$unix_path"
25968  fi
25969
25970  if test "x$path" != "x$new_path"; then
25971    BOOT_JDK="$new_path"
25972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25974  fi
25975
25976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25978
25979    else
25980      # We're on a unix platform. Hooray! :)
25981      path="$BOOT_JDK"
25982      has_space=`$ECHO "$path" | $GREP " "`
25983      if test "x$has_space" != x; then
25984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25987      fi
25988
25989      # Use eval to expand a potential ~
25990      eval path="$path"
25991      if test ! -f "$path" && test ! -d "$path"; then
25992        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25993      fi
25994
25995      if test -d "$path"; then
25996        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25997      else
25998        dir="`$DIRNAME "$path"`"
25999        base="`$BASENAME "$path"`"
26000        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26001      fi
26002    fi
26003  fi
26004
26005            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26006$as_echo_n "checking for Boot JDK... " >&6; }
26007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26008$as_echo "$BOOT_JDK" >&6; }
26009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26010$as_echo_n "checking Boot JDK version... " >&6; }
26011            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26013$as_echo "$BOOT_JDK_VERSION" >&6; }
26014          fi # end check jdk version
26015        fi # end check javac
26016      fi # end check java
26017    fi # end check boot jdk found
26018  fi
26019
26020
26021  # Test: Is $JAVA_HOME set?
26022
26023  if test "x$BOOT_JDK_FOUND" = xno; then
26024    # Now execute the test
26025
26026  if test "x$JAVA_HOME" != x; then
26027    JAVA_HOME_PROCESSED="$JAVA_HOME"
26028
26029  # Only process if variable expands to non-empty
26030
26031  if test "x$JAVA_HOME_PROCESSED" != x; then
26032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26033
26034  # Input might be given as Windows format, start by converting to
26035  # unix format.
26036  path="$JAVA_HOME_PROCESSED"
26037  new_path=`$CYGPATH -u "$path"`
26038
26039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26042  # "foo.exe" is OK but "foo" is an error.
26043  #
26044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26045  # It is also a way to make sure we got the proper file name for the real test later on.
26046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26047  if test "x$test_shortpath" = x; then
26048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26049$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26050    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26051  fi
26052
26053  # Call helper function which possibly converts this using DOS-style short mode.
26054  # If so, the updated path is stored in $new_path.
26055
26056  input_path="$new_path"
26057  # Check if we need to convert this using DOS-style short mode. If the path
26058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26059  # take no chances and rewrite it.
26060  # Note: m4 eats our [], so we need to use [ and ] instead.
26061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26062  if test "x$has_forbidden_chars" != x; then
26063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26067      # Going to short mode and back again did indeed matter. Since short mode is
26068      # case insensitive, let's make it lowercase to improve readability.
26069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26070      # Now convert it back to Unix-style (cygpath)
26071      input_path=`$CYGPATH -u "$shortmode_path"`
26072      new_path="$input_path"
26073    fi
26074  fi
26075
26076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26077  if test "x$test_cygdrive_prefix" = x; then
26078    # As a simple fix, exclude /usr/bin since it's not a real path.
26079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26081      # a path prefixed by /cygdrive for fixpath to work.
26082      new_path="$CYGWIN_ROOT_PATH$input_path"
26083    fi
26084  fi
26085
26086
26087  if test "x$path" != "x$new_path"; then
26088    JAVA_HOME_PROCESSED="$new_path"
26089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26090$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26091  fi
26092
26093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26094
26095  path="$JAVA_HOME_PROCESSED"
26096  has_colon=`$ECHO $path | $GREP ^.:`
26097  new_path="$path"
26098  if test "x$has_colon" = x; then
26099    # Not in mixed or Windows style, start by that.
26100    new_path=`cmd //c echo $path`
26101  fi
26102
26103
26104  input_path="$new_path"
26105  # Check if we need to convert this using DOS-style short mode. If the path
26106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26107  # take no chances and rewrite it.
26108  # Note: m4 eats our [], so we need to use [ and ] instead.
26109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26110  if test "x$has_forbidden_chars" != x; then
26111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26113  fi
26114
26115
26116  windows_path="$new_path"
26117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26118    unix_path=`$CYGPATH -u "$windows_path"`
26119    new_path="$unix_path"
26120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26122    new_path="$unix_path"
26123  fi
26124
26125  if test "x$path" != "x$new_path"; then
26126    JAVA_HOME_PROCESSED="$new_path"
26127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26128$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26129  fi
26130
26131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26133
26134    else
26135      # We're on a unix platform. Hooray! :)
26136      path="$JAVA_HOME_PROCESSED"
26137      has_space=`$ECHO "$path" | $GREP " "`
26138      if test "x$has_space" != x; then
26139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26140$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26142      fi
26143
26144      # Use eval to expand a potential ~
26145      eval path="$path"
26146      if test ! -f "$path" && test ! -d "$path"; then
26147        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26148      fi
26149
26150      if test -d "$path"; then
26151        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26152      else
26153        dir="`$DIRNAME "$path"`"
26154        base="`$BASENAME "$path"`"
26155        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26156      fi
26157    fi
26158  fi
26159
26160    if test ! -d "$JAVA_HOME_PROCESSED"; then
26161      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26162$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26163    else
26164      # Aha, the user has set a JAVA_HOME
26165      # let us use that as the Boot JDK.
26166      BOOT_JDK="$JAVA_HOME_PROCESSED"
26167      BOOT_JDK_FOUND=maybe
26168      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26169$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26170    fi
26171  fi
26172
26173
26174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26176      # Do we have a bin/java?
26177      if test ! -x "$BOOT_JDK/bin/java"; then
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26180        BOOT_JDK_FOUND=no
26181      else
26182        # Do we have a bin/javac?
26183        if test ! -x "$BOOT_JDK/bin/javac"; then
26184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26188          BOOT_JDK_FOUND=no
26189        else
26190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26192
26193          # Extra M4 quote needed to protect [] in grep expression.
26194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26195          if test "x$FOUND_CORRECT_VERSION" = x; then
26196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26200            BOOT_JDK_FOUND=no
26201          else
26202            # We're done! :-)
26203            BOOT_JDK_FOUND=yes
26204
26205  # Only process if variable expands to non-empty
26206
26207  if test "x$BOOT_JDK" != x; then
26208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209
26210  # Input might be given as Windows format, start by converting to
26211  # unix format.
26212  path="$BOOT_JDK"
26213  new_path=`$CYGPATH -u "$path"`
26214
26215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26218  # "foo.exe" is OK but "foo" is an error.
26219  #
26220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26221  # It is also a way to make sure we got the proper file name for the real test later on.
26222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26223  if test "x$test_shortpath" = x; then
26224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26227  fi
26228
26229  # Call helper function which possibly converts this using DOS-style short mode.
26230  # If so, the updated path is stored in $new_path.
26231
26232  input_path="$new_path"
26233  # Check if we need to convert this using DOS-style short mode. If the path
26234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26235  # take no chances and rewrite it.
26236  # Note: m4 eats our [], so we need to use [ and ] instead.
26237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26238  if test "x$has_forbidden_chars" != x; then
26239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26243      # Going to short mode and back again did indeed matter. Since short mode is
26244      # case insensitive, let's make it lowercase to improve readability.
26245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26246      # Now convert it back to Unix-style (cygpath)
26247      input_path=`$CYGPATH -u "$shortmode_path"`
26248      new_path="$input_path"
26249    fi
26250  fi
26251
26252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26253  if test "x$test_cygdrive_prefix" = x; then
26254    # As a simple fix, exclude /usr/bin since it's not a real path.
26255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26257      # a path prefixed by /cygdrive for fixpath to work.
26258      new_path="$CYGWIN_ROOT_PATH$input_path"
26259    fi
26260  fi
26261
26262
26263  if test "x$path" != "x$new_path"; then
26264    BOOT_JDK="$new_path"
26265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26267  fi
26268
26269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26270
26271  path="$BOOT_JDK"
26272  has_colon=`$ECHO $path | $GREP ^.:`
26273  new_path="$path"
26274  if test "x$has_colon" = x; then
26275    # Not in mixed or Windows style, start by that.
26276    new_path=`cmd //c echo $path`
26277  fi
26278
26279
26280  input_path="$new_path"
26281  # Check if we need to convert this using DOS-style short mode. If the path
26282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26283  # take no chances and rewrite it.
26284  # Note: m4 eats our [], so we need to use [ and ] instead.
26285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26286  if test "x$has_forbidden_chars" != x; then
26287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26289  fi
26290
26291
26292  windows_path="$new_path"
26293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26294    unix_path=`$CYGPATH -u "$windows_path"`
26295    new_path="$unix_path"
26296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26298    new_path="$unix_path"
26299  fi
26300
26301  if test "x$path" != "x$new_path"; then
26302    BOOT_JDK="$new_path"
26303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26305  fi
26306
26307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26309
26310    else
26311      # We're on a unix platform. Hooray! :)
26312      path="$BOOT_JDK"
26313      has_space=`$ECHO "$path" | $GREP " "`
26314      if test "x$has_space" != x; then
26315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26318      fi
26319
26320      # Use eval to expand a potential ~
26321      eval path="$path"
26322      if test ! -f "$path" && test ! -d "$path"; then
26323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26324      fi
26325
26326      if test -d "$path"; then
26327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26328      else
26329        dir="`$DIRNAME "$path"`"
26330        base="`$BASENAME "$path"`"
26331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26332      fi
26333    fi
26334  fi
26335
26336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26337$as_echo_n "checking for Boot JDK... " >&6; }
26338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26339$as_echo "$BOOT_JDK" >&6; }
26340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26341$as_echo_n "checking Boot JDK version... " >&6; }
26342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26344$as_echo "$BOOT_JDK_VERSION" >&6; }
26345          fi # end check jdk version
26346        fi # end check javac
26347      fi # end check java
26348    fi # end check boot jdk found
26349  fi
26350
26351
26352  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26353
26354  if test "x$BOOT_JDK_FOUND" = xno; then
26355    # Now execute the test
26356
26357  # Extract the first word of "javac", so it can be a program name with args.
26358set dummy javac; ac_word=$2
26359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26360$as_echo_n "checking for $ac_word... " >&6; }
26361if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26362  $as_echo_n "(cached) " >&6
26363else
26364  case $JAVAC_CHECK in
26365  [\\/]* | ?:[\\/]*)
26366  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26367  ;;
26368  *)
26369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26370for as_dir in $PATH
26371do
26372  IFS=$as_save_IFS
26373  test -z "$as_dir" && as_dir=.
26374    for ac_exec_ext in '' $ac_executable_extensions; do
26375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26376    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26378    break 2
26379  fi
26380done
26381  done
26382IFS=$as_save_IFS
26383
26384  ;;
26385esac
26386fi
26387JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26388if test -n "$JAVAC_CHECK"; then
26389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26390$as_echo "$JAVAC_CHECK" >&6; }
26391else
26392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26393$as_echo "no" >&6; }
26394fi
26395
26396
26397  # Extract the first word of "java", so it can be a program name with args.
26398set dummy java; ac_word=$2
26399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26400$as_echo_n "checking for $ac_word... " >&6; }
26401if ${ac_cv_path_JAVA_CHECK+:} false; then :
26402  $as_echo_n "(cached) " >&6
26403else
26404  case $JAVA_CHECK in
26405  [\\/]* | ?:[\\/]*)
26406  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26407  ;;
26408  *)
26409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26410for as_dir in $PATH
26411do
26412  IFS=$as_save_IFS
26413  test -z "$as_dir" && as_dir=.
26414    for ac_exec_ext in '' $ac_executable_extensions; do
26415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26416    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26418    break 2
26419  fi
26420done
26421  done
26422IFS=$as_save_IFS
26423
26424  ;;
26425esac
26426fi
26427JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26428if test -n "$JAVA_CHECK"; then
26429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26430$as_echo "$JAVA_CHECK" >&6; }
26431else
26432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26433$as_echo "no" >&6; }
26434fi
26435
26436
26437  BINARY="$JAVAC_CHECK"
26438  if test "x$JAVAC_CHECK" = x; then
26439    BINARY="$JAVA_CHECK"
26440  fi
26441  if test "x$BINARY" != x; then
26442    # So there is a java(c) binary, it might be part of a JDK.
26443    # Lets find the JDK/JRE directory by following symbolic links.
26444    # Linux/GNU systems often have links from /usr/bin/java to
26445    # /etc/alternatives/java to the real JDK binary.
26446
26447  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26448    # Follow a chain of symbolic links. Use readlink
26449    # where it exists, else fall back to horribly
26450    # complicated shell code.
26451    if test "x$READLINK_TESTED" != yes; then
26452      # On MacOSX there is a readlink tool with a different
26453      # purpose than the GNU readlink tool. Check the found readlink.
26454      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26455      if test "x$ISGNU" = x; then
26456        # A readlink that we do not know how to use.
26457        # Are there other non-GNU readlinks out there?
26458        READLINK_TESTED=yes
26459        READLINK=
26460      fi
26461    fi
26462
26463    if test "x$READLINK" != x; then
26464      BINARY=`$READLINK -f $BINARY`
26465    else
26466      # Save the current directory for restoring afterwards
26467      STARTDIR=$PWD
26468      COUNTER=0
26469      sym_link_dir=`$DIRNAME $BINARY`
26470      sym_link_file=`$BASENAME $BINARY`
26471      cd $sym_link_dir
26472      # Use -P flag to resolve symlinks in directories.
26473      cd `$THEPWDCMD -P`
26474      sym_link_dir=`$THEPWDCMD -P`
26475      # Resolve file symlinks
26476      while test $COUNTER -lt 20; do
26477        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26478        if test "x$ISLINK" == x; then
26479          # This is not a symbolic link! We are done!
26480          break
26481        fi
26482        # Again resolve directory symlinks since the target of the just found
26483        # link could be in a different directory
26484        cd `$DIRNAME $ISLINK`
26485        sym_link_dir=`$THEPWDCMD -P`
26486        sym_link_file=`$BASENAME $ISLINK`
26487        let COUNTER=COUNTER+1
26488      done
26489      cd $STARTDIR
26490      BINARY=$sym_link_dir/$sym_link_file
26491    fi
26492  fi
26493
26494    BOOT_JDK=`dirname "$BINARY"`
26495    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26496    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26497      # Looks like we found ourselves an JDK
26498      BOOT_JDK_FOUND=maybe
26499      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26500$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26501    fi
26502  fi
26503
26504
26505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26507      # Do we have a bin/java?
26508      if test ! -x "$BOOT_JDK/bin/java"; then
26509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26511        BOOT_JDK_FOUND=no
26512      else
26513        # Do we have a bin/javac?
26514        if test ! -x "$BOOT_JDK/bin/javac"; then
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26519          BOOT_JDK_FOUND=no
26520        else
26521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26523
26524          # Extra M4 quote needed to protect [] in grep expression.
26525          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26526          if test "x$FOUND_CORRECT_VERSION" = x; then
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26531            BOOT_JDK_FOUND=no
26532          else
26533            # We're done! :-)
26534            BOOT_JDK_FOUND=yes
26535
26536  # Only process if variable expands to non-empty
26537
26538  if test "x$BOOT_JDK" != x; then
26539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26540
26541  # Input might be given as Windows format, start by converting to
26542  # unix format.
26543  path="$BOOT_JDK"
26544  new_path=`$CYGPATH -u "$path"`
26545
26546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26549  # "foo.exe" is OK but "foo" is an error.
26550  #
26551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26552  # It is also a way to make sure we got the proper file name for the real test later on.
26553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26554  if test "x$test_shortpath" = x; then
26555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26558  fi
26559
26560  # Call helper function which possibly converts this using DOS-style short mode.
26561  # If so, the updated path is stored in $new_path.
26562
26563  input_path="$new_path"
26564  # Check if we need to convert this using DOS-style short mode. If the path
26565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26566  # take no chances and rewrite it.
26567  # Note: m4 eats our [], so we need to use [ and ] instead.
26568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26569  if test "x$has_forbidden_chars" != x; then
26570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26574      # Going to short mode and back again did indeed matter. Since short mode is
26575      # case insensitive, let's make it lowercase to improve readability.
26576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26577      # Now convert it back to Unix-style (cygpath)
26578      input_path=`$CYGPATH -u "$shortmode_path"`
26579      new_path="$input_path"
26580    fi
26581  fi
26582
26583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26584  if test "x$test_cygdrive_prefix" = x; then
26585    # As a simple fix, exclude /usr/bin since it's not a real path.
26586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26588      # a path prefixed by /cygdrive for fixpath to work.
26589      new_path="$CYGWIN_ROOT_PATH$input_path"
26590    fi
26591  fi
26592
26593
26594  if test "x$path" != "x$new_path"; then
26595    BOOT_JDK="$new_path"
26596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26598  fi
26599
26600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26601
26602  path="$BOOT_JDK"
26603  has_colon=`$ECHO $path | $GREP ^.:`
26604  new_path="$path"
26605  if test "x$has_colon" = x; then
26606    # Not in mixed or Windows style, start by that.
26607    new_path=`cmd //c echo $path`
26608  fi
26609
26610
26611  input_path="$new_path"
26612  # Check if we need to convert this using DOS-style short mode. If the path
26613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26614  # take no chances and rewrite it.
26615  # Note: m4 eats our [], so we need to use [ and ] instead.
26616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26617  if test "x$has_forbidden_chars" != x; then
26618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26620  fi
26621
26622
26623  windows_path="$new_path"
26624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26625    unix_path=`$CYGPATH -u "$windows_path"`
26626    new_path="$unix_path"
26627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26629    new_path="$unix_path"
26630  fi
26631
26632  if test "x$path" != "x$new_path"; then
26633    BOOT_JDK="$new_path"
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26636  fi
26637
26638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26640
26641    else
26642      # We're on a unix platform. Hooray! :)
26643      path="$BOOT_JDK"
26644      has_space=`$ECHO "$path" | $GREP " "`
26645      if test "x$has_space" != x; then
26646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26649      fi
26650
26651      # Use eval to expand a potential ~
26652      eval path="$path"
26653      if test ! -f "$path" && test ! -d "$path"; then
26654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26655      fi
26656
26657      if test -d "$path"; then
26658        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26659      else
26660        dir="`$DIRNAME "$path"`"
26661        base="`$BASENAME "$path"`"
26662        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26663      fi
26664    fi
26665  fi
26666
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26668$as_echo_n "checking for Boot JDK... " >&6; }
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26670$as_echo "$BOOT_JDK" >&6; }
26671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26672$as_echo_n "checking Boot JDK version... " >&6; }
26673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26675$as_echo "$BOOT_JDK_VERSION" >&6; }
26676          fi # end check jdk version
26677        fi # end check javac
26678      fi # end check java
26679    fi # end check boot jdk found
26680  fi
26681
26682
26683  # Test: Is there a JDK installed in default, well-known locations?
26684
26685  if test "x$BOOT_JDK_FOUND" = xno; then
26686    # Now execute the test
26687
26688  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26689
26690  if test "x$BOOT_JDK_FOUND" = xno; then
26691    # Now execute the test
26692
26693  if test "x$ProgramW6432" != x; then
26694    VIRTUAL_DIR="$ProgramW6432/Java"
26695
26696  windows_path="$VIRTUAL_DIR"
26697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26698    unix_path=`$CYGPATH -u "$windows_path"`
26699    VIRTUAL_DIR="$unix_path"
26700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26702    VIRTUAL_DIR="$unix_path"
26703  fi
26704
26705
26706  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26707  BOOT_JDK_SUFFIX=""
26708  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26709  if test "x$ALL_JDKS_FOUND" != x; then
26710    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26711
26712  if test "x$BOOT_JDK_FOUND" = xno; then
26713    # Now execute the test
26714
26715        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26716        if test -d "$BOOT_JDK"; then
26717          BOOT_JDK_FOUND=maybe
26718          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26719$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26720        fi
26721
26722
26723    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26724    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26725      # Do we have a bin/java?
26726      if test ! -x "$BOOT_JDK/bin/java"; then
26727        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26729        BOOT_JDK_FOUND=no
26730      else
26731        # Do we have a bin/javac?
26732        if test ! -x "$BOOT_JDK/bin/javac"; then
26733          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26735          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26736$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26737          BOOT_JDK_FOUND=no
26738        else
26739          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26740          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26741
26742          # Extra M4 quote needed to protect [] in grep expression.
26743          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26744          if test "x$FOUND_CORRECT_VERSION" = x; then
26745            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26747            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26748$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26749            BOOT_JDK_FOUND=no
26750          else
26751            # We're done! :-)
26752            BOOT_JDK_FOUND=yes
26753
26754  # Only process if variable expands to non-empty
26755
26756  if test "x$BOOT_JDK" != x; then
26757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26758
26759  # Input might be given as Windows format, start by converting to
26760  # unix format.
26761  path="$BOOT_JDK"
26762  new_path=`$CYGPATH -u "$path"`
26763
26764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26767  # "foo.exe" is OK but "foo" is an error.
26768  #
26769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26770  # It is also a way to make sure we got the proper file name for the real test later on.
26771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26772  if test "x$test_shortpath" = x; then
26773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26776  fi
26777
26778  # Call helper function which possibly converts this using DOS-style short mode.
26779  # If so, the updated path is stored in $new_path.
26780
26781  input_path="$new_path"
26782  # Check if we need to convert this using DOS-style short mode. If the path
26783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26784  # take no chances and rewrite it.
26785  # Note: m4 eats our [], so we need to use [ and ] instead.
26786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26787  if test "x$has_forbidden_chars" != x; then
26788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26792      # Going to short mode and back again did indeed matter. Since short mode is
26793      # case insensitive, let's make it lowercase to improve readability.
26794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26795      # Now convert it back to Unix-style (cygpath)
26796      input_path=`$CYGPATH -u "$shortmode_path"`
26797      new_path="$input_path"
26798    fi
26799  fi
26800
26801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26802  if test "x$test_cygdrive_prefix" = x; then
26803    # As a simple fix, exclude /usr/bin since it's not a real path.
26804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26806      # a path prefixed by /cygdrive for fixpath to work.
26807      new_path="$CYGWIN_ROOT_PATH$input_path"
26808    fi
26809  fi
26810
26811
26812  if test "x$path" != "x$new_path"; then
26813    BOOT_JDK="$new_path"
26814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26816  fi
26817
26818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26819
26820  path="$BOOT_JDK"
26821  has_colon=`$ECHO $path | $GREP ^.:`
26822  new_path="$path"
26823  if test "x$has_colon" = x; then
26824    # Not in mixed or Windows style, start by that.
26825    new_path=`cmd //c echo $path`
26826  fi
26827
26828
26829  input_path="$new_path"
26830  # Check if we need to convert this using DOS-style short mode. If the path
26831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26832  # take no chances and rewrite it.
26833  # Note: m4 eats our [], so we need to use [ and ] instead.
26834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26835  if test "x$has_forbidden_chars" != x; then
26836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26838  fi
26839
26840
26841  windows_path="$new_path"
26842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26843    unix_path=`$CYGPATH -u "$windows_path"`
26844    new_path="$unix_path"
26845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26847    new_path="$unix_path"
26848  fi
26849
26850  if test "x$path" != "x$new_path"; then
26851    BOOT_JDK="$new_path"
26852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26854  fi
26855
26856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26858
26859    else
26860      # We're on a unix platform. Hooray! :)
26861      path="$BOOT_JDK"
26862      has_space=`$ECHO "$path" | $GREP " "`
26863      if test "x$has_space" != x; then
26864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26867      fi
26868
26869      # Use eval to expand a potential ~
26870      eval path="$path"
26871      if test ! -f "$path" && test ! -d "$path"; then
26872        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26873      fi
26874
26875      if test -d "$path"; then
26876        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26877      else
26878        dir="`$DIRNAME "$path"`"
26879        base="`$BASENAME "$path"`"
26880        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26881      fi
26882    fi
26883  fi
26884
26885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26886$as_echo_n "checking for Boot JDK... " >&6; }
26887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26888$as_echo "$BOOT_JDK" >&6; }
26889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26890$as_echo_n "checking Boot JDK version... " >&6; }
26891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26893$as_echo "$BOOT_JDK_VERSION" >&6; }
26894          fi # end check jdk version
26895        fi # end check javac
26896      fi # end check java
26897    fi # end check boot jdk found
26898  fi
26899
26900    done
26901  fi
26902
26903  fi
26904
26905
26906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26908      # Do we have a bin/java?
26909      if test ! -x "$BOOT_JDK/bin/java"; then
26910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26912        BOOT_JDK_FOUND=no
26913      else
26914        # Do we have a bin/javac?
26915        if test ! -x "$BOOT_JDK/bin/javac"; then
26916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26920          BOOT_JDK_FOUND=no
26921        else
26922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26924
26925          # Extra M4 quote needed to protect [] in grep expression.
26926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26927          if test "x$FOUND_CORRECT_VERSION" = x; then
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26932            BOOT_JDK_FOUND=no
26933          else
26934            # We're done! :-)
26935            BOOT_JDK_FOUND=yes
26936
26937  # Only process if variable expands to non-empty
26938
26939  if test "x$BOOT_JDK" != x; then
26940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941
26942  # Input might be given as Windows format, start by converting to
26943  # unix format.
26944  path="$BOOT_JDK"
26945  new_path=`$CYGPATH -u "$path"`
26946
26947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26950  # "foo.exe" is OK but "foo" is an error.
26951  #
26952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26953  # It is also a way to make sure we got the proper file name for the real test later on.
26954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26955  if test "x$test_shortpath" = x; then
26956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26959  fi
26960
26961  # Call helper function which possibly converts this using DOS-style short mode.
26962  # If so, the updated path is stored in $new_path.
26963
26964  input_path="$new_path"
26965  # Check if we need to convert this using DOS-style short mode. If the path
26966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26967  # take no chances and rewrite it.
26968  # Note: m4 eats our [], so we need to use [ and ] instead.
26969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26970  if test "x$has_forbidden_chars" != x; then
26971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26975      # Going to short mode and back again did indeed matter. Since short mode is
26976      # case insensitive, let's make it lowercase to improve readability.
26977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26978      # Now convert it back to Unix-style (cygpath)
26979      input_path=`$CYGPATH -u "$shortmode_path"`
26980      new_path="$input_path"
26981    fi
26982  fi
26983
26984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26985  if test "x$test_cygdrive_prefix" = x; then
26986    # As a simple fix, exclude /usr/bin since it's not a real path.
26987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26989      # a path prefixed by /cygdrive for fixpath to work.
26990      new_path="$CYGWIN_ROOT_PATH$input_path"
26991    fi
26992  fi
26993
26994
26995  if test "x$path" != "x$new_path"; then
26996    BOOT_JDK="$new_path"
26997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999  fi
27000
27001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002
27003  path="$BOOT_JDK"
27004  has_colon=`$ECHO $path | $GREP ^.:`
27005  new_path="$path"
27006  if test "x$has_colon" = x; then
27007    # Not in mixed or Windows style, start by that.
27008    new_path=`cmd //c echo $path`
27009  fi
27010
27011
27012  input_path="$new_path"
27013  # Check if we need to convert this using DOS-style short mode. If the path
27014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27015  # take no chances and rewrite it.
27016  # Note: m4 eats our [], so we need to use [ and ] instead.
27017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27018  if test "x$has_forbidden_chars" != x; then
27019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021  fi
27022
27023
27024  windows_path="$new_path"
27025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27026    unix_path=`$CYGPATH -u "$windows_path"`
27027    new_path="$unix_path"
27028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27030    new_path="$unix_path"
27031  fi
27032
27033  if test "x$path" != "x$new_path"; then
27034    BOOT_JDK="$new_path"
27035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27037  fi
27038
27039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27041
27042    else
27043      # We're on a unix platform. Hooray! :)
27044      path="$BOOT_JDK"
27045      has_space=`$ECHO "$path" | $GREP " "`
27046      if test "x$has_space" != x; then
27047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27050      fi
27051
27052      # Use eval to expand a potential ~
27053      eval path="$path"
27054      if test ! -f "$path" && test ! -d "$path"; then
27055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27056      fi
27057
27058      if test -d "$path"; then
27059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27060      else
27061        dir="`$DIRNAME "$path"`"
27062        base="`$BASENAME "$path"`"
27063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27064      fi
27065    fi
27066  fi
27067
27068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27069$as_echo_n "checking for Boot JDK... " >&6; }
27070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27071$as_echo "$BOOT_JDK" >&6; }
27072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27073$as_echo_n "checking Boot JDK version... " >&6; }
27074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27076$as_echo "$BOOT_JDK_VERSION" >&6; }
27077          fi # end check jdk version
27078        fi # end check javac
27079      fi # end check java
27080    fi # end check boot jdk found
27081  fi
27082
27083
27084  if test "x$BOOT_JDK_FOUND" = xno; then
27085    # Now execute the test
27086
27087  if test "x$PROGRAMW6432" != x; then
27088    VIRTUAL_DIR="$PROGRAMW6432/Java"
27089
27090  windows_path="$VIRTUAL_DIR"
27091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27092    unix_path=`$CYGPATH -u "$windows_path"`
27093    VIRTUAL_DIR="$unix_path"
27094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27096    VIRTUAL_DIR="$unix_path"
27097  fi
27098
27099
27100  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27101  BOOT_JDK_SUFFIX=""
27102  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27103  if test "x$ALL_JDKS_FOUND" != x; then
27104    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27105
27106  if test "x$BOOT_JDK_FOUND" = xno; then
27107    # Now execute the test
27108
27109        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27110        if test -d "$BOOT_JDK"; then
27111          BOOT_JDK_FOUND=maybe
27112          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27113$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27114        fi
27115
27116
27117    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27118    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27119      # Do we have a bin/java?
27120      if test ! -x "$BOOT_JDK/bin/java"; then
27121        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27123        BOOT_JDK_FOUND=no
27124      else
27125        # Do we have a bin/javac?
27126        if test ! -x "$BOOT_JDK/bin/javac"; then
27127          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27129          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27130$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27131          BOOT_JDK_FOUND=no
27132        else
27133          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27134          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27135
27136          # Extra M4 quote needed to protect [] in grep expression.
27137          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27138          if test "x$FOUND_CORRECT_VERSION" = x; then
27139            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27141            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27142$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27143            BOOT_JDK_FOUND=no
27144          else
27145            # We're done! :-)
27146            BOOT_JDK_FOUND=yes
27147
27148  # Only process if variable expands to non-empty
27149
27150  if test "x$BOOT_JDK" != x; then
27151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27152
27153  # Input might be given as Windows format, start by converting to
27154  # unix format.
27155  path="$BOOT_JDK"
27156  new_path=`$CYGPATH -u "$path"`
27157
27158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27161  # "foo.exe" is OK but "foo" is an error.
27162  #
27163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27164  # It is also a way to make sure we got the proper file name for the real test later on.
27165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27166  if test "x$test_shortpath" = x; then
27167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27169    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27170  fi
27171
27172  # Call helper function which possibly converts this using DOS-style short mode.
27173  # If so, the updated path is stored in $new_path.
27174
27175  input_path="$new_path"
27176  # Check if we need to convert this using DOS-style short mode. If the path
27177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27178  # take no chances and rewrite it.
27179  # Note: m4 eats our [], so we need to use [ and ] instead.
27180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27181  if test "x$has_forbidden_chars" != x; then
27182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27186      # Going to short mode and back again did indeed matter. Since short mode is
27187      # case insensitive, let's make it lowercase to improve readability.
27188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27189      # Now convert it back to Unix-style (cygpath)
27190      input_path=`$CYGPATH -u "$shortmode_path"`
27191      new_path="$input_path"
27192    fi
27193  fi
27194
27195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27196  if test "x$test_cygdrive_prefix" = x; then
27197    # As a simple fix, exclude /usr/bin since it's not a real path.
27198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27200      # a path prefixed by /cygdrive for fixpath to work.
27201      new_path="$CYGWIN_ROOT_PATH$input_path"
27202    fi
27203  fi
27204
27205
27206  if test "x$path" != "x$new_path"; then
27207    BOOT_JDK="$new_path"
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27210  fi
27211
27212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27213
27214  path="$BOOT_JDK"
27215  has_colon=`$ECHO $path | $GREP ^.:`
27216  new_path="$path"
27217  if test "x$has_colon" = x; then
27218    # Not in mixed or Windows style, start by that.
27219    new_path=`cmd //c echo $path`
27220  fi
27221
27222
27223  input_path="$new_path"
27224  # Check if we need to convert this using DOS-style short mode. If the path
27225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27226  # take no chances and rewrite it.
27227  # Note: m4 eats our [], so we need to use [ and ] instead.
27228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27229  if test "x$has_forbidden_chars" != x; then
27230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27232  fi
27233
27234
27235  windows_path="$new_path"
27236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27237    unix_path=`$CYGPATH -u "$windows_path"`
27238    new_path="$unix_path"
27239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27241    new_path="$unix_path"
27242  fi
27243
27244  if test "x$path" != "x$new_path"; then
27245    BOOT_JDK="$new_path"
27246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27248  fi
27249
27250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27252
27253    else
27254      # We're on a unix platform. Hooray! :)
27255      path="$BOOT_JDK"
27256      has_space=`$ECHO "$path" | $GREP " "`
27257      if test "x$has_space" != x; then
27258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27261      fi
27262
27263      # Use eval to expand a potential ~
27264      eval path="$path"
27265      if test ! -f "$path" && test ! -d "$path"; then
27266        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27267      fi
27268
27269      if test -d "$path"; then
27270        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27271      else
27272        dir="`$DIRNAME "$path"`"
27273        base="`$BASENAME "$path"`"
27274        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27275      fi
27276    fi
27277  fi
27278
27279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27280$as_echo_n "checking for Boot JDK... " >&6; }
27281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27282$as_echo "$BOOT_JDK" >&6; }
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27284$as_echo_n "checking Boot JDK version... " >&6; }
27285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27287$as_echo "$BOOT_JDK_VERSION" >&6; }
27288          fi # end check jdk version
27289        fi # end check javac
27290      fi # end check java
27291    fi # end check boot jdk found
27292  fi
27293
27294    done
27295  fi
27296
27297  fi
27298
27299
27300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27302      # Do we have a bin/java?
27303      if test ! -x "$BOOT_JDK/bin/java"; then
27304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27306        BOOT_JDK_FOUND=no
27307      else
27308        # Do we have a bin/javac?
27309        if test ! -x "$BOOT_JDK/bin/javac"; then
27310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27314          BOOT_JDK_FOUND=no
27315        else
27316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27318
27319          # Extra M4 quote needed to protect [] in grep expression.
27320          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27321          if test "x$FOUND_CORRECT_VERSION" = x; then
27322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27326            BOOT_JDK_FOUND=no
27327          else
27328            # We're done! :-)
27329            BOOT_JDK_FOUND=yes
27330
27331  # Only process if variable expands to non-empty
27332
27333  if test "x$BOOT_JDK" != x; then
27334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27335
27336  # Input might be given as Windows format, start by converting to
27337  # unix format.
27338  path="$BOOT_JDK"
27339  new_path=`$CYGPATH -u "$path"`
27340
27341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27344  # "foo.exe" is OK but "foo" is an error.
27345  #
27346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27347  # It is also a way to make sure we got the proper file name for the real test later on.
27348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27349  if test "x$test_shortpath" = x; then
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27353  fi
27354
27355  # Call helper function which possibly converts this using DOS-style short mode.
27356  # If so, the updated path is stored in $new_path.
27357
27358  input_path="$new_path"
27359  # Check if we need to convert this using DOS-style short mode. If the path
27360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27361  # take no chances and rewrite it.
27362  # Note: m4 eats our [], so we need to use [ and ] instead.
27363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27364  if test "x$has_forbidden_chars" != x; then
27365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27369      # Going to short mode and back again did indeed matter. Since short mode is
27370      # case insensitive, let's make it lowercase to improve readability.
27371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27372      # Now convert it back to Unix-style (cygpath)
27373      input_path=`$CYGPATH -u "$shortmode_path"`
27374      new_path="$input_path"
27375    fi
27376  fi
27377
27378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27379  if test "x$test_cygdrive_prefix" = x; then
27380    # As a simple fix, exclude /usr/bin since it's not a real path.
27381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27383      # a path prefixed by /cygdrive for fixpath to work.
27384      new_path="$CYGWIN_ROOT_PATH$input_path"
27385    fi
27386  fi
27387
27388
27389  if test "x$path" != "x$new_path"; then
27390    BOOT_JDK="$new_path"
27391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27393  fi
27394
27395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396
27397  path="$BOOT_JDK"
27398  has_colon=`$ECHO $path | $GREP ^.:`
27399  new_path="$path"
27400  if test "x$has_colon" = x; then
27401    # Not in mixed or Windows style, start by that.
27402    new_path=`cmd //c echo $path`
27403  fi
27404
27405
27406  input_path="$new_path"
27407  # Check if we need to convert this using DOS-style short mode. If the path
27408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27409  # take no chances and rewrite it.
27410  # Note: m4 eats our [], so we need to use [ and ] instead.
27411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27412  if test "x$has_forbidden_chars" != x; then
27413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27415  fi
27416
27417
27418  windows_path="$new_path"
27419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27420    unix_path=`$CYGPATH -u "$windows_path"`
27421    new_path="$unix_path"
27422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27424    new_path="$unix_path"
27425  fi
27426
27427  if test "x$path" != "x$new_path"; then
27428    BOOT_JDK="$new_path"
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27431  fi
27432
27433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27435
27436    else
27437      # We're on a unix platform. Hooray! :)
27438      path="$BOOT_JDK"
27439      has_space=`$ECHO "$path" | $GREP " "`
27440      if test "x$has_space" != x; then
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27444      fi
27445
27446      # Use eval to expand a potential ~
27447      eval path="$path"
27448      if test ! -f "$path" && test ! -d "$path"; then
27449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27450      fi
27451
27452      if test -d "$path"; then
27453        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27454      else
27455        dir="`$DIRNAME "$path"`"
27456        base="`$BASENAME "$path"`"
27457        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27458      fi
27459    fi
27460  fi
27461
27462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27463$as_echo_n "checking for Boot JDK... " >&6; }
27464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27465$as_echo "$BOOT_JDK" >&6; }
27466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27467$as_echo_n "checking Boot JDK version... " >&6; }
27468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27470$as_echo "$BOOT_JDK_VERSION" >&6; }
27471          fi # end check jdk version
27472        fi # end check javac
27473      fi # end check java
27474    fi # end check boot jdk found
27475  fi
27476
27477
27478  if test "x$BOOT_JDK_FOUND" = xno; then
27479    # Now execute the test
27480
27481  if test "x$PROGRAMFILES" != x; then
27482    VIRTUAL_DIR="$PROGRAMFILES/Java"
27483
27484  windows_path="$VIRTUAL_DIR"
27485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27486    unix_path=`$CYGPATH -u "$windows_path"`
27487    VIRTUAL_DIR="$unix_path"
27488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27490    VIRTUAL_DIR="$unix_path"
27491  fi
27492
27493
27494  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27495  BOOT_JDK_SUFFIX=""
27496  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27497  if test "x$ALL_JDKS_FOUND" != x; then
27498    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27499
27500  if test "x$BOOT_JDK_FOUND" = xno; then
27501    # Now execute the test
27502
27503        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27504        if test -d "$BOOT_JDK"; then
27505          BOOT_JDK_FOUND=maybe
27506          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27507$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27508        fi
27509
27510
27511    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27512    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27513      # Do we have a bin/java?
27514      if test ! -x "$BOOT_JDK/bin/java"; then
27515        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27517        BOOT_JDK_FOUND=no
27518      else
27519        # Do we have a bin/javac?
27520        if test ! -x "$BOOT_JDK/bin/javac"; then
27521          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27523          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27524$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27525          BOOT_JDK_FOUND=no
27526        else
27527          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27528          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27529
27530          # Extra M4 quote needed to protect [] in grep expression.
27531          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27532          if test "x$FOUND_CORRECT_VERSION" = x; then
27533            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27535            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27536$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27537            BOOT_JDK_FOUND=no
27538          else
27539            # We're done! :-)
27540            BOOT_JDK_FOUND=yes
27541
27542  # Only process if variable expands to non-empty
27543
27544  if test "x$BOOT_JDK" != x; then
27545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546
27547  # Input might be given as Windows format, start by converting to
27548  # unix format.
27549  path="$BOOT_JDK"
27550  new_path=`$CYGPATH -u "$path"`
27551
27552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27555  # "foo.exe" is OK but "foo" is an error.
27556  #
27557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27558  # It is also a way to make sure we got the proper file name for the real test later on.
27559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27560  if test "x$test_shortpath" = x; then
27561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27563    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27564  fi
27565
27566  # Call helper function which possibly converts this using DOS-style short mode.
27567  # If so, the updated path is stored in $new_path.
27568
27569  input_path="$new_path"
27570  # Check if we need to convert this using DOS-style short mode. If the path
27571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27572  # take no chances and rewrite it.
27573  # Note: m4 eats our [], so we need to use [ and ] instead.
27574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27575  if test "x$has_forbidden_chars" != x; then
27576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27580      # Going to short mode and back again did indeed matter. Since short mode is
27581      # case insensitive, let's make it lowercase to improve readability.
27582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27583      # Now convert it back to Unix-style (cygpath)
27584      input_path=`$CYGPATH -u "$shortmode_path"`
27585      new_path="$input_path"
27586    fi
27587  fi
27588
27589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27590  if test "x$test_cygdrive_prefix" = x; then
27591    # As a simple fix, exclude /usr/bin since it's not a real path.
27592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27594      # a path prefixed by /cygdrive for fixpath to work.
27595      new_path="$CYGWIN_ROOT_PATH$input_path"
27596    fi
27597  fi
27598
27599
27600  if test "x$path" != "x$new_path"; then
27601    BOOT_JDK="$new_path"
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27604  fi
27605
27606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27607
27608  path="$BOOT_JDK"
27609  has_colon=`$ECHO $path | $GREP ^.:`
27610  new_path="$path"
27611  if test "x$has_colon" = x; then
27612    # Not in mixed or Windows style, start by that.
27613    new_path=`cmd //c echo $path`
27614  fi
27615
27616
27617  input_path="$new_path"
27618  # Check if we need to convert this using DOS-style short mode. If the path
27619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27620  # take no chances and rewrite it.
27621  # Note: m4 eats our [], so we need to use [ and ] instead.
27622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27623  if test "x$has_forbidden_chars" != x; then
27624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27626  fi
27627
27628
27629  windows_path="$new_path"
27630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27631    unix_path=`$CYGPATH -u "$windows_path"`
27632    new_path="$unix_path"
27633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27635    new_path="$unix_path"
27636  fi
27637
27638  if test "x$path" != "x$new_path"; then
27639    BOOT_JDK="$new_path"
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27642  fi
27643
27644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27646
27647    else
27648      # We're on a unix platform. Hooray! :)
27649      path="$BOOT_JDK"
27650      has_space=`$ECHO "$path" | $GREP " "`
27651      if test "x$has_space" != x; then
27652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27655      fi
27656
27657      # Use eval to expand a potential ~
27658      eval path="$path"
27659      if test ! -f "$path" && test ! -d "$path"; then
27660        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27661      fi
27662
27663      if test -d "$path"; then
27664        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27665      else
27666        dir="`$DIRNAME "$path"`"
27667        base="`$BASENAME "$path"`"
27668        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27669      fi
27670    fi
27671  fi
27672
27673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27674$as_echo_n "checking for Boot JDK... " >&6; }
27675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27676$as_echo "$BOOT_JDK" >&6; }
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27678$as_echo_n "checking Boot JDK version... " >&6; }
27679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27681$as_echo "$BOOT_JDK_VERSION" >&6; }
27682          fi # end check jdk version
27683        fi # end check javac
27684      fi # end check java
27685    fi # end check boot jdk found
27686  fi
27687
27688    done
27689  fi
27690
27691  fi
27692
27693
27694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27696      # Do we have a bin/java?
27697      if test ! -x "$BOOT_JDK/bin/java"; then
27698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27700        BOOT_JDK_FOUND=no
27701      else
27702        # Do we have a bin/javac?
27703        if test ! -x "$BOOT_JDK/bin/javac"; then
27704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27708          BOOT_JDK_FOUND=no
27709        else
27710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27712
27713          # Extra M4 quote needed to protect [] in grep expression.
27714          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27715          if test "x$FOUND_CORRECT_VERSION" = x; then
27716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27720            BOOT_JDK_FOUND=no
27721          else
27722            # We're done! :-)
27723            BOOT_JDK_FOUND=yes
27724
27725  # Only process if variable expands to non-empty
27726
27727  if test "x$BOOT_JDK" != x; then
27728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27729
27730  # Input might be given as Windows format, start by converting to
27731  # unix format.
27732  path="$BOOT_JDK"
27733  new_path=`$CYGPATH -u "$path"`
27734
27735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27738  # "foo.exe" is OK but "foo" is an error.
27739  #
27740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27741  # It is also a way to make sure we got the proper file name for the real test later on.
27742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27743  if test "x$test_shortpath" = x; then
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27747  fi
27748
27749  # Call helper function which possibly converts this using DOS-style short mode.
27750  # If so, the updated path is stored in $new_path.
27751
27752  input_path="$new_path"
27753  # Check if we need to convert this using DOS-style short mode. If the path
27754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27755  # take no chances and rewrite it.
27756  # Note: m4 eats our [], so we need to use [ and ] instead.
27757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27758  if test "x$has_forbidden_chars" != x; then
27759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27763      # Going to short mode and back again did indeed matter. Since short mode is
27764      # case insensitive, let's make it lowercase to improve readability.
27765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27766      # Now convert it back to Unix-style (cygpath)
27767      input_path=`$CYGPATH -u "$shortmode_path"`
27768      new_path="$input_path"
27769    fi
27770  fi
27771
27772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27773  if test "x$test_cygdrive_prefix" = x; then
27774    # As a simple fix, exclude /usr/bin since it's not a real path.
27775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27777      # a path prefixed by /cygdrive for fixpath to work.
27778      new_path="$CYGWIN_ROOT_PATH$input_path"
27779    fi
27780  fi
27781
27782
27783  if test "x$path" != "x$new_path"; then
27784    BOOT_JDK="$new_path"
27785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27787  fi
27788
27789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27790
27791  path="$BOOT_JDK"
27792  has_colon=`$ECHO $path | $GREP ^.:`
27793  new_path="$path"
27794  if test "x$has_colon" = x; then
27795    # Not in mixed or Windows style, start by that.
27796    new_path=`cmd //c echo $path`
27797  fi
27798
27799
27800  input_path="$new_path"
27801  # Check if we need to convert this using DOS-style short mode. If the path
27802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27803  # take no chances and rewrite it.
27804  # Note: m4 eats our [], so we need to use [ and ] instead.
27805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27806  if test "x$has_forbidden_chars" != x; then
27807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27809  fi
27810
27811
27812  windows_path="$new_path"
27813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27814    unix_path=`$CYGPATH -u "$windows_path"`
27815    new_path="$unix_path"
27816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27818    new_path="$unix_path"
27819  fi
27820
27821  if test "x$path" != "x$new_path"; then
27822    BOOT_JDK="$new_path"
27823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27825  fi
27826
27827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27829
27830    else
27831      # We're on a unix platform. Hooray! :)
27832      path="$BOOT_JDK"
27833      has_space=`$ECHO "$path" | $GREP " "`
27834      if test "x$has_space" != x; then
27835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27838      fi
27839
27840      # Use eval to expand a potential ~
27841      eval path="$path"
27842      if test ! -f "$path" && test ! -d "$path"; then
27843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27844      fi
27845
27846      if test -d "$path"; then
27847        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27848      else
27849        dir="`$DIRNAME "$path"`"
27850        base="`$BASENAME "$path"`"
27851        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27852      fi
27853    fi
27854  fi
27855
27856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27857$as_echo_n "checking for Boot JDK... " >&6; }
27858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27859$as_echo "$BOOT_JDK" >&6; }
27860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27861$as_echo_n "checking Boot JDK version... " >&6; }
27862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27864$as_echo "$BOOT_JDK_VERSION" >&6; }
27865          fi # end check jdk version
27866        fi # end check javac
27867      fi # end check java
27868    fi # end check boot jdk found
27869  fi
27870
27871
27872  if test "x$BOOT_JDK_FOUND" = xno; then
27873    # Now execute the test
27874
27875  if test "x$ProgramFiles" != x; then
27876    VIRTUAL_DIR="$ProgramFiles/Java"
27877
27878  windows_path="$VIRTUAL_DIR"
27879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27880    unix_path=`$CYGPATH -u "$windows_path"`
27881    VIRTUAL_DIR="$unix_path"
27882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27884    VIRTUAL_DIR="$unix_path"
27885  fi
27886
27887
27888  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27889  BOOT_JDK_SUFFIX=""
27890  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27891  if test "x$ALL_JDKS_FOUND" != x; then
27892    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27893
27894  if test "x$BOOT_JDK_FOUND" = xno; then
27895    # Now execute the test
27896
27897        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27898        if test -d "$BOOT_JDK"; then
27899          BOOT_JDK_FOUND=maybe
27900          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27901$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27902        fi
27903
27904
27905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27907      # Do we have a bin/java?
27908      if test ! -x "$BOOT_JDK/bin/java"; then
27909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27911        BOOT_JDK_FOUND=no
27912      else
27913        # Do we have a bin/javac?
27914        if test ! -x "$BOOT_JDK/bin/javac"; then
27915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27919          BOOT_JDK_FOUND=no
27920        else
27921          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27922          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27923
27924          # Extra M4 quote needed to protect [] in grep expression.
27925          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27926          if test "x$FOUND_CORRECT_VERSION" = x; then
27927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27929            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27931            BOOT_JDK_FOUND=no
27932          else
27933            # We're done! :-)
27934            BOOT_JDK_FOUND=yes
27935
27936  # Only process if variable expands to non-empty
27937
27938  if test "x$BOOT_JDK" != x; then
27939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27940
27941  # Input might be given as Windows format, start by converting to
27942  # unix format.
27943  path="$BOOT_JDK"
27944  new_path=`$CYGPATH -u "$path"`
27945
27946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27949  # "foo.exe" is OK but "foo" is an error.
27950  #
27951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27952  # It is also a way to make sure we got the proper file name for the real test later on.
27953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27954  if test "x$test_shortpath" = x; then
27955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27958  fi
27959
27960  # Call helper function which possibly converts this using DOS-style short mode.
27961  # If so, the updated path is stored in $new_path.
27962
27963  input_path="$new_path"
27964  # Check if we need to convert this using DOS-style short mode. If the path
27965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27966  # take no chances and rewrite it.
27967  # Note: m4 eats our [], so we need to use [ and ] instead.
27968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27969  if test "x$has_forbidden_chars" != x; then
27970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27974      # Going to short mode and back again did indeed matter. Since short mode is
27975      # case insensitive, let's make it lowercase to improve readability.
27976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27977      # Now convert it back to Unix-style (cygpath)
27978      input_path=`$CYGPATH -u "$shortmode_path"`
27979      new_path="$input_path"
27980    fi
27981  fi
27982
27983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27984  if test "x$test_cygdrive_prefix" = x; then
27985    # As a simple fix, exclude /usr/bin since it's not a real path.
27986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27988      # a path prefixed by /cygdrive for fixpath to work.
27989      new_path="$CYGWIN_ROOT_PATH$input_path"
27990    fi
27991  fi
27992
27993
27994  if test "x$path" != "x$new_path"; then
27995    BOOT_JDK="$new_path"
27996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27998  fi
27999
28000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28001
28002  path="$BOOT_JDK"
28003  has_colon=`$ECHO $path | $GREP ^.:`
28004  new_path="$path"
28005  if test "x$has_colon" = x; then
28006    # Not in mixed or Windows style, start by that.
28007    new_path=`cmd //c echo $path`
28008  fi
28009
28010
28011  input_path="$new_path"
28012  # Check if we need to convert this using DOS-style short mode. If the path
28013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28014  # take no chances and rewrite it.
28015  # Note: m4 eats our [], so we need to use [ and ] instead.
28016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28017  if test "x$has_forbidden_chars" != x; then
28018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28020  fi
28021
28022
28023  windows_path="$new_path"
28024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28025    unix_path=`$CYGPATH -u "$windows_path"`
28026    new_path="$unix_path"
28027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28029    new_path="$unix_path"
28030  fi
28031
28032  if test "x$path" != "x$new_path"; then
28033    BOOT_JDK="$new_path"
28034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28036  fi
28037
28038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28040
28041    else
28042      # We're on a unix platform. Hooray! :)
28043      path="$BOOT_JDK"
28044      has_space=`$ECHO "$path" | $GREP " "`
28045      if test "x$has_space" != x; then
28046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28049      fi
28050
28051      # Use eval to expand a potential ~
28052      eval path="$path"
28053      if test ! -f "$path" && test ! -d "$path"; then
28054        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28055      fi
28056
28057      if test -d "$path"; then
28058        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28059      else
28060        dir="`$DIRNAME "$path"`"
28061        base="`$BASENAME "$path"`"
28062        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28063      fi
28064    fi
28065  fi
28066
28067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28068$as_echo_n "checking for Boot JDK... " >&6; }
28069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28070$as_echo "$BOOT_JDK" >&6; }
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28072$as_echo_n "checking Boot JDK version... " >&6; }
28073            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28075$as_echo "$BOOT_JDK_VERSION" >&6; }
28076          fi # end check jdk version
28077        fi # end check javac
28078      fi # end check java
28079    fi # end check boot jdk found
28080  fi
28081
28082    done
28083  fi
28084
28085  fi
28086
28087
28088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28090      # Do we have a bin/java?
28091      if test ! -x "$BOOT_JDK/bin/java"; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28094        BOOT_JDK_FOUND=no
28095      else
28096        # Do we have a bin/javac?
28097        if test ! -x "$BOOT_JDK/bin/javac"; then
28098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28102          BOOT_JDK_FOUND=no
28103        else
28104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28106
28107          # Extra M4 quote needed to protect [] in grep expression.
28108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28109          if test "x$FOUND_CORRECT_VERSION" = x; then
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28114            BOOT_JDK_FOUND=no
28115          else
28116            # We're done! :-)
28117            BOOT_JDK_FOUND=yes
28118
28119  # Only process if variable expands to non-empty
28120
28121  if test "x$BOOT_JDK" != x; then
28122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28123
28124  # Input might be given as Windows format, start by converting to
28125  # unix format.
28126  path="$BOOT_JDK"
28127  new_path=`$CYGPATH -u "$path"`
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28141  fi
28142
28143  # Call helper function which possibly converts this using DOS-style short mode.
28144  # If so, the updated path is stored in $new_path.
28145
28146  input_path="$new_path"
28147  # Check if we need to convert this using DOS-style short mode. If the path
28148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28149  # take no chances and rewrite it.
28150  # Note: m4 eats our [], so we need to use [ and ] instead.
28151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28152  if test "x$has_forbidden_chars" != x; then
28153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28157      # Going to short mode and back again did indeed matter. Since short mode is
28158      # case insensitive, let's make it lowercase to improve readability.
28159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160      # Now convert it back to Unix-style (cygpath)
28161      input_path=`$CYGPATH -u "$shortmode_path"`
28162      new_path="$input_path"
28163    fi
28164  fi
28165
28166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28167  if test "x$test_cygdrive_prefix" = x; then
28168    # As a simple fix, exclude /usr/bin since it's not a real path.
28169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28171      # a path prefixed by /cygdrive for fixpath to work.
28172      new_path="$CYGWIN_ROOT_PATH$input_path"
28173    fi
28174  fi
28175
28176
28177  if test "x$path" != "x$new_path"; then
28178    BOOT_JDK="$new_path"
28179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181  fi
28182
28183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184
28185  path="$BOOT_JDK"
28186  has_colon=`$ECHO $path | $GREP ^.:`
28187  new_path="$path"
28188  if test "x$has_colon" = x; then
28189    # Not in mixed or Windows style, start by that.
28190    new_path=`cmd //c echo $path`
28191  fi
28192
28193
28194  input_path="$new_path"
28195  # Check if we need to convert this using DOS-style short mode. If the path
28196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197  # take no chances and rewrite it.
28198  # Note: m4 eats our [], so we need to use [ and ] instead.
28199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28200  if test "x$has_forbidden_chars" != x; then
28201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28203  fi
28204
28205
28206  windows_path="$new_path"
28207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208    unix_path=`$CYGPATH -u "$windows_path"`
28209    new_path="$unix_path"
28210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212    new_path="$unix_path"
28213  fi
28214
28215  if test "x$path" != "x$new_path"; then
28216    BOOT_JDK="$new_path"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28219  fi
28220
28221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28223
28224    else
28225      # We're on a unix platform. Hooray! :)
28226      path="$BOOT_JDK"
28227      has_space=`$ECHO "$path" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28232      fi
28233
28234      # Use eval to expand a potential ~
28235      eval path="$path"
28236      if test ! -f "$path" && test ! -d "$path"; then
28237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28238      fi
28239
28240      if test -d "$path"; then
28241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28242      else
28243        dir="`$DIRNAME "$path"`"
28244        base="`$BASENAME "$path"`"
28245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28246      fi
28247    fi
28248  fi
28249
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28251$as_echo_n "checking for Boot JDK... " >&6; }
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28253$as_echo "$BOOT_JDK" >&6; }
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28255$as_echo_n "checking Boot JDK version... " >&6; }
28256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28258$as_echo "$BOOT_JDK_VERSION" >&6; }
28259          fi # end check jdk version
28260        fi # end check javac
28261      fi # end check java
28262    fi # end check boot jdk found
28263  fi
28264
28265
28266  if test "x$BOOT_JDK_FOUND" = xno; then
28267    # Now execute the test
28268
28269  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28270  BOOT_JDK_SUFFIX=""
28271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28272  if test "x$ALL_JDKS_FOUND" != x; then
28273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28274
28275  if test "x$BOOT_JDK_FOUND" = xno; then
28276    # Now execute the test
28277
28278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28279        if test -d "$BOOT_JDK"; then
28280          BOOT_JDK_FOUND=maybe
28281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28283        fi
28284
28285
28286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28288      # Do we have a bin/java?
28289      if test ! -x "$BOOT_JDK/bin/java"; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28292        BOOT_JDK_FOUND=no
28293      else
28294        # Do we have a bin/javac?
28295        if test ! -x "$BOOT_JDK/bin/javac"; then
28296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28300          BOOT_JDK_FOUND=no
28301        else
28302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28304
28305          # Extra M4 quote needed to protect [] in grep expression.
28306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28307          if test "x$FOUND_CORRECT_VERSION" = x; then
28308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28312            BOOT_JDK_FOUND=no
28313          else
28314            # We're done! :-)
28315            BOOT_JDK_FOUND=yes
28316
28317  # Only process if variable expands to non-empty
28318
28319  if test "x$BOOT_JDK" != x; then
28320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321
28322  # Input might be given as Windows format, start by converting to
28323  # unix format.
28324  path="$BOOT_JDK"
28325  new_path=`$CYGPATH -u "$path"`
28326
28327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28330  # "foo.exe" is OK but "foo" is an error.
28331  #
28332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28333  # It is also a way to make sure we got the proper file name for the real test later on.
28334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28335  if test "x$test_shortpath" = x; then
28336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28339  fi
28340
28341  # Call helper function which possibly converts this using DOS-style short mode.
28342  # If so, the updated path is stored in $new_path.
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28355      # Going to short mode and back again did indeed matter. Since short mode is
28356      # case insensitive, let's make it lowercase to improve readability.
28357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28358      # Now convert it back to Unix-style (cygpath)
28359      input_path=`$CYGPATH -u "$shortmode_path"`
28360      new_path="$input_path"
28361    fi
28362  fi
28363
28364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28365  if test "x$test_cygdrive_prefix" = x; then
28366    # As a simple fix, exclude /usr/bin since it's not a real path.
28367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28369      # a path prefixed by /cygdrive for fixpath to work.
28370      new_path="$CYGWIN_ROOT_PATH$input_path"
28371    fi
28372  fi
28373
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382
28383  path="$BOOT_JDK"
28384  has_colon=`$ECHO $path | $GREP ^.:`
28385  new_path="$path"
28386  if test "x$has_colon" = x; then
28387    # Not in mixed or Windows style, start by that.
28388    new_path=`cmd //c echo $path`
28389  fi
28390
28391
28392  input_path="$new_path"
28393  # Check if we need to convert this using DOS-style short mode. If the path
28394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28395  # take no chances and rewrite it.
28396  # Note: m4 eats our [], so we need to use [ and ] instead.
28397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28398  if test "x$has_forbidden_chars" != x; then
28399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28401  fi
28402
28403
28404  windows_path="$new_path"
28405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28406    unix_path=`$CYGPATH -u "$windows_path"`
28407    new_path="$unix_path"
28408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28410    new_path="$unix_path"
28411  fi
28412
28413  if test "x$path" != "x$new_path"; then
28414    BOOT_JDK="$new_path"
28415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28417  fi
28418
28419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28421
28422    else
28423      # We're on a unix platform. Hooray! :)
28424      path="$BOOT_JDK"
28425      has_space=`$ECHO "$path" | $GREP " "`
28426      if test "x$has_space" != x; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28430      fi
28431
28432      # Use eval to expand a potential ~
28433      eval path="$path"
28434      if test ! -f "$path" && test ! -d "$path"; then
28435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28436      fi
28437
28438      if test -d "$path"; then
28439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28440      else
28441        dir="`$DIRNAME "$path"`"
28442        base="`$BASENAME "$path"`"
28443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28444      fi
28445    fi
28446  fi
28447
28448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28449$as_echo_n "checking for Boot JDK... " >&6; }
28450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28451$as_echo "$BOOT_JDK" >&6; }
28452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28453$as_echo_n "checking Boot JDK version... " >&6; }
28454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28456$as_echo "$BOOT_JDK_VERSION" >&6; }
28457          fi # end check jdk version
28458        fi # end check javac
28459      fi # end check java
28460    fi # end check boot jdk found
28461  fi
28462
28463    done
28464  fi
28465
28466
28467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28469      # Do we have a bin/java?
28470      if test ! -x "$BOOT_JDK/bin/java"; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28473        BOOT_JDK_FOUND=no
28474      else
28475        # Do we have a bin/javac?
28476        if test ! -x "$BOOT_JDK/bin/javac"; then
28477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28481          BOOT_JDK_FOUND=no
28482        else
28483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28485
28486          # Extra M4 quote needed to protect [] in grep expression.
28487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28488          if test "x$FOUND_CORRECT_VERSION" = x; then
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28493            BOOT_JDK_FOUND=no
28494          else
28495            # We're done! :-)
28496            BOOT_JDK_FOUND=yes
28497
28498  # Only process if variable expands to non-empty
28499
28500  if test "x$BOOT_JDK" != x; then
28501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  path="$BOOT_JDK"
28506  new_path=`$CYGPATH -u "$path"`
28507
28508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28511  # "foo.exe" is OK but "foo" is an error.
28512  #
28513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28514  # It is also a way to make sure we got the proper file name for the real test later on.
28515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28516  if test "x$test_shortpath" = x; then
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28520  fi
28521
28522  # Call helper function which possibly converts this using DOS-style short mode.
28523  # If so, the updated path is stored in $new_path.
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28536      # Going to short mode and back again did indeed matter. Since short mode is
28537      # case insensitive, let's make it lowercase to improve readability.
28538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28539      # Now convert it back to Unix-style (cygpath)
28540      input_path=`$CYGPATH -u "$shortmode_path"`
28541      new_path="$input_path"
28542    fi
28543  fi
28544
28545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28546  if test "x$test_cygdrive_prefix" = x; then
28547    # As a simple fix, exclude /usr/bin since it's not a real path.
28548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28550      # a path prefixed by /cygdrive for fixpath to work.
28551      new_path="$CYGWIN_ROOT_PATH$input_path"
28552    fi
28553  fi
28554
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563
28564  path="$BOOT_JDK"
28565  has_colon=`$ECHO $path | $GREP ^.:`
28566  new_path="$path"
28567  if test "x$has_colon" = x; then
28568    # Not in mixed or Windows style, start by that.
28569    new_path=`cmd //c echo $path`
28570  fi
28571
28572
28573  input_path="$new_path"
28574  # Check if we need to convert this using DOS-style short mode. If the path
28575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28576  # take no chances and rewrite it.
28577  # Note: m4 eats our [], so we need to use [ and ] instead.
28578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28579  if test "x$has_forbidden_chars" != x; then
28580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28582  fi
28583
28584
28585  windows_path="$new_path"
28586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28587    unix_path=`$CYGPATH -u "$windows_path"`
28588    new_path="$unix_path"
28589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28591    new_path="$unix_path"
28592  fi
28593
28594  if test "x$path" != "x$new_path"; then
28595    BOOT_JDK="$new_path"
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28598  fi
28599
28600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28602
28603    else
28604      # We're on a unix platform. Hooray! :)
28605      path="$BOOT_JDK"
28606      has_space=`$ECHO "$path" | $GREP " "`
28607      if test "x$has_space" != x; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28611      fi
28612
28613      # Use eval to expand a potential ~
28614      eval path="$path"
28615      if test ! -f "$path" && test ! -d "$path"; then
28616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28617      fi
28618
28619      if test -d "$path"; then
28620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28621      else
28622        dir="`$DIRNAME "$path"`"
28623        base="`$BASENAME "$path"`"
28624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28625      fi
28626    fi
28627  fi
28628
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28630$as_echo_n "checking for Boot JDK... " >&6; }
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28632$as_echo "$BOOT_JDK" >&6; }
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28634$as_echo_n "checking Boot JDK version... " >&6; }
28635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28637$as_echo "$BOOT_JDK_VERSION" >&6; }
28638          fi # end check jdk version
28639        fi # end check javac
28640      fi # end check java
28641    fi # end check boot jdk found
28642  fi
28643
28644  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28645
28646  if test "x$BOOT_JDK_FOUND" = xno; then
28647    # Now execute the test
28648
28649  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28650  BOOT_JDK_SUFFIX="/Contents/Home"
28651  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28652  if test "x$ALL_JDKS_FOUND" != x; then
28653    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28654
28655  if test "x$BOOT_JDK_FOUND" = xno; then
28656    # Now execute the test
28657
28658        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28659        if test -d "$BOOT_JDK"; then
28660          BOOT_JDK_FOUND=maybe
28661          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28662$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28663        fi
28664
28665
28666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28668      # Do we have a bin/java?
28669      if test ! -x "$BOOT_JDK/bin/java"; then
28670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28672        BOOT_JDK_FOUND=no
28673      else
28674        # Do we have a bin/javac?
28675        if test ! -x "$BOOT_JDK/bin/javac"; then
28676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28680          BOOT_JDK_FOUND=no
28681        else
28682          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28683          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28684
28685          # Extra M4 quote needed to protect [] in grep expression.
28686          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28687          if test "x$FOUND_CORRECT_VERSION" = x; then
28688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28690            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28691$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28692            BOOT_JDK_FOUND=no
28693          else
28694            # We're done! :-)
28695            BOOT_JDK_FOUND=yes
28696
28697  # Only process if variable expands to non-empty
28698
28699  if test "x$BOOT_JDK" != x; then
28700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28701
28702  # Input might be given as Windows format, start by converting to
28703  # unix format.
28704  path="$BOOT_JDK"
28705  new_path=`$CYGPATH -u "$path"`
28706
28707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28710  # "foo.exe" is OK but "foo" is an error.
28711  #
28712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28713  # It is also a way to make sure we got the proper file name for the real test later on.
28714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28715  if test "x$test_shortpath" = x; then
28716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28719  fi
28720
28721  # Call helper function which possibly converts this using DOS-style short mode.
28722  # If so, the updated path is stored in $new_path.
28723
28724  input_path="$new_path"
28725  # Check if we need to convert this using DOS-style short mode. If the path
28726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28727  # take no chances and rewrite it.
28728  # Note: m4 eats our [], so we need to use [ and ] instead.
28729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28730  if test "x$has_forbidden_chars" != x; then
28731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28735      # Going to short mode and back again did indeed matter. Since short mode is
28736      # case insensitive, let's make it lowercase to improve readability.
28737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28738      # Now convert it back to Unix-style (cygpath)
28739      input_path=`$CYGPATH -u "$shortmode_path"`
28740      new_path="$input_path"
28741    fi
28742  fi
28743
28744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28745  if test "x$test_cygdrive_prefix" = x; then
28746    # As a simple fix, exclude /usr/bin since it's not a real path.
28747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28749      # a path prefixed by /cygdrive for fixpath to work.
28750      new_path="$CYGWIN_ROOT_PATH$input_path"
28751    fi
28752  fi
28753
28754
28755  if test "x$path" != "x$new_path"; then
28756    BOOT_JDK="$new_path"
28757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28759  fi
28760
28761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28762
28763  path="$BOOT_JDK"
28764  has_colon=`$ECHO $path | $GREP ^.:`
28765  new_path="$path"
28766  if test "x$has_colon" = x; then
28767    # Not in mixed or Windows style, start by that.
28768    new_path=`cmd //c echo $path`
28769  fi
28770
28771
28772  input_path="$new_path"
28773  # Check if we need to convert this using DOS-style short mode. If the path
28774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28775  # take no chances and rewrite it.
28776  # Note: m4 eats our [], so we need to use [ and ] instead.
28777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28778  if test "x$has_forbidden_chars" != x; then
28779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28781  fi
28782
28783
28784  windows_path="$new_path"
28785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28786    unix_path=`$CYGPATH -u "$windows_path"`
28787    new_path="$unix_path"
28788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28790    new_path="$unix_path"
28791  fi
28792
28793  if test "x$path" != "x$new_path"; then
28794    BOOT_JDK="$new_path"
28795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28797  fi
28798
28799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28801
28802    else
28803      # We're on a unix platform. Hooray! :)
28804      path="$BOOT_JDK"
28805      has_space=`$ECHO "$path" | $GREP " "`
28806      if test "x$has_space" != x; then
28807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28810      fi
28811
28812      # Use eval to expand a potential ~
28813      eval path="$path"
28814      if test ! -f "$path" && test ! -d "$path"; then
28815        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28816      fi
28817
28818      if test -d "$path"; then
28819        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28820      else
28821        dir="`$DIRNAME "$path"`"
28822        base="`$BASENAME "$path"`"
28823        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28824      fi
28825    fi
28826  fi
28827
28828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28829$as_echo_n "checking for Boot JDK... " >&6; }
28830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28831$as_echo "$BOOT_JDK" >&6; }
28832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28833$as_echo_n "checking Boot JDK version... " >&6; }
28834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28836$as_echo "$BOOT_JDK_VERSION" >&6; }
28837          fi # end check jdk version
28838        fi # end check javac
28839      fi # end check java
28840    fi # end check boot jdk found
28841  fi
28842
28843    done
28844  fi
28845
28846
28847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28849      # Do we have a bin/java?
28850      if test ! -x "$BOOT_JDK/bin/java"; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28853        BOOT_JDK_FOUND=no
28854      else
28855        # Do we have a bin/javac?
28856        if test ! -x "$BOOT_JDK/bin/javac"; then
28857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28861          BOOT_JDK_FOUND=no
28862        else
28863          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28864          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28865
28866          # Extra M4 quote needed to protect [] in grep expression.
28867          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28868          if test "x$FOUND_CORRECT_VERSION" = x; then
28869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28871            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28872$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28873            BOOT_JDK_FOUND=no
28874          else
28875            # We're done! :-)
28876            BOOT_JDK_FOUND=yes
28877
28878  # Only process if variable expands to non-empty
28879
28880  if test "x$BOOT_JDK" != x; then
28881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882
28883  # Input might be given as Windows format, start by converting to
28884  # unix format.
28885  path="$BOOT_JDK"
28886  new_path=`$CYGPATH -u "$path"`
28887
28888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28891  # "foo.exe" is OK but "foo" is an error.
28892  #
28893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28894  # It is also a way to make sure we got the proper file name for the real test later on.
28895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28896  if test "x$test_shortpath" = x; then
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28900  fi
28901
28902  # Call helper function which possibly converts this using DOS-style short mode.
28903  # If so, the updated path is stored in $new_path.
28904
28905  input_path="$new_path"
28906  # Check if we need to convert this using DOS-style short mode. If the path
28907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28908  # take no chances and rewrite it.
28909  # Note: m4 eats our [], so we need to use [ and ] instead.
28910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28911  if test "x$has_forbidden_chars" != x; then
28912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28916      # Going to short mode and back again did indeed matter. Since short mode is
28917      # case insensitive, let's make it lowercase to improve readability.
28918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28919      # Now convert it back to Unix-style (cygpath)
28920      input_path=`$CYGPATH -u "$shortmode_path"`
28921      new_path="$input_path"
28922    fi
28923  fi
28924
28925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28926  if test "x$test_cygdrive_prefix" = x; then
28927    # As a simple fix, exclude /usr/bin since it's not a real path.
28928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28930      # a path prefixed by /cygdrive for fixpath to work.
28931      new_path="$CYGWIN_ROOT_PATH$input_path"
28932    fi
28933  fi
28934
28935
28936  if test "x$path" != "x$new_path"; then
28937    BOOT_JDK="$new_path"
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28940  fi
28941
28942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943
28944  path="$BOOT_JDK"
28945  has_colon=`$ECHO $path | $GREP ^.:`
28946  new_path="$path"
28947  if test "x$has_colon" = x; then
28948    # Not in mixed or Windows style, start by that.
28949    new_path=`cmd //c echo $path`
28950  fi
28951
28952
28953  input_path="$new_path"
28954  # Check if we need to convert this using DOS-style short mode. If the path
28955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28956  # take no chances and rewrite it.
28957  # Note: m4 eats our [], so we need to use [ and ] instead.
28958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28959  if test "x$has_forbidden_chars" != x; then
28960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28962  fi
28963
28964
28965  windows_path="$new_path"
28966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28967    unix_path=`$CYGPATH -u "$windows_path"`
28968    new_path="$unix_path"
28969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28971    new_path="$unix_path"
28972  fi
28973
28974  if test "x$path" != "x$new_path"; then
28975    BOOT_JDK="$new_path"
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28978  fi
28979
28980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28982
28983    else
28984      # We're on a unix platform. Hooray! :)
28985      path="$BOOT_JDK"
28986      has_space=`$ECHO "$path" | $GREP " "`
28987      if test "x$has_space" != x; then
28988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28990        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28991      fi
28992
28993      # Use eval to expand a potential ~
28994      eval path="$path"
28995      if test ! -f "$path" && test ! -d "$path"; then
28996        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28997      fi
28998
28999      if test -d "$path"; then
29000        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29001      else
29002        dir="`$DIRNAME "$path"`"
29003        base="`$BASENAME "$path"`"
29004        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29005      fi
29006    fi
29007  fi
29008
29009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29010$as_echo_n "checking for Boot JDK... " >&6; }
29011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29012$as_echo "$BOOT_JDK" >&6; }
29013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29014$as_echo_n "checking Boot JDK version... " >&6; }
29015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29017$as_echo "$BOOT_JDK_VERSION" >&6; }
29018          fi # end check jdk version
29019        fi # end check javac
29020      fi # end check java
29021    fi # end check boot jdk found
29022  fi
29023
29024
29025  if test "x$BOOT_JDK_FOUND" = xno; then
29026    # Now execute the test
29027
29028  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29029  BOOT_JDK_SUFFIX="/Contents/Home"
29030  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29031  if test "x$ALL_JDKS_FOUND" != x; then
29032    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29033
29034  if test "x$BOOT_JDK_FOUND" = xno; then
29035    # Now execute the test
29036
29037        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29038        if test -d "$BOOT_JDK"; then
29039          BOOT_JDK_FOUND=maybe
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29041$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29042        fi
29043
29044
29045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29047      # Do we have a bin/java?
29048      if test ! -x "$BOOT_JDK/bin/java"; then
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29051        BOOT_JDK_FOUND=no
29052      else
29053        # Do we have a bin/javac?
29054        if test ! -x "$BOOT_JDK/bin/javac"; then
29055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29059          BOOT_JDK_FOUND=no
29060        else
29061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29063
29064          # Extra M4 quote needed to protect [] in grep expression.
29065          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29066          if test "x$FOUND_CORRECT_VERSION" = x; then
29067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29071            BOOT_JDK_FOUND=no
29072          else
29073            # We're done! :-)
29074            BOOT_JDK_FOUND=yes
29075
29076  # Only process if variable expands to non-empty
29077
29078  if test "x$BOOT_JDK" != x; then
29079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29080
29081  # Input might be given as Windows format, start by converting to
29082  # unix format.
29083  path="$BOOT_JDK"
29084  new_path=`$CYGPATH -u "$path"`
29085
29086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29089  # "foo.exe" is OK but "foo" is an error.
29090  #
29091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29092  # It is also a way to make sure we got the proper file name for the real test later on.
29093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29094  if test "x$test_shortpath" = x; then
29095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29098  fi
29099
29100  # Call helper function which possibly converts this using DOS-style short mode.
29101  # If so, the updated path is stored in $new_path.
29102
29103  input_path="$new_path"
29104  # Check if we need to convert this using DOS-style short mode. If the path
29105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29106  # take no chances and rewrite it.
29107  # Note: m4 eats our [], so we need to use [ and ] instead.
29108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29109  if test "x$has_forbidden_chars" != x; then
29110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29114      # Going to short mode and back again did indeed matter. Since short mode is
29115      # case insensitive, let's make it lowercase to improve readability.
29116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29117      # Now convert it back to Unix-style (cygpath)
29118      input_path=`$CYGPATH -u "$shortmode_path"`
29119      new_path="$input_path"
29120    fi
29121  fi
29122
29123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29124  if test "x$test_cygdrive_prefix" = x; then
29125    # As a simple fix, exclude /usr/bin since it's not a real path.
29126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29128      # a path prefixed by /cygdrive for fixpath to work.
29129      new_path="$CYGWIN_ROOT_PATH$input_path"
29130    fi
29131  fi
29132
29133
29134  if test "x$path" != "x$new_path"; then
29135    BOOT_JDK="$new_path"
29136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29138  fi
29139
29140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29141
29142  path="$BOOT_JDK"
29143  has_colon=`$ECHO $path | $GREP ^.:`
29144  new_path="$path"
29145  if test "x$has_colon" = x; then
29146    # Not in mixed or Windows style, start by that.
29147    new_path=`cmd //c echo $path`
29148  fi
29149
29150
29151  input_path="$new_path"
29152  # Check if we need to convert this using DOS-style short mode. If the path
29153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29154  # take no chances and rewrite it.
29155  # Note: m4 eats our [], so we need to use [ and ] instead.
29156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29157  if test "x$has_forbidden_chars" != x; then
29158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29160  fi
29161
29162
29163  windows_path="$new_path"
29164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29165    unix_path=`$CYGPATH -u "$windows_path"`
29166    new_path="$unix_path"
29167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29169    new_path="$unix_path"
29170  fi
29171
29172  if test "x$path" != "x$new_path"; then
29173    BOOT_JDK="$new_path"
29174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29176  fi
29177
29178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29180
29181    else
29182      # We're on a unix platform. Hooray! :)
29183      path="$BOOT_JDK"
29184      has_space=`$ECHO "$path" | $GREP " "`
29185      if test "x$has_space" != x; then
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29189      fi
29190
29191      # Use eval to expand a potential ~
29192      eval path="$path"
29193      if test ! -f "$path" && test ! -d "$path"; then
29194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29195      fi
29196
29197      if test -d "$path"; then
29198        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29199      else
29200        dir="`$DIRNAME "$path"`"
29201        base="`$BASENAME "$path"`"
29202        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29203      fi
29204    fi
29205  fi
29206
29207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29208$as_echo_n "checking for Boot JDK... " >&6; }
29209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29210$as_echo "$BOOT_JDK" >&6; }
29211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29212$as_echo_n "checking Boot JDK version... " >&6; }
29213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29215$as_echo "$BOOT_JDK_VERSION" >&6; }
29216          fi # end check jdk version
29217        fi # end check javac
29218      fi # end check java
29219    fi # end check boot jdk found
29220  fi
29221
29222    done
29223  fi
29224
29225
29226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29228      # Do we have a bin/java?
29229      if test ! -x "$BOOT_JDK/bin/java"; then
29230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29232        BOOT_JDK_FOUND=no
29233      else
29234        # Do we have a bin/javac?
29235        if test ! -x "$BOOT_JDK/bin/javac"; then
29236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29240          BOOT_JDK_FOUND=no
29241        else
29242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29244
29245          # Extra M4 quote needed to protect [] in grep expression.
29246          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29247          if test "x$FOUND_CORRECT_VERSION" = x; then
29248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29252            BOOT_JDK_FOUND=no
29253          else
29254            # We're done! :-)
29255            BOOT_JDK_FOUND=yes
29256
29257  # Only process if variable expands to non-empty
29258
29259  if test "x$BOOT_JDK" != x; then
29260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29261
29262  # Input might be given as Windows format, start by converting to
29263  # unix format.
29264  path="$BOOT_JDK"
29265  new_path=`$CYGPATH -u "$path"`
29266
29267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29270  # "foo.exe" is OK but "foo" is an error.
29271  #
29272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29273  # It is also a way to make sure we got the proper file name for the real test later on.
29274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29275  if test "x$test_shortpath" = x; then
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29279  fi
29280
29281  # Call helper function which possibly converts this using DOS-style short mode.
29282  # If so, the updated path is stored in $new_path.
29283
29284  input_path="$new_path"
29285  # Check if we need to convert this using DOS-style short mode. If the path
29286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29287  # take no chances and rewrite it.
29288  # Note: m4 eats our [], so we need to use [ and ] instead.
29289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29290  if test "x$has_forbidden_chars" != x; then
29291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29295      # Going to short mode and back again did indeed matter. Since short mode is
29296      # case insensitive, let's make it lowercase to improve readability.
29297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29298      # Now convert it back to Unix-style (cygpath)
29299      input_path=`$CYGPATH -u "$shortmode_path"`
29300      new_path="$input_path"
29301    fi
29302  fi
29303
29304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29305  if test "x$test_cygdrive_prefix" = x; then
29306    # As a simple fix, exclude /usr/bin since it's not a real path.
29307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29309      # a path prefixed by /cygdrive for fixpath to work.
29310      new_path="$CYGWIN_ROOT_PATH$input_path"
29311    fi
29312  fi
29313
29314
29315  if test "x$path" != "x$new_path"; then
29316    BOOT_JDK="$new_path"
29317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29319  fi
29320
29321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29322
29323  path="$BOOT_JDK"
29324  has_colon=`$ECHO $path | $GREP ^.:`
29325  new_path="$path"
29326  if test "x$has_colon" = x; then
29327    # Not in mixed or Windows style, start by that.
29328    new_path=`cmd //c echo $path`
29329  fi
29330
29331
29332  input_path="$new_path"
29333  # Check if we need to convert this using DOS-style short mode. If the path
29334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29335  # take no chances and rewrite it.
29336  # Note: m4 eats our [], so we need to use [ and ] instead.
29337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29338  if test "x$has_forbidden_chars" != x; then
29339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29341  fi
29342
29343
29344  windows_path="$new_path"
29345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29346    unix_path=`$CYGPATH -u "$windows_path"`
29347    new_path="$unix_path"
29348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29350    new_path="$unix_path"
29351  fi
29352
29353  if test "x$path" != "x$new_path"; then
29354    BOOT_JDK="$new_path"
29355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29357  fi
29358
29359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29361
29362    else
29363      # We're on a unix platform. Hooray! :)
29364      path="$BOOT_JDK"
29365      has_space=`$ECHO "$path" | $GREP " "`
29366      if test "x$has_space" != x; then
29367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29370      fi
29371
29372      # Use eval to expand a potential ~
29373      eval path="$path"
29374      if test ! -f "$path" && test ! -d "$path"; then
29375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29376      fi
29377
29378      if test -d "$path"; then
29379        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29380      else
29381        dir="`$DIRNAME "$path"`"
29382        base="`$BASENAME "$path"`"
29383        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29384      fi
29385    fi
29386  fi
29387
29388            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29389$as_echo_n "checking for Boot JDK... " >&6; }
29390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29391$as_echo "$BOOT_JDK" >&6; }
29392            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29393$as_echo_n "checking Boot JDK version... " >&6; }
29394            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29395            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29396$as_echo "$BOOT_JDK_VERSION" >&6; }
29397          fi # end check jdk version
29398        fi # end check javac
29399      fi # end check java
29400    fi # end check boot jdk found
29401  fi
29402
29403  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29404
29405  if test "x$BOOT_JDK_FOUND" = xno; then
29406    # Now execute the test
29407
29408  BOOT_JDK_PREFIX="/usr/lib/jvm"
29409  BOOT_JDK_SUFFIX=""
29410  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29411  if test "x$ALL_JDKS_FOUND" != x; then
29412    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29413
29414  if test "x$BOOT_JDK_FOUND" = xno; then
29415    # Now execute the test
29416
29417        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29418        if test -d "$BOOT_JDK"; then
29419          BOOT_JDK_FOUND=maybe
29420          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29421$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29422        fi
29423
29424
29425    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29426    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29427      # Do we have a bin/java?
29428      if test ! -x "$BOOT_JDK/bin/java"; then
29429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29431        BOOT_JDK_FOUND=no
29432      else
29433        # Do we have a bin/javac?
29434        if test ! -x "$BOOT_JDK/bin/javac"; then
29435          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29437          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29438$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29439          BOOT_JDK_FOUND=no
29440        else
29441          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29442          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29443
29444          # Extra M4 quote needed to protect [] in grep expression.
29445          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29446          if test "x$FOUND_CORRECT_VERSION" = x; then
29447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29449            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29450$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29451            BOOT_JDK_FOUND=no
29452          else
29453            # We're done! :-)
29454            BOOT_JDK_FOUND=yes
29455
29456  # Only process if variable expands to non-empty
29457
29458  if test "x$BOOT_JDK" != x; then
29459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460
29461  # Input might be given as Windows format, start by converting to
29462  # unix format.
29463  path="$BOOT_JDK"
29464  new_path=`$CYGPATH -u "$path"`
29465
29466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29469  # "foo.exe" is OK but "foo" is an error.
29470  #
29471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29472  # It is also a way to make sure we got the proper file name for the real test later on.
29473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29474  if test "x$test_shortpath" = x; then
29475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29477    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29478  fi
29479
29480  # Call helper function which possibly converts this using DOS-style short mode.
29481  # If so, the updated path is stored in $new_path.
29482
29483  input_path="$new_path"
29484  # Check if we need to convert this using DOS-style short mode. If the path
29485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29486  # take no chances and rewrite it.
29487  # Note: m4 eats our [], so we need to use [ and ] instead.
29488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29489  if test "x$has_forbidden_chars" != x; then
29490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29494      # Going to short mode and back again did indeed matter. Since short mode is
29495      # case insensitive, let's make it lowercase to improve readability.
29496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29497      # Now convert it back to Unix-style (cygpath)
29498      input_path=`$CYGPATH -u "$shortmode_path"`
29499      new_path="$input_path"
29500    fi
29501  fi
29502
29503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29504  if test "x$test_cygdrive_prefix" = x; then
29505    # As a simple fix, exclude /usr/bin since it's not a real path.
29506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29508      # a path prefixed by /cygdrive for fixpath to work.
29509      new_path="$CYGWIN_ROOT_PATH$input_path"
29510    fi
29511  fi
29512
29513
29514  if test "x$path" != "x$new_path"; then
29515    BOOT_JDK="$new_path"
29516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29518  fi
29519
29520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29521
29522  path="$BOOT_JDK"
29523  has_colon=`$ECHO $path | $GREP ^.:`
29524  new_path="$path"
29525  if test "x$has_colon" = x; then
29526    # Not in mixed or Windows style, start by that.
29527    new_path=`cmd //c echo $path`
29528  fi
29529
29530
29531  input_path="$new_path"
29532  # Check if we need to convert this using DOS-style short mode. If the path
29533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29534  # take no chances and rewrite it.
29535  # Note: m4 eats our [], so we need to use [ and ] instead.
29536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29537  if test "x$has_forbidden_chars" != x; then
29538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29540  fi
29541
29542
29543  windows_path="$new_path"
29544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29545    unix_path=`$CYGPATH -u "$windows_path"`
29546    new_path="$unix_path"
29547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29549    new_path="$unix_path"
29550  fi
29551
29552  if test "x$path" != "x$new_path"; then
29553    BOOT_JDK="$new_path"
29554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29556  fi
29557
29558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29560
29561    else
29562      # We're on a unix platform. Hooray! :)
29563      path="$BOOT_JDK"
29564      has_space=`$ECHO "$path" | $GREP " "`
29565      if test "x$has_space" != x; then
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29569      fi
29570
29571      # Use eval to expand a potential ~
29572      eval path="$path"
29573      if test ! -f "$path" && test ! -d "$path"; then
29574        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29575      fi
29576
29577      if test -d "$path"; then
29578        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29579      else
29580        dir="`$DIRNAME "$path"`"
29581        base="`$BASENAME "$path"`"
29582        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29583      fi
29584    fi
29585  fi
29586
29587            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29588$as_echo_n "checking for Boot JDK... " >&6; }
29589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29590$as_echo "$BOOT_JDK" >&6; }
29591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29592$as_echo_n "checking Boot JDK version... " >&6; }
29593            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29595$as_echo "$BOOT_JDK_VERSION" >&6; }
29596          fi # end check jdk version
29597        fi # end check javac
29598      fi # end check java
29599    fi # end check boot jdk found
29600  fi
29601
29602    done
29603  fi
29604
29605
29606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29608      # Do we have a bin/java?
29609      if test ! -x "$BOOT_JDK/bin/java"; then
29610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29612        BOOT_JDK_FOUND=no
29613      else
29614        # Do we have a bin/javac?
29615        if test ! -x "$BOOT_JDK/bin/javac"; then
29616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29620          BOOT_JDK_FOUND=no
29621        else
29622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29624
29625          # Extra M4 quote needed to protect [] in grep expression.
29626          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29627          if test "x$FOUND_CORRECT_VERSION" = x; then
29628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29632            BOOT_JDK_FOUND=no
29633          else
29634            # We're done! :-)
29635            BOOT_JDK_FOUND=yes
29636
29637  # Only process if variable expands to non-empty
29638
29639  if test "x$BOOT_JDK" != x; then
29640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641
29642  # Input might be given as Windows format, start by converting to
29643  # unix format.
29644  path="$BOOT_JDK"
29645  new_path=`$CYGPATH -u "$path"`
29646
29647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29650  # "foo.exe" is OK but "foo" is an error.
29651  #
29652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29653  # It is also a way to make sure we got the proper file name for the real test later on.
29654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29655  if test "x$test_shortpath" = x; then
29656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29659  fi
29660
29661  # Call helper function which possibly converts this using DOS-style short mode.
29662  # If so, the updated path is stored in $new_path.
29663
29664  input_path="$new_path"
29665  # Check if we need to convert this using DOS-style short mode. If the path
29666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29667  # take no chances and rewrite it.
29668  # Note: m4 eats our [], so we need to use [ and ] instead.
29669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29670  if test "x$has_forbidden_chars" != x; then
29671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29675      # Going to short mode and back again did indeed matter. Since short mode is
29676      # case insensitive, let's make it lowercase to improve readability.
29677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29678      # Now convert it back to Unix-style (cygpath)
29679      input_path=`$CYGPATH -u "$shortmode_path"`
29680      new_path="$input_path"
29681    fi
29682  fi
29683
29684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29685  if test "x$test_cygdrive_prefix" = x; then
29686    # As a simple fix, exclude /usr/bin since it's not a real path.
29687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29689      # a path prefixed by /cygdrive for fixpath to work.
29690      new_path="$CYGWIN_ROOT_PATH$input_path"
29691    fi
29692  fi
29693
29694
29695  if test "x$path" != "x$new_path"; then
29696    BOOT_JDK="$new_path"
29697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29699  fi
29700
29701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702
29703  path="$BOOT_JDK"
29704  has_colon=`$ECHO $path | $GREP ^.:`
29705  new_path="$path"
29706  if test "x$has_colon" = x; then
29707    # Not in mixed or Windows style, start by that.
29708    new_path=`cmd //c echo $path`
29709  fi
29710
29711
29712  input_path="$new_path"
29713  # Check if we need to convert this using DOS-style short mode. If the path
29714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29715  # take no chances and rewrite it.
29716  # Note: m4 eats our [], so we need to use [ and ] instead.
29717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29718  if test "x$has_forbidden_chars" != x; then
29719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29721  fi
29722
29723
29724  windows_path="$new_path"
29725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29726    unix_path=`$CYGPATH -u "$windows_path"`
29727    new_path="$unix_path"
29728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29730    new_path="$unix_path"
29731  fi
29732
29733  if test "x$path" != "x$new_path"; then
29734    BOOT_JDK="$new_path"
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29737  fi
29738
29739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29741
29742    else
29743      # We're on a unix platform. Hooray! :)
29744      path="$BOOT_JDK"
29745      has_space=`$ECHO "$path" | $GREP " "`
29746      if test "x$has_space" != x; then
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29750      fi
29751
29752      # Use eval to expand a potential ~
29753      eval path="$path"
29754      if test ! -f "$path" && test ! -d "$path"; then
29755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29756      fi
29757
29758      if test -d "$path"; then
29759        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29760      else
29761        dir="`$DIRNAME "$path"`"
29762        base="`$BASENAME "$path"`"
29763        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29764      fi
29765    fi
29766  fi
29767
29768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29769$as_echo_n "checking for Boot JDK... " >&6; }
29770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29771$as_echo "$BOOT_JDK" >&6; }
29772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29773$as_echo_n "checking Boot JDK version... " >&6; }
29774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29776$as_echo "$BOOT_JDK_VERSION" >&6; }
29777          fi # end check jdk version
29778        fi # end check javac
29779      fi # end check java
29780    fi # end check boot jdk found
29781  fi
29782
29783  fi
29784
29785
29786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29788      # Do we have a bin/java?
29789      if test ! -x "$BOOT_JDK/bin/java"; then
29790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29792        BOOT_JDK_FOUND=no
29793      else
29794        # Do we have a bin/javac?
29795        if test ! -x "$BOOT_JDK/bin/javac"; then
29796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29800          BOOT_JDK_FOUND=no
29801        else
29802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29804
29805          # Extra M4 quote needed to protect [] in grep expression.
29806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29807          if test "x$FOUND_CORRECT_VERSION" = x; then
29808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29812            BOOT_JDK_FOUND=no
29813          else
29814            # We're done! :-)
29815            BOOT_JDK_FOUND=yes
29816
29817  # Only process if variable expands to non-empty
29818
29819  if test "x$BOOT_JDK" != x; then
29820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29821
29822  # Input might be given as Windows format, start by converting to
29823  # unix format.
29824  path="$BOOT_JDK"
29825  new_path=`$CYGPATH -u "$path"`
29826
29827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29830  # "foo.exe" is OK but "foo" is an error.
29831  #
29832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29833  # It is also a way to make sure we got the proper file name for the real test later on.
29834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29835  if test "x$test_shortpath" = x; then
29836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29839  fi
29840
29841  # Call helper function which possibly converts this using DOS-style short mode.
29842  # If so, the updated path is stored in $new_path.
29843
29844  input_path="$new_path"
29845  # Check if we need to convert this using DOS-style short mode. If the path
29846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29847  # take no chances and rewrite it.
29848  # Note: m4 eats our [], so we need to use [ and ] instead.
29849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29850  if test "x$has_forbidden_chars" != x; then
29851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29855      # Going to short mode and back again did indeed matter. Since short mode is
29856      # case insensitive, let's make it lowercase to improve readability.
29857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29858      # Now convert it back to Unix-style (cygpath)
29859      input_path=`$CYGPATH -u "$shortmode_path"`
29860      new_path="$input_path"
29861    fi
29862  fi
29863
29864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29865  if test "x$test_cygdrive_prefix" = x; then
29866    # As a simple fix, exclude /usr/bin since it's not a real path.
29867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29869      # a path prefixed by /cygdrive for fixpath to work.
29870      new_path="$CYGWIN_ROOT_PATH$input_path"
29871    fi
29872  fi
29873
29874
29875  if test "x$path" != "x$new_path"; then
29876    BOOT_JDK="$new_path"
29877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29879  fi
29880
29881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29882
29883  path="$BOOT_JDK"
29884  has_colon=`$ECHO $path | $GREP ^.:`
29885  new_path="$path"
29886  if test "x$has_colon" = x; then
29887    # Not in mixed or Windows style, start by that.
29888    new_path=`cmd //c echo $path`
29889  fi
29890
29891
29892  input_path="$new_path"
29893  # Check if we need to convert this using DOS-style short mode. If the path
29894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29895  # take no chances and rewrite it.
29896  # Note: m4 eats our [], so we need to use [ and ] instead.
29897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29898  if test "x$has_forbidden_chars" != x; then
29899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29901  fi
29902
29903
29904  windows_path="$new_path"
29905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29906    unix_path=`$CYGPATH -u "$windows_path"`
29907    new_path="$unix_path"
29908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29910    new_path="$unix_path"
29911  fi
29912
29913  if test "x$path" != "x$new_path"; then
29914    BOOT_JDK="$new_path"
29915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29917  fi
29918
29919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29921
29922    else
29923      # We're on a unix platform. Hooray! :)
29924      path="$BOOT_JDK"
29925      has_space=`$ECHO "$path" | $GREP " "`
29926      if test "x$has_space" != x; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29930      fi
29931
29932      # Use eval to expand a potential ~
29933      eval path="$path"
29934      if test ! -f "$path" && test ! -d "$path"; then
29935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29936      fi
29937
29938      if test -d "$path"; then
29939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29940      else
29941        dir="`$DIRNAME "$path"`"
29942        base="`$BASENAME "$path"`"
29943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29944      fi
29945    fi
29946  fi
29947
29948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29949$as_echo_n "checking for Boot JDK... " >&6; }
29950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29951$as_echo "$BOOT_JDK" >&6; }
29952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29953$as_echo_n "checking Boot JDK version... " >&6; }
29954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29956$as_echo "$BOOT_JDK_VERSION" >&6; }
29957          fi # end check jdk version
29958        fi # end check javac
29959      fi # end check java
29960    fi # end check boot jdk found
29961  fi
29962
29963
29964  # If we haven't found anything yet, we've truly lost. Give up.
29965  if test "x$BOOT_JDK_FOUND" = xno; then
29966
29967  # Print a helpful message on how to acquire the necessary build dependency.
29968  # openjdk is the help tag: freetype, cups, alsa etc
29969  MISSING_DEPENDENCY=openjdk
29970
29971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29972    cygwin_help $MISSING_DEPENDENCY
29973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29974    msys_help $MISSING_DEPENDENCY
29975  else
29976    PKGHANDLER_COMMAND=
29977
29978    case $PKGHANDLER in
29979      apt-get)
29980        apt_help     $MISSING_DEPENDENCY ;;
29981      yum)
29982        yum_help     $MISSING_DEPENDENCY ;;
29983      brew)
29984        brew_help    $MISSING_DEPENDENCY ;;
29985      port)
29986        port_help    $MISSING_DEPENDENCY ;;
29987      pkgutil)
29988        pkgutil_help $MISSING_DEPENDENCY ;;
29989      pkgadd)
29990        pkgadd_help  $MISSING_DEPENDENCY ;;
29991    esac
29992
29993    if test "x$PKGHANDLER_COMMAND" != x; then
29994      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29995    fi
29996  fi
29997
29998    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29999$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30000    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30001$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30002    as_fn_error $? "Cannot continue" "$LINENO" 5
30003  fi
30004
30005
30006
30007  # Setup tools from the Boot JDK.
30008
30009  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30010
30011  # Publish this variable in the help.
30012
30013
30014  if [ -z "${JAVA+x}" ]; then
30015    # The variable is not set by user, try to locate tool using the code snippet
30016
30017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30018$as_echo_n "checking for java in Boot JDK... " >&6; }
30019      JAVA=$BOOT_JDK/bin/java
30020      if test ! -x $JAVA; then
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022$as_echo "not found" >&6; }
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30024$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30025        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30026      fi
30027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30028$as_echo "ok" >&6; }
30029
30030
30031  else
30032    # The variable is set, but is it from the command line or the environment?
30033
30034    # Try to remove the string !JAVA! from our list.
30035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30037      # If it failed, the variable was not from the command line. Ignore it,
30038      # but warn the user (except for BASH, which is always set by the calling BASH).
30039      if test "xJAVA" != xBASH; then
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30041$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30042      fi
30043      # Try to locate tool using the code snippet
30044
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30046$as_echo_n "checking for java in Boot JDK... " >&6; }
30047      JAVA=$BOOT_JDK/bin/java
30048      if test ! -x $JAVA; then
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30052$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30053        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30054      fi
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30056$as_echo "ok" >&6; }
30057
30058
30059    else
30060      # If it succeeded, then it was overridden by the user. We will use it
30061      # for the tool.
30062
30063      # First remove it from the list of overridden variables, so we can test
30064      # for unknown variables in the end.
30065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30066
30067      # Check if we try to supply an empty value
30068      if test "x$JAVA" = x; then
30069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30070$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30072$as_echo_n "checking for JAVA... " >&6; }
30073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30074$as_echo "disabled" >&6; }
30075      else
30076        # Check if the provided tool contains a complete path.
30077        tool_specified="$JAVA"
30078        tool_basename="${tool_specified##*/}"
30079        if test "x$tool_basename" = "x$tool_specified"; then
30080          # A command without a complete path is provided, search $PATH.
30081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30082$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30083          # Extract the first word of "$tool_basename", so it can be a program name with args.
30084set dummy $tool_basename; ac_word=$2
30085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30086$as_echo_n "checking for $ac_word... " >&6; }
30087if ${ac_cv_path_JAVA+:} false; then :
30088  $as_echo_n "(cached) " >&6
30089else
30090  case $JAVA in
30091  [\\/]* | ?:[\\/]*)
30092  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30093  ;;
30094  *)
30095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30096for as_dir in $PATH
30097do
30098  IFS=$as_save_IFS
30099  test -z "$as_dir" && as_dir=.
30100    for ac_exec_ext in '' $ac_executable_extensions; do
30101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30102    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30104    break 2
30105  fi
30106done
30107  done
30108IFS=$as_save_IFS
30109
30110  ;;
30111esac
30112fi
30113JAVA=$ac_cv_path_JAVA
30114if test -n "$JAVA"; then
30115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30116$as_echo "$JAVA" >&6; }
30117else
30118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30119$as_echo "no" >&6; }
30120fi
30121
30122
30123          if test "x$JAVA" = x; then
30124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30125          fi
30126        else
30127          # Otherwise we believe it is a complete path. Use it as it is.
30128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30129$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30131$as_echo_n "checking for JAVA... " >&6; }
30132          if test ! -x "$tool_specified"; then
30133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30134$as_echo "not found" >&6; }
30135            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30136          fi
30137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30138$as_echo "$tool_specified" >&6; }
30139        fi
30140      fi
30141    fi
30142
30143  fi
30144
30145
30146
30147  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30148
30149  # Publish this variable in the help.
30150
30151
30152  if [ -z "${JAVAC+x}" ]; then
30153    # The variable is not set by user, try to locate tool using the code snippet
30154
30155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30156$as_echo_n "checking for javac in Boot JDK... " >&6; }
30157      JAVAC=$BOOT_JDK/bin/javac
30158      if test ! -x $JAVAC; then
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30160$as_echo "not found" >&6; }
30161        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30162$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30163        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30164      fi
30165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30166$as_echo "ok" >&6; }
30167
30168
30169  else
30170    # The variable is set, but is it from the command line or the environment?
30171
30172    # Try to remove the string !JAVAC! from our list.
30173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30175      # If it failed, the variable was not from the command line. Ignore it,
30176      # but warn the user (except for BASH, which is always set by the calling BASH).
30177      if test "xJAVAC" != xBASH; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30179$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30180      fi
30181      # Try to locate tool using the code snippet
30182
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30184$as_echo_n "checking for javac in Boot JDK... " >&6; }
30185      JAVAC=$BOOT_JDK/bin/javac
30186      if test ! -x $JAVAC; then
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30190$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30191        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30192      fi
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30194$as_echo "ok" >&6; }
30195
30196
30197    else
30198      # If it succeeded, then it was overridden by the user. We will use it
30199      # for the tool.
30200
30201      # First remove it from the list of overridden variables, so we can test
30202      # for unknown variables in the end.
30203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30204
30205      # Check if we try to supply an empty value
30206      if test "x$JAVAC" = x; then
30207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30208$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30210$as_echo_n "checking for JAVAC... " >&6; }
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30212$as_echo "disabled" >&6; }
30213      else
30214        # Check if the provided tool contains a complete path.
30215        tool_specified="$JAVAC"
30216        tool_basename="${tool_specified##*/}"
30217        if test "x$tool_basename" = "x$tool_specified"; then
30218          # A command without a complete path is provided, search $PATH.
30219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30220$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30221          # Extract the first word of "$tool_basename", so it can be a program name with args.
30222set dummy $tool_basename; ac_word=$2
30223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30224$as_echo_n "checking for $ac_word... " >&6; }
30225if ${ac_cv_path_JAVAC+:} false; then :
30226  $as_echo_n "(cached) " >&6
30227else
30228  case $JAVAC in
30229  [\\/]* | ?:[\\/]*)
30230  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30231  ;;
30232  *)
30233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30234for as_dir in $PATH
30235do
30236  IFS=$as_save_IFS
30237  test -z "$as_dir" && as_dir=.
30238    for ac_exec_ext in '' $ac_executable_extensions; do
30239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30240    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30242    break 2
30243  fi
30244done
30245  done
30246IFS=$as_save_IFS
30247
30248  ;;
30249esac
30250fi
30251JAVAC=$ac_cv_path_JAVAC
30252if test -n "$JAVAC"; then
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30254$as_echo "$JAVAC" >&6; }
30255else
30256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30257$as_echo "no" >&6; }
30258fi
30259
30260
30261          if test "x$JAVAC" = x; then
30262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30263          fi
30264        else
30265          # Otherwise we believe it is a complete path. Use it as it is.
30266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30267$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30269$as_echo_n "checking for JAVAC... " >&6; }
30270          if test ! -x "$tool_specified"; then
30271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30272$as_echo "not found" >&6; }
30273            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30274          fi
30275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30276$as_echo "$tool_specified" >&6; }
30277        fi
30278      fi
30279    fi
30280
30281  fi
30282
30283
30284
30285  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30286
30287  # Publish this variable in the help.
30288
30289
30290  if [ -z "${JAVAH+x}" ]; then
30291    # The variable is not set by user, try to locate tool using the code snippet
30292
30293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30294$as_echo_n "checking for javah in Boot JDK... " >&6; }
30295      JAVAH=$BOOT_JDK/bin/javah
30296      if test ! -x $JAVAH; then
30297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30298$as_echo "not found" >&6; }
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30300$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30301        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30302      fi
30303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30304$as_echo "ok" >&6; }
30305
30306
30307  else
30308    # The variable is set, but is it from the command line or the environment?
30309
30310    # Try to remove the string !JAVAH! from our list.
30311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30313      # If it failed, the variable was not from the command line. Ignore it,
30314      # but warn the user (except for BASH, which is always set by the calling BASH).
30315      if test "xJAVAH" != xBASH; then
30316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30317$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30318      fi
30319      # Try to locate tool using the code snippet
30320
30321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30322$as_echo_n "checking for javah in Boot JDK... " >&6; }
30323      JAVAH=$BOOT_JDK/bin/javah
30324      if test ! -x $JAVAH; then
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30328$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30329        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30330      fi
30331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30332$as_echo "ok" >&6; }
30333
30334
30335    else
30336      # If it succeeded, then it was overridden by the user. We will use it
30337      # for the tool.
30338
30339      # First remove it from the list of overridden variables, so we can test
30340      # for unknown variables in the end.
30341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30342
30343      # Check if we try to supply an empty value
30344      if test "x$JAVAH" = x; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30346$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30348$as_echo_n "checking for JAVAH... " >&6; }
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30350$as_echo "disabled" >&6; }
30351      else
30352        # Check if the provided tool contains a complete path.
30353        tool_specified="$JAVAH"
30354        tool_basename="${tool_specified##*/}"
30355        if test "x$tool_basename" = "x$tool_specified"; then
30356          # A command without a complete path is provided, search $PATH.
30357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30358$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30359          # Extract the first word of "$tool_basename", so it can be a program name with args.
30360set dummy $tool_basename; ac_word=$2
30361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30362$as_echo_n "checking for $ac_word... " >&6; }
30363if ${ac_cv_path_JAVAH+:} false; then :
30364  $as_echo_n "(cached) " >&6
30365else
30366  case $JAVAH in
30367  [\\/]* | ?:[\\/]*)
30368  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30369  ;;
30370  *)
30371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30372for as_dir in $PATH
30373do
30374  IFS=$as_save_IFS
30375  test -z "$as_dir" && as_dir=.
30376    for ac_exec_ext in '' $ac_executable_extensions; do
30377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30378    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30380    break 2
30381  fi
30382done
30383  done
30384IFS=$as_save_IFS
30385
30386  ;;
30387esac
30388fi
30389JAVAH=$ac_cv_path_JAVAH
30390if test -n "$JAVAH"; then
30391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30392$as_echo "$JAVAH" >&6; }
30393else
30394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30395$as_echo "no" >&6; }
30396fi
30397
30398
30399          if test "x$JAVAH" = x; then
30400            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30401          fi
30402        else
30403          # Otherwise we believe it is a complete path. Use it as it is.
30404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30405$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30406          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30407$as_echo_n "checking for JAVAH... " >&6; }
30408          if test ! -x "$tool_specified"; then
30409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30410$as_echo "not found" >&6; }
30411            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30412          fi
30413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30414$as_echo "$tool_specified" >&6; }
30415        fi
30416      fi
30417    fi
30418
30419  fi
30420
30421
30422
30423  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30424
30425  # Publish this variable in the help.
30426
30427
30428  if [ -z "${JAR+x}" ]; then
30429    # The variable is not set by user, try to locate tool using the code snippet
30430
30431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30432$as_echo_n "checking for jar in Boot JDK... " >&6; }
30433      JAR=$BOOT_JDK/bin/jar
30434      if test ! -x $JAR; then
30435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30436$as_echo "not found" >&6; }
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30438$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30439        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30440      fi
30441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30442$as_echo "ok" >&6; }
30443
30444
30445  else
30446    # The variable is set, but is it from the command line or the environment?
30447
30448    # Try to remove the string !JAR! from our list.
30449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30451      # If it failed, the variable was not from the command line. Ignore it,
30452      # but warn the user (except for BASH, which is always set by the calling BASH).
30453      if test "xJAR" != xBASH; then
30454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30455$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30456      fi
30457      # Try to locate tool using the code snippet
30458
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30460$as_echo_n "checking for jar in Boot JDK... " >&6; }
30461      JAR=$BOOT_JDK/bin/jar
30462      if test ! -x $JAR; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30466$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30467        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30468      fi
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30470$as_echo "ok" >&6; }
30471
30472
30473    else
30474      # If it succeeded, then it was overridden by the user. We will use it
30475      # for the tool.
30476
30477      # First remove it from the list of overridden variables, so we can test
30478      # for unknown variables in the end.
30479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30480
30481      # Check if we try to supply an empty value
30482      if test "x$JAR" = x; then
30483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30484$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30486$as_echo_n "checking for JAR... " >&6; }
30487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30488$as_echo "disabled" >&6; }
30489      else
30490        # Check if the provided tool contains a complete path.
30491        tool_specified="$JAR"
30492        tool_basename="${tool_specified##*/}"
30493        if test "x$tool_basename" = "x$tool_specified"; then
30494          # A command without a complete path is provided, search $PATH.
30495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30496$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30497          # Extract the first word of "$tool_basename", so it can be a program name with args.
30498set dummy $tool_basename; ac_word=$2
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30500$as_echo_n "checking for $ac_word... " >&6; }
30501if ${ac_cv_path_JAR+:} false; then :
30502  $as_echo_n "(cached) " >&6
30503else
30504  case $JAR in
30505  [\\/]* | ?:[\\/]*)
30506  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30507  ;;
30508  *)
30509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30510for as_dir in $PATH
30511do
30512  IFS=$as_save_IFS
30513  test -z "$as_dir" && as_dir=.
30514    for ac_exec_ext in '' $ac_executable_extensions; do
30515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30516    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30518    break 2
30519  fi
30520done
30521  done
30522IFS=$as_save_IFS
30523
30524  ;;
30525esac
30526fi
30527JAR=$ac_cv_path_JAR
30528if test -n "$JAR"; then
30529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30530$as_echo "$JAR" >&6; }
30531else
30532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30533$as_echo "no" >&6; }
30534fi
30535
30536
30537          if test "x$JAR" = x; then
30538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30539          fi
30540        else
30541          # Otherwise we believe it is a complete path. Use it as it is.
30542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30543$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30545$as_echo_n "checking for JAR... " >&6; }
30546          if test ! -x "$tool_specified"; then
30547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548$as_echo "not found" >&6; }
30549            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30550          fi
30551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30552$as_echo "$tool_specified" >&6; }
30553        fi
30554      fi
30555    fi
30556
30557  fi
30558
30559
30560
30561  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30562
30563  # Publish this variable in the help.
30564
30565
30566  if [ -z "${JARSIGNER+x}" ]; then
30567    # The variable is not set by user, try to locate tool using the code snippet
30568
30569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30570$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30571      JARSIGNER=$BOOT_JDK/bin/jarsigner
30572      if test ! -x $JARSIGNER; then
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30574$as_echo "not found" >&6; }
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30576$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30577        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30578      fi
30579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30580$as_echo "ok" >&6; }
30581
30582
30583  else
30584    # The variable is set, but is it from the command line or the environment?
30585
30586    # Try to remove the string !JARSIGNER! from our list.
30587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30589      # If it failed, the variable was not from the command line. Ignore it,
30590      # but warn the user (except for BASH, which is always set by the calling BASH).
30591      if test "xJARSIGNER" != xBASH; then
30592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30593$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30594      fi
30595      # Try to locate tool using the code snippet
30596
30597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30598$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30599      JARSIGNER=$BOOT_JDK/bin/jarsigner
30600      if test ! -x $JARSIGNER; then
30601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30602$as_echo "not found" >&6; }
30603        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30604$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30605        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30606      fi
30607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30608$as_echo "ok" >&6; }
30609
30610
30611    else
30612      # If it succeeded, then it was overridden by the user. We will use it
30613      # for the tool.
30614
30615      # First remove it from the list of overridden variables, so we can test
30616      # for unknown variables in the end.
30617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30618
30619      # Check if we try to supply an empty value
30620      if test "x$JARSIGNER" = x; then
30621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30622$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30624$as_echo_n "checking for JARSIGNER... " >&6; }
30625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30626$as_echo "disabled" >&6; }
30627      else
30628        # Check if the provided tool contains a complete path.
30629        tool_specified="$JARSIGNER"
30630        tool_basename="${tool_specified##*/}"
30631        if test "x$tool_basename" = "x$tool_specified"; then
30632          # A command without a complete path is provided, search $PATH.
30633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30634$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30635          # Extract the first word of "$tool_basename", so it can be a program name with args.
30636set dummy $tool_basename; ac_word=$2
30637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30638$as_echo_n "checking for $ac_word... " >&6; }
30639if ${ac_cv_path_JARSIGNER+:} false; then :
30640  $as_echo_n "(cached) " >&6
30641else
30642  case $JARSIGNER in
30643  [\\/]* | ?:[\\/]*)
30644  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30645  ;;
30646  *)
30647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30648for as_dir in $PATH
30649do
30650  IFS=$as_save_IFS
30651  test -z "$as_dir" && as_dir=.
30652    for ac_exec_ext in '' $ac_executable_extensions; do
30653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30654    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30656    break 2
30657  fi
30658done
30659  done
30660IFS=$as_save_IFS
30661
30662  ;;
30663esac
30664fi
30665JARSIGNER=$ac_cv_path_JARSIGNER
30666if test -n "$JARSIGNER"; then
30667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30668$as_echo "$JARSIGNER" >&6; }
30669else
30670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30671$as_echo "no" >&6; }
30672fi
30673
30674
30675          if test "x$JARSIGNER" = x; then
30676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30677          fi
30678        else
30679          # Otherwise we believe it is a complete path. Use it as it is.
30680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30681$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30683$as_echo_n "checking for JARSIGNER... " >&6; }
30684          if test ! -x "$tool_specified"; then
30685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30686$as_echo "not found" >&6; }
30687            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30688          fi
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30690$as_echo "$tool_specified" >&6; }
30691        fi
30692      fi
30693    fi
30694
30695  fi
30696
30697
30698
30699  # Finally, set some other options...
30700
30701  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30702  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30703
30704
30705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30706$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30707  if "$JAVA" --list-modules > /dev/null 2>&1; then
30708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30709$as_echo "yes" >&6; }
30710    BOOT_JDK_MODULAR="true"
30711  else
30712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30713$as_echo "no" >&6; }
30714    BOOT_JDK_MODULAR="false"
30715  fi
30716
30717
30718
30719
30720  # Check if the boot jdk is 32 or 64 bit
30721  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30722    BOOT_JDK_BITS="64"
30723  else
30724    BOOT_JDK_BITS="32"
30725  fi
30726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30727$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30729$as_echo "$BOOT_JDK_BITS" >&6; }
30730
30731
30732
30733
30734# Check whether --with-build-jdk was given.
30735if test "${with_build_jdk+set}" = set; then :
30736  withval=$with_build_jdk;
30737fi
30738
30739
30740  CREATE_BUILDJDK=false
30741  EXTERNAL_BUILDJDK=false
30742  BUILD_JDK_FOUND="no"
30743  if test "x$with_build_jdk" != "x"; then
30744
30745  if test "x$BUILD_JDK_FOUND" = xno; then
30746    # Execute the test
30747
30748       if test "x$with_build_jdk" != x; then
30749         BUILD_JDK=$with_build_jdk
30750         BUILD_JDK_FOUND=maybe
30751         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30752$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30753       fi
30754
30755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30756    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30757      # Do we have a bin/java?
30758      if test ! -x "$BUILD_JDK/bin/java"; then
30759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30760$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30761        BUILD_JDK_FOUND=no
30762      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30764$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30765        BUILD_JDK_FOUND=no
30766      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30768$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30769        BUILD_JDK_FOUND=no
30770      elif test ! -x "$BUILD_JDK/bin/javac"; then
30771        # Do we have a bin/javac?
30772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30773$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30774        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30775$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30776        BUILD_JDK_FOUND=no
30777      else
30778        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30779        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30780
30781        # Extra M4 quote needed to protect [] in grep expression.
30782        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30783        if test "x$FOUND_CORRECT_VERSION" = x; then
30784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30785$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30786          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30787$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30788          BUILD_JDK_FOUND=no
30789        else
30790          # We're done!
30791          BUILD_JDK_FOUND=yes
30792
30793  # Only process if variable expands to non-empty
30794
30795  if test "x$BUILD_JDK" != x; then
30796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30797
30798  # Input might be given as Windows format, start by converting to
30799  # unix format.
30800  path="$BUILD_JDK"
30801  new_path=`$CYGPATH -u "$path"`
30802
30803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30806  # "foo.exe" is OK but "foo" is an error.
30807  #
30808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30809  # It is also a way to make sure we got the proper file name for the real test later on.
30810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30811  if test "x$test_shortpath" = x; then
30812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30813$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30814    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30815  fi
30816
30817  # Call helper function which possibly converts this using DOS-style short mode.
30818  # If so, the updated path is stored in $new_path.
30819
30820  input_path="$new_path"
30821  # Check if we need to convert this using DOS-style short mode. If the path
30822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30823  # take no chances and rewrite it.
30824  # Note: m4 eats our [], so we need to use [ and ] instead.
30825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30826  if test "x$has_forbidden_chars" != x; then
30827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30831      # Going to short mode and back again did indeed matter. Since short mode is
30832      # case insensitive, let's make it lowercase to improve readability.
30833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30834      # Now convert it back to Unix-style (cygpath)
30835      input_path=`$CYGPATH -u "$shortmode_path"`
30836      new_path="$input_path"
30837    fi
30838  fi
30839
30840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30841  if test "x$test_cygdrive_prefix" = x; then
30842    # As a simple fix, exclude /usr/bin since it's not a real path.
30843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30845      # a path prefixed by /cygdrive for fixpath to work.
30846      new_path="$CYGWIN_ROOT_PATH$input_path"
30847    fi
30848  fi
30849
30850
30851  if test "x$path" != "x$new_path"; then
30852    BUILD_JDK="$new_path"
30853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30854$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30855  fi
30856
30857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858
30859  path="$BUILD_JDK"
30860  has_colon=`$ECHO $path | $GREP ^.:`
30861  new_path="$path"
30862  if test "x$has_colon" = x; then
30863    # Not in mixed or Windows style, start by that.
30864    new_path=`cmd //c echo $path`
30865  fi
30866
30867
30868  input_path="$new_path"
30869  # Check if we need to convert this using DOS-style short mode. If the path
30870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30871  # take no chances and rewrite it.
30872  # Note: m4 eats our [], so we need to use [ and ] instead.
30873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30874  if test "x$has_forbidden_chars" != x; then
30875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30877  fi
30878
30879
30880  windows_path="$new_path"
30881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30882    unix_path=`$CYGPATH -u "$windows_path"`
30883    new_path="$unix_path"
30884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30886    new_path="$unix_path"
30887  fi
30888
30889  if test "x$path" != "x$new_path"; then
30890    BUILD_JDK="$new_path"
30891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30892$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30893  fi
30894
30895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30897
30898    else
30899      # We're on a unix platform. Hooray! :)
30900      path="$BUILD_JDK"
30901      has_space=`$ECHO "$path" | $GREP " "`
30902      if test "x$has_space" != x; then
30903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30904$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30906      fi
30907
30908      # Use eval to expand a potential ~
30909      eval path="$path"
30910      if test ! -f "$path" && test ! -d "$path"; then
30911        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30912      fi
30913
30914      if test -d "$path"; then
30915        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30916      else
30917        dir="`$DIRNAME "$path"`"
30918        base="`$BASENAME "$path"`"
30919        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30920      fi
30921    fi
30922  fi
30923
30924          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30925$as_echo_n "checking for Build JDK... " >&6; }
30926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30927$as_echo "$BUILD_JDK" >&6; }
30928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30929$as_echo_n "checking Build JDK version... " >&6; }
30930          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30932$as_echo "$BUILD_JDK_VERSION" >&6; }
30933        fi # end check jdk version
30934      fi # end check java
30935    fi # end check build jdk found
30936  fi
30937
30938    EXTERNAL_BUILDJDK=true
30939  else
30940    if test "x$COMPILE_TYPE" = "xcross"; then
30941      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30942      BUILD_JDK_FOUND=yes
30943      CREATE_BUILDJDK=true
30944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30945$as_echo_n "checking for Build JDK... " >&6; }
30946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30947$as_echo "yes, will build it for the host platform" >&6; }
30948    else
30949      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30950      BUILD_JDK_FOUND=yes
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: yes, will use output dir" >&5
30954$as_echo "yes, will use output dir" >&6; }
30955    fi
30956  fi
30957
30958  JMOD="$BUILD_JDK/bin/jmod"
30959  JLINK="$BUILD_JDK/bin/jlink"
30960
30961
30962
30963  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30965$as_echo_n "checking for Build JDK... " >&6; }
30966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30967$as_echo "no" >&6; }
30968    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30969  fi
30970
30971
30972
30973
30974
30975
30976###############################################################################
30977#
30978# Configure the sources to use. We can add or override individual directories.
30979#
30980###############################################################################
30981
30982
30983  # Where are the sources.
30984  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30985  CORBA_TOPDIR="$SRC_ROOT/corba"
30986  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30987  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30988  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30989  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30990  JDK_TOPDIR="$SRC_ROOT/jdk"
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000  # This feature is no longer supported.
31001
31002
31003
31004# Check whether --with-add-source-root was given.
31005if test "${with_add_source_root+set}" = set; then :
31006  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
31007$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31008fi
31009
31010
31011
31012
31013# Check whether --with-override-source-root was given.
31014if test "${with_override_source_root+set}" = set; then :
31015  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
31016$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31017fi
31018
31019
31020
31021
31022# Check whether --with-adds-and-overrides was given.
31023if test "${with_adds_and_overrides+set}" = set; then :
31024  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
31025$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31026fi
31027
31028
31029
31030
31031# Check whether --with-override-langtools was given.
31032if test "${with_override_langtools+set}" = set; then :
31033  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31034$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31035fi
31036
31037
31038
31039
31040# Check whether --with-override-corba was given.
31041if test "${with_override_corba+set}" = set; then :
31042  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31043$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31044fi
31045
31046
31047
31048
31049# Check whether --with-override-jaxp was given.
31050if test "${with_override_jaxp+set}" = set; then :
31051  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31052$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31053fi
31054
31055
31056
31057
31058# Check whether --with-override-jaxws was given.
31059if test "${with_override_jaxws+set}" = set; then :
31060  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31061$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31062fi
31063
31064
31065
31066
31067# Check whether --with-override-hotspot was given.
31068if test "${with_override_hotspot+set}" = set; then :
31069  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31070$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31071fi
31072
31073
31074
31075
31076# Check whether --with-override-nashorn was given.
31077if test "${with_override_nashorn+set}" = set; then :
31078  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31079$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31080fi
31081
31082
31083
31084
31085# Check whether --with-override-jdk was given.
31086if test "${with_override_jdk+set}" = set; then :
31087  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31088$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31089fi
31090
31091
31092
31093
31094  BUILD_OUTPUT="$OUTPUT_ROOT"
31095
31096  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31097
31098
31099
31100# Check whether --with-import_hotspot was given.
31101if test "${with_import_hotspot+set}" = set; then :
31102  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31103$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31104fi
31105
31106
31107
31108
31109
31110
31111# Check whether --with-import-modules was given.
31112if test "${with_import_modules+set}" = set; then :
31113  withval=$with_import_modules;
31114fi
31115
31116
31117  if test "x$with_import_modules" != x \
31118      && test "x$with_import_modules" != "xno"; then
31119    if test -d "$with_import_modules"; then
31120      IMPORT_MODULES_TOPDIR="$with_import_modules"
31121
31122  # Only process if variable expands to non-empty
31123
31124  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31126
31127  # Input might be given as Windows format, start by converting to
31128  # unix format.
31129  path="$IMPORT_MODULES_TOPDIR"
31130  new_path=`$CYGPATH -u "$path"`
31131
31132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31135  # "foo.exe" is OK but "foo" is an error.
31136  #
31137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31138  # It is also a way to make sure we got the proper file name for the real test later on.
31139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31140  if test "x$test_shortpath" = x; then
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31142$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31143    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31144  fi
31145
31146  # Call helper function which possibly converts this using DOS-style short mode.
31147  # If so, the updated path is stored in $new_path.
31148
31149  input_path="$new_path"
31150  # Check if we need to convert this using DOS-style short mode. If the path
31151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31152  # take no chances and rewrite it.
31153  # Note: m4 eats our [], so we need to use [ and ] instead.
31154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31155  if test "x$has_forbidden_chars" != x; then
31156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31160      # Going to short mode and back again did indeed matter. Since short mode is
31161      # case insensitive, let's make it lowercase to improve readability.
31162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31163      # Now convert it back to Unix-style (cygpath)
31164      input_path=`$CYGPATH -u "$shortmode_path"`
31165      new_path="$input_path"
31166    fi
31167  fi
31168
31169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31170  if test "x$test_cygdrive_prefix" = x; then
31171    # As a simple fix, exclude /usr/bin since it's not a real path.
31172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31174      # a path prefixed by /cygdrive for fixpath to work.
31175      new_path="$CYGWIN_ROOT_PATH$input_path"
31176    fi
31177  fi
31178
31179
31180  if test "x$path" != "x$new_path"; then
31181    IMPORT_MODULES_TOPDIR="$new_path"
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31183$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31184  fi
31185
31186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187
31188  path="$IMPORT_MODULES_TOPDIR"
31189  has_colon=`$ECHO $path | $GREP ^.:`
31190  new_path="$path"
31191  if test "x$has_colon" = x; then
31192    # Not in mixed or Windows style, start by that.
31193    new_path=`cmd //c echo $path`
31194  fi
31195
31196
31197  input_path="$new_path"
31198  # Check if we need to convert this using DOS-style short mode. If the path
31199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31200  # take no chances and rewrite it.
31201  # Note: m4 eats our [], so we need to use [ and ] instead.
31202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31203  if test "x$has_forbidden_chars" != x; then
31204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31206  fi
31207
31208
31209  windows_path="$new_path"
31210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31211    unix_path=`$CYGPATH -u "$windows_path"`
31212    new_path="$unix_path"
31213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31215    new_path="$unix_path"
31216  fi
31217
31218  if test "x$path" != "x$new_path"; then
31219    IMPORT_MODULES_TOPDIR="$new_path"
31220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31221$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31222  fi
31223
31224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31226
31227    else
31228      # We're on a unix platform. Hooray! :)
31229      path="$IMPORT_MODULES_TOPDIR"
31230      has_space=`$ECHO "$path" | $GREP " "`
31231      if test "x$has_space" != x; then
31232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31233$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31235      fi
31236
31237      # Use eval to expand a potential ~
31238      eval path="$path"
31239      if test ! -f "$path" && test ! -d "$path"; then
31240        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31241      fi
31242
31243      if test -d "$path"; then
31244        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31245      else
31246        dir="`$DIRNAME "$path"`"
31247        base="`$BASENAME "$path"`"
31248        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31249      fi
31250    fi
31251  fi
31252
31253    elif test -e "$with_import_modules"; then
31254      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31255      $RM -rf "$IMPORT_MODULES_TOPDIR"
31256      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31257      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31258        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31259      fi
31260    else
31261      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31262    fi
31263  fi
31264
31265  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31266    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31267  fi
31268  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31269    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31270  fi
31271  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31272    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31273  fi
31274  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31275    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31276  fi
31277  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31278    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31279  fi
31280  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31281    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31282  fi
31283  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31284    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31285  fi
31286  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31287    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31288  fi
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300###############################################################################
31301#
31302# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31303# native code.
31304#
31305###############################################################################
31306
31307# See if we are doing a complete static build or not
31308
31309  # Check whether --enable-static-build was given.
31310if test "${enable_static_build+set}" = set; then :
31311  enableval=$enable_static_build;
31312fi
31313
31314  STATIC_BUILD=false
31315  if test "x$enable_static_build" = "xyes"; then
31316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31317$as_echo_n "checking if static build is enabled... " >&6; }
31318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31319$as_echo "yes" >&6; }
31320    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31321      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31322    fi
31323    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31324    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31325    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31326    STATIC_BUILD=true
31327  elif test "x$enable_static_build" = "xno"; then
31328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31329$as_echo_n "checking if static build is enabled... " >&6; }
31330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31331$as_echo "no" >&6; }
31332  elif test "x$enable_static_build" != "x"; then
31333    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31334  fi
31335
31336
31337
31338
31339# First determine the toolchain type (compiler family)
31340
31341
31342# Check whether --with-toolchain-type was given.
31343if test "${with_toolchain_type+set}" = set; then :
31344  withval=$with_toolchain_type;
31345fi
31346
31347
31348  # Use indirect variable referencing
31349  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31350  VALID_TOOLCHAINS=${!toolchain_var_name}
31351
31352  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31353    if test -n "$XCODEBUILD"; then
31354      # On Mac OS X, default toolchain to clang after Xcode 5
31355      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31356      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31357      if test $? -ne 0; then
31358        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31359      fi
31360      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31361          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31362          $CUT -f 1 -d .`
31363      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31364$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31365      if test $XCODE_MAJOR_VERSION -ge 5; then
31366          DEFAULT_TOOLCHAIN="clang"
31367      else
31368          DEFAULT_TOOLCHAIN="gcc"
31369      fi
31370    else
31371      # If Xcode is not installed, but the command line tools are
31372      # then we can't run xcodebuild. On these systems we should
31373      # default to clang
31374      DEFAULT_TOOLCHAIN="clang"
31375    fi
31376  else
31377    # First toolchain type in the list is the default
31378    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31379  fi
31380
31381  if test "x$with_toolchain_type" = xlist; then
31382    # List all toolchains
31383    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31384$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31385    for toolchain in $VALID_TOOLCHAINS; do
31386      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31387      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31388      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31389    done
31390
31391    exit 0
31392  elif test "x$with_toolchain_type" != x; then
31393    # User override; check that it is valid
31394    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31395      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31396$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31397      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31398$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31399      as_fn_error $? "Cannot continue." "$LINENO" 5
31400    fi
31401    TOOLCHAIN_TYPE=$with_toolchain_type
31402  else
31403    # No flag given, use default
31404    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31405  fi
31406
31407
31408  TOOLCHAIN_CC_BINARY_clang="clang"
31409  TOOLCHAIN_CC_BINARY_gcc="gcc"
31410  TOOLCHAIN_CC_BINARY_microsoft="cl"
31411  TOOLCHAIN_CC_BINARY_solstudio="cc"
31412  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31413
31414  TOOLCHAIN_CXX_BINARY_clang="clang++"
31415  TOOLCHAIN_CXX_BINARY_gcc="g++"
31416  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31417  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31418  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31419
31420  # Use indirect variable referencing
31421  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31422  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31423  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31424  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31425  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31426  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31427  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31428  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31429
31430
31431  # Define filename patterns
31432  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31433    LIBRARY_PREFIX=
31434    SHARED_LIBRARY_SUFFIX='.dll'
31435    STATIC_LIBRARY_SUFFIX='.lib'
31436    SHARED_LIBRARY='$1.dll'
31437    STATIC_LIBRARY='$1.lib'
31438    OBJ_SUFFIX='.obj'
31439    EXE_SUFFIX='.exe'
31440  else
31441    LIBRARY_PREFIX=lib
31442    SHARED_LIBRARY_SUFFIX='.so'
31443    STATIC_LIBRARY_SUFFIX='.a'
31444    SHARED_LIBRARY='lib$1.so'
31445    STATIC_LIBRARY='lib$1.a'
31446    OBJ_SUFFIX='.o'
31447    EXE_SUFFIX=''
31448    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31449      # For full static builds, we're overloading the SHARED_LIBRARY
31450      # variables in order to limit the amount of changes required.
31451      # It would be better to remove SHARED and just use LIBRARY and
31452      # LIBRARY_SUFFIX for libraries that can be built either
31453      # shared or static and use STATIC_* for libraries that are
31454      # always built statically.
31455      if test "x$STATIC_BUILD" = xtrue; then
31456        SHARED_LIBRARY='lib$1.a'
31457        SHARED_LIBRARY_SUFFIX='.a'
31458      else
31459        SHARED_LIBRARY='lib$1.dylib'
31460        SHARED_LIBRARY_SUFFIX='.dylib'
31461      fi
31462    fi
31463  fi
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31475    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31476$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31477  else
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31479$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31480  fi
31481
31482
31483# User supplied flags should be used when configure detects compilers
31484
31485  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31487$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31488  fi
31489
31490  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31492$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31493  fi
31494
31495  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31496    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31497$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31498  fi
31499
31500
31501# Check whether --with-extra-cflags was given.
31502if test "${with_extra_cflags+set}" = set; then :
31503  withval=$with_extra_cflags;
31504fi
31505
31506
31507
31508# Check whether --with-extra-cxxflags was given.
31509if test "${with_extra_cxxflags+set}" = set; then :
31510  withval=$with_extra_cxxflags;
31511fi
31512
31513
31514
31515# Check whether --with-extra-ldflags was given.
31516if test "${with_extra_ldflags+set}" = set; then :
31517  withval=$with_extra_ldflags;
31518fi
31519
31520
31521  EXTRA_CFLAGS="$with_extra_cflags"
31522  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31523  EXTRA_LDFLAGS="$with_extra_ldflags"
31524
31525
31526
31527
31528
31529  # The global CFLAGS and LDLAGS variables are used by configure tests and
31530  # should include the extra parameters
31531  CFLAGS="$EXTRA_CFLAGS"
31532  CXXFLAGS="$EXTRA_CXXFLAGS"
31533  LDFLAGS="$EXTRA_LDFLAGS"
31534  CPPFLAGS=""
31535
31536# The sysroot cflags are needed for configure to be able to run the compilers
31537
31538  if test "x$SYSROOT" != "x"; then
31539    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31540      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31541        # Solaris Studio does not have a concept of sysroot. Instead we must
31542        # make sure the default include and lib dirs are appended to each
31543        # compile and link command line. Must also add -I-xbuiltin to enable
31544        # inlining of system functions and intrinsics.
31545        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31546        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31547            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31548      fi
31549    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31550      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31551      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31552    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31553      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31554      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31555    fi
31556    # The global CFLAGS and LDFLAGS variables need these for configure to function
31557    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31558    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31559    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31560    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31561  fi
31562
31563  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31564    # We also need -iframework<path>/System/Library/Frameworks
31565    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31566    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31567    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31568    # set this here so it doesn't have to be peppered throughout the forest
31569    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31570    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31571  fi
31572
31573
31574
31575
31576
31577# Then detect the actual binaries needed
31578
31579  # FIXME: Is this needed?
31580  ac_ext=cpp
31581ac_cpp='$CXXCPP $CPPFLAGS'
31582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31585
31586
31587  # Store the CFLAGS etc passed to the configure script.
31588  ORG_CFLAGS="$CFLAGS"
31589  ORG_CXXFLAGS="$CXXFLAGS"
31590
31591  # autoconf magic only relies on PATH, so update it if tools dir is specified
31592  OLD_PATH="$PATH"
31593
31594  # On Windows, we need to detect the visual studio installation first.
31595  # This will change the PATH, but we need to keep that new PATH even
31596  # after toolchain detection is done, since the compiler (on x86) uses
31597  # it for DLL resolution in runtime.
31598  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31599      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31600
31601  # Store path to cygwin link.exe to help excluding it when searching for
31602  # VS linker. This must be done before changing the PATH when looking for VS.
31603  # Extract the first word of "link", so it can be a program name with args.
31604set dummy link; ac_word=$2
31605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31606$as_echo_n "checking for $ac_word... " >&6; }
31607if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31608  $as_echo_n "(cached) " >&6
31609else
31610  case $CYGWIN_LINK in
31611  [\\/]* | ?:[\\/]*)
31612  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31613  ;;
31614  *)
31615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31616for as_dir in $PATH
31617do
31618  IFS=$as_save_IFS
31619  test -z "$as_dir" && as_dir=.
31620    for ac_exec_ext in '' $ac_executable_extensions; do
31621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31622    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31624    break 2
31625  fi
31626done
31627  done
31628IFS=$as_save_IFS
31629
31630  ;;
31631esac
31632fi
31633CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31634if test -n "$CYGWIN_LINK"; then
31635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31636$as_echo "$CYGWIN_LINK" >&6; }
31637else
31638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31639$as_echo "no" >&6; }
31640fi
31641
31642
31643  if test "x$CYGWIN_LINK" != x; then
31644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31645$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31646    "$CYGWIN_LINK" --version > /dev/null
31647    if test $? -eq 0 ; then
31648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31649$as_echo "yes" >&6; }
31650    else
31651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31652$as_echo "no" >&6; }
31653      # This might be the VS linker. Don't exclude it later on.
31654      CYGWIN_LINK=""
31655    fi
31656  fi
31657
31658  # First-hand choice is to locate and run the vsvars bat file.
31659
31660
31661# Check whether --with-toolchain-version was given.
31662if test "${with_toolchain_version+set}" = set; then :
31663  withval=$with_toolchain_version;
31664fi
31665
31666
31667  if test "x$with_toolchain_version" = xlist; then
31668    # List all toolchains
31669    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31670$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31671    for version in $VALID_VS_VERSIONS; do
31672      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31673      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31674    done
31675
31676    exit 0
31677  elif test "x$DEVKIT_VS_VERSION" != x; then
31678    VS_VERSION=$DEVKIT_VS_VERSION
31679    TOOLCHAIN_VERSION=$VS_VERSION
31680    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31681    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31682    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31683    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31684    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31685    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31686
31687    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31688    # can still be exported as INCLUDE for compiler invocations without
31689    # SYSROOT_CFLAGS
31690    OLDIFS="$IFS"
31691    IFS=";"
31692    for i in $DEVKIT_VS_INCLUDE; do
31693      ipath=$i
31694
31695  unix_path="$ipath"
31696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31697    windows_path=`$CYGPATH -m "$unix_path"`
31698    ipath="$windows_path"
31699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31700    windows_path=`cmd //c echo $unix_path`
31701    ipath="$windows_path"
31702  fi
31703
31704      VS_INCLUDE="$VS_INCLUDE;$ipath"
31705    done
31706    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31707    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31708    for i in $DEVKIT_VS_LIB; do
31709      libpath=$i
31710
31711  unix_path="$libpath"
31712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31713    windows_path=`$CYGPATH -m "$unix_path"`
31714    libpath="$windows_path"
31715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31716    windows_path=`cmd //c echo $unix_path`
31717    libpath="$windows_path"
31718  fi
31719
31720      VS_LIB="$VS_LIB;$libpath"
31721    done
31722    IFS="$OLDIFS"
31723
31724    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31725$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31726
31727  elif test "x$with_toolchain_version" != x; then
31728    # User override; check that it is valid
31729    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31730      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31731$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31732      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31733$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31734      as_fn_error $? "Cannot continue." "$LINENO" 5
31735    fi
31736    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31737  else
31738    # No flag given, use default
31739    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31740  fi
31741
31742  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31743
31744  VS_VERSION="$VS_VERSION"
31745  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31746  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31747  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31748  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31749
31750  # When using --with-tools-dir, assume it points to the correct and default
31751  # version of Visual Studio or that --with-toolchain-version was also set.
31752  if test "x$with_tools_dir" != x; then
31753
31754  if test "x$VS_ENV_CMD" = x; then
31755    VS_VERSION="${VS_VERSION}"
31756    VS_BASE="$with_tools_dir/../.."
31757    METHOD="--with-tools-dir"
31758
31759    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31760      VCVARSFILE="vc/bin/vcvars32.bat"
31761    else
31762      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31763    fi
31764
31765
31766  windows_path="$VS_BASE"
31767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31768    unix_path=`$CYGPATH -u "$windows_path"`
31769    VS_BASE="$unix_path"
31770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31772    VS_BASE="$unix_path"
31773  fi
31774
31775    if test -d "$VS_BASE"; then
31776      if test -f "$VS_BASE/$VCVARSFILE"; then
31777        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31778$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31779        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31780        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31781        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31782        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31783      else
31784        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31785$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31786        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31787$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31788      fi
31789    fi
31790  fi
31791
31792
31793  if test "x$VS_ENV_CMD" = x; then
31794    VS_VERSION="${VS_VERSION}"
31795    VS_BASE="$with_tools_dir/../../.."
31796    METHOD="--with-tools-dir"
31797
31798    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31799      VCVARSFILE="vc/bin/vcvars32.bat"
31800    else
31801      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31802    fi
31803
31804
31805  windows_path="$VS_BASE"
31806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31807    unix_path=`$CYGPATH -u "$windows_path"`
31808    VS_BASE="$unix_path"
31809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31811    VS_BASE="$unix_path"
31812  fi
31813
31814    if test -d "$VS_BASE"; then
31815      if test -f "$VS_BASE/$VCVARSFILE"; then
31816        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31817$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31818        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31819        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31820        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31821        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31822      else
31823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31824$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31825        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31826$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31827      fi
31828    fi
31829  fi
31830
31831    if test "x$VS_ENV_CMD" = x; then
31832      # Having specified an argument which is incorrect will produce an instant failure;
31833      # we should not go on looking
31834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31835$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31836      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31837$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31838      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31839$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31840      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31841    fi
31842  fi
31843
31844  VS_ENV_CMD=""
31845  VS_ENV_ARGS=""
31846
31847  if test "x$VS_COMNTOOLS" != x; then
31848
31849  if test "x$VS_ENV_CMD" = x; then
31850    VS_VERSION="${VS_VERSION}"
31851    VS_BASE="$VS_COMNTOOLS/../.."
31852    METHOD="$VS_COMNTOOLS_VAR variable"
31853
31854    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31855      VCVARSFILE="vc/bin/vcvars32.bat"
31856    else
31857      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31858    fi
31859
31860
31861  windows_path="$VS_BASE"
31862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863    unix_path=`$CYGPATH -u "$windows_path"`
31864    VS_BASE="$unix_path"
31865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31867    VS_BASE="$unix_path"
31868  fi
31869
31870    if test -d "$VS_BASE"; then
31871      if test -f "$VS_BASE/$VCVARSFILE"; then
31872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31873$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31874        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31875        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31876        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31877        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31878      else
31879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31880$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31881        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31882$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31883      fi
31884    fi
31885  fi
31886
31887  fi
31888  if test "x$PROGRAMFILES" != x; then
31889
31890  if test "x$VS_ENV_CMD" = x; then
31891    VS_VERSION="${VS_VERSION}"
31892    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31893    METHOD="well-known name"
31894
31895    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31896      VCVARSFILE="vc/bin/vcvars32.bat"
31897    else
31898      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31899    fi
31900
31901
31902  windows_path="$VS_BASE"
31903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31904    unix_path=`$CYGPATH -u "$windows_path"`
31905    VS_BASE="$unix_path"
31906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31908    VS_BASE="$unix_path"
31909  fi
31910
31911    if test -d "$VS_BASE"; then
31912      if test -f "$VS_BASE/$VCVARSFILE"; then
31913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31914$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31915        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31916        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31917        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31918        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31919      else
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31921$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31922        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31923$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31924      fi
31925    fi
31926  fi
31927
31928  fi
31929  # Work around the insanely named ProgramFiles(x86) env variable
31930  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31931  if test "x$PROGRAMFILES_X86" != x; then
31932
31933  if test "x$VS_ENV_CMD" = x; then
31934    VS_VERSION="${VS_VERSION}"
31935    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31936    METHOD="well-known name"
31937
31938    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31939      VCVARSFILE="vc/bin/vcvars32.bat"
31940    else
31941      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31942    fi
31943
31944
31945  windows_path="$VS_BASE"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    VS_BASE="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    VS_BASE="$unix_path"
31952  fi
31953
31954    if test -d "$VS_BASE"; then
31955      if test -f "$VS_BASE/$VCVARSFILE"; then
31956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31957$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31958        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31959        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31960        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31961        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31962      else
31963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31964$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31966$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31967      fi
31968    fi
31969  fi
31970
31971  fi
31972
31973  if test "x$VS_ENV_CMD" = x; then
31974    VS_VERSION="${VS_VERSION}"
31975    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31976    METHOD="well-known name"
31977
31978    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31979      VCVARSFILE="vc/bin/vcvars32.bat"
31980    else
31981      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31982    fi
31983
31984
31985  windows_path="$VS_BASE"
31986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987    unix_path=`$CYGPATH -u "$windows_path"`
31988    VS_BASE="$unix_path"
31989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991    VS_BASE="$unix_path"
31992  fi
31993
31994    if test -d "$VS_BASE"; then
31995      if test -f "$VS_BASE/$VCVARSFILE"; then
31996        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31997$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31998        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31999        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32000        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32001        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32002      else
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32004$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32006$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32007      fi
32008    fi
32009  fi
32010
32011
32012  if test "x$VS_ENV_CMD" = x; then
32013    VS_VERSION="${VS_VERSION}"
32014    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32015    METHOD="well-known name"
32016
32017    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32018      VCVARSFILE="vc/bin/vcvars32.bat"
32019    else
32020      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32021    fi
32022
32023
32024  windows_path="$VS_BASE"
32025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026    unix_path=`$CYGPATH -u "$windows_path"`
32027    VS_BASE="$unix_path"
32028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32030    VS_BASE="$unix_path"
32031  fi
32032
32033    if test -d "$VS_BASE"; then
32034      if test -f "$VS_BASE/$VCVARSFILE"; then
32035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32036$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32037        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32038        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32039        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32040        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32041      else
32042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32043$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32045$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32046      fi
32047    fi
32048  fi
32049
32050
32051  if test "x$SDK_INSTALL_DIR" != x; then
32052    if test "x$ProgramW6432" != x; then
32053
32054  if test "x$VS_ENV_CMD" = x; then
32055    VS_VERSION="${VS_VERSION}"
32056    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32057    METHOD="well-known name"
32058
32059  windows_path="$WIN_SDK_BASE"
32060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32061    unix_path=`$CYGPATH -u "$windows_path"`
32062    WIN_SDK_BASE="$unix_path"
32063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32065    WIN_SDK_BASE="$unix_path"
32066  fi
32067
32068    if test -d "$WIN_SDK_BASE"; then
32069      # There have been cases of partial or broken SDK installations. A missing
32070      # lib dir is not going to work.
32071      if test ! -d "$WIN_SDK_BASE/lib"; then
32072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32075$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32076      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32080        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32081          VS_ENV_ARGS="/x86"
32082        else
32083          VS_ENV_ARGS="/x64"
32084        fi
32085        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32086        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32087        # TODO: improve detection for other versions of SDK
32088        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32089      else
32090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32091$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32093$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32094      fi
32095    fi
32096  fi
32097
32098    fi
32099    if test "x$PROGRAMW6432" != x; then
32100
32101  if test "x$VS_ENV_CMD" = x; then
32102    VS_VERSION="${VS_VERSION}"
32103    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32104    METHOD="well-known name"
32105
32106  windows_path="$WIN_SDK_BASE"
32107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32108    unix_path=`$CYGPATH -u "$windows_path"`
32109    WIN_SDK_BASE="$unix_path"
32110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32112    WIN_SDK_BASE="$unix_path"
32113  fi
32114
32115    if test -d "$WIN_SDK_BASE"; then
32116      # There have been cases of partial or broken SDK installations. A missing
32117      # lib dir is not going to work.
32118      if test ! -d "$WIN_SDK_BASE/lib"; then
32119        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32120$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32122$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32123      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32127        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32128          VS_ENV_ARGS="/x86"
32129        else
32130          VS_ENV_ARGS="/x64"
32131        fi
32132        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32133        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32134        # TODO: improve detection for other versions of SDK
32135        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32136      else
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32140$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32141      fi
32142    fi
32143  fi
32144
32145    fi
32146    if test "x$PROGRAMFILES" != x; then
32147
32148  if test "x$VS_ENV_CMD" = x; then
32149    VS_VERSION="${VS_VERSION}"
32150    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32151    METHOD="well-known name"
32152
32153  windows_path="$WIN_SDK_BASE"
32154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32155    unix_path=`$CYGPATH -u "$windows_path"`
32156    WIN_SDK_BASE="$unix_path"
32157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32159    WIN_SDK_BASE="$unix_path"
32160  fi
32161
32162    if test -d "$WIN_SDK_BASE"; then
32163      # There have been cases of partial or broken SDK installations. A missing
32164      # lib dir is not going to work.
32165      if test ! -d "$WIN_SDK_BASE/lib"; then
32166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32167$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32168        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32169$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32170      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32174        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32175          VS_ENV_ARGS="/x86"
32176        else
32177          VS_ENV_ARGS="/x64"
32178        fi
32179        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32180        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32181        # TODO: improve detection for other versions of SDK
32182        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32183      else
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32186        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32187$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32188      fi
32189    fi
32190  fi
32191
32192    fi
32193
32194  if test "x$VS_ENV_CMD" = x; then
32195    VS_VERSION="${VS_VERSION}"
32196    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32197    METHOD="well-known name"
32198
32199  windows_path="$WIN_SDK_BASE"
32200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32201    unix_path=`$CYGPATH -u "$windows_path"`
32202    WIN_SDK_BASE="$unix_path"
32203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32205    WIN_SDK_BASE="$unix_path"
32206  fi
32207
32208    if test -d "$WIN_SDK_BASE"; then
32209      # There have been cases of partial or broken SDK installations. A missing
32210      # lib dir is not going to work.
32211      if test ! -d "$WIN_SDK_BASE/lib"; then
32212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32215$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32216      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32220        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32221          VS_ENV_ARGS="/x86"
32222        else
32223          VS_ENV_ARGS="/x64"
32224        fi
32225        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32226        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32227        # TODO: improve detection for other versions of SDK
32228        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32229      else
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32233$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32234      fi
32235    fi
32236  fi
32237
32238
32239  if test "x$VS_ENV_CMD" = x; then
32240    VS_VERSION="${VS_VERSION}"
32241    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32242    METHOD="well-known name"
32243
32244  windows_path="$WIN_SDK_BASE"
32245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32246    unix_path=`$CYGPATH -u "$windows_path"`
32247    WIN_SDK_BASE="$unix_path"
32248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32250    WIN_SDK_BASE="$unix_path"
32251  fi
32252
32253    if test -d "$WIN_SDK_BASE"; then
32254      # There have been cases of partial or broken SDK installations. A missing
32255      # lib dir is not going to work.
32256      if test ! -d "$WIN_SDK_BASE/lib"; then
32257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32258$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32259        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32260$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32261      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32265        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32266          VS_ENV_ARGS="/x86"
32267        else
32268          VS_ENV_ARGS="/x64"
32269        fi
32270        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32271        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32272        # TODO: improve detection for other versions of SDK
32273        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32274      else
32275        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32276$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32277        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32278$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32279      fi
32280    fi
32281  fi
32282
32283  fi
32284
32285    if test "x$VS_ENV_CMD" != x; then
32286      TOOLCHAIN_VERSION=$VS_VERSION
32287      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32288      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32289      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32290      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32291      # The rest of the variables are already evaled while probing
32292      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32293$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32294      break
32295    fi
32296  done
32297
32298
32299  # If we have a devkit, skip all of the below.
32300  if test "x$DEVKIT_VS_VERSION" = x; then
32301    if test "x$VS_ENV_CMD" != x; then
32302      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32303
32304  # Only process if variable expands to non-empty
32305
32306  if test "x$VS_ENV_CMD" != x; then
32307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32308
32309  # First separate the path from the arguments. This will split at the first
32310  # space.
32311  complete="$VS_ENV_CMD"
32312  path="${complete%% *}"
32313  tmp="$complete EOL"
32314  arguments="${tmp#* }"
32315
32316  # Input might be given as Windows format, start by converting to
32317  # unix format.
32318  new_path=`$CYGPATH -u "$path"`
32319
32320  # Now try to locate executable using which
32321  new_path=`$WHICH "$new_path" 2> /dev/null`
32322  # bat and cmd files are not always considered executable in cygwin causing which
32323  # to not find them
32324  if test "x$new_path" = x \
32325      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32326      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32327    new_path=`$CYGPATH -u "$path"`
32328  fi
32329  if test "x$new_path" = x; then
32330    # Oops. Which didn't find the executable.
32331    # The splitting of arguments from the executable at a space might have been incorrect,
32332    # since paths with space are more likely in Windows. Give it another try with the whole
32333    # argument.
32334    path="$complete"
32335    arguments="EOL"
32336    new_path=`$CYGPATH -u "$path"`
32337    new_path=`$WHICH "$new_path" 2> /dev/null`
32338    # bat and cmd files are not always considered executable in cygwin causing which
32339    # to not find them
32340    if test "x$new_path" = x \
32341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32343      new_path=`$CYGPATH -u "$path"`
32344    fi
32345    if test "x$new_path" = x; then
32346      # It's still not found. Now this is an unrecoverable error.
32347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32348$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32349      has_space=`$ECHO "$complete" | $GREP " "`
32350      if test "x$has_space" != x; then
32351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32353      fi
32354      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32355    fi
32356  fi
32357
32358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32361  # "foo.exe" is OK but "foo" is an error.
32362  #
32363  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32364  # It is also a way to make sure we got the proper file name for the real test later on.
32365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32366  if test "x$test_shortpath" = x; then
32367    # Short path failed, file does not exist as specified.
32368    # Try adding .exe or .cmd
32369    if test -f "${new_path}.exe"; then
32370      input_to_shortpath="${new_path}.exe"
32371    elif test -f "${new_path}.cmd"; then
32372      input_to_shortpath="${new_path}.cmd"
32373    else
32374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32375$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32376      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32377$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32378      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32379    fi
32380  else
32381    input_to_shortpath="$new_path"
32382  fi
32383
32384  # Call helper function which possibly converts this using DOS-style short mode.
32385  # If so, the updated path is stored in $new_path.
32386  new_path="$input_to_shortpath"
32387
32388  input_path="$input_to_shortpath"
32389  # Check if we need to convert this using DOS-style short mode. If the path
32390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32391  # take no chances and rewrite it.
32392  # Note: m4 eats our [], so we need to use [ and ] instead.
32393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32394  if test "x$has_forbidden_chars" != x; then
32395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32399      # Going to short mode and back again did indeed matter. Since short mode is
32400      # case insensitive, let's make it lowercase to improve readability.
32401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32402      # Now convert it back to Unix-style (cygpath)
32403      input_path=`$CYGPATH -u "$shortmode_path"`
32404      new_path="$input_path"
32405    fi
32406  fi
32407
32408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32409  if test "x$test_cygdrive_prefix" = x; then
32410    # As a simple fix, exclude /usr/bin since it's not a real path.
32411    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32413      # a path prefixed by /cygdrive for fixpath to work.
32414      new_path="$CYGWIN_ROOT_PATH$input_path"
32415    fi
32416  fi
32417
32418  # remove trailing .exe if any
32419  new_path="${new_path/%.exe/}"
32420
32421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32422
32423  # First separate the path from the arguments. This will split at the first
32424  # space.
32425  complete="$VS_ENV_CMD"
32426  path="${complete%% *}"
32427  tmp="$complete EOL"
32428  arguments="${tmp#* }"
32429
32430  # Input might be given as Windows format, start by converting to
32431  # unix format.
32432  new_path="$path"
32433
32434  windows_path="$new_path"
32435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32436    unix_path=`$CYGPATH -u "$windows_path"`
32437    new_path="$unix_path"
32438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32440    new_path="$unix_path"
32441  fi
32442
32443
32444  # Now try to locate executable using which
32445  new_path=`$WHICH "$new_path" 2> /dev/null`
32446
32447  if test "x$new_path" = x; then
32448    # Oops. Which didn't find the executable.
32449    # The splitting of arguments from the executable at a space might have been incorrect,
32450    # since paths with space are more likely in Windows. Give it another try with the whole
32451    # argument.
32452    path="$complete"
32453    arguments="EOL"
32454    new_path="$path"
32455
32456  windows_path="$new_path"
32457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32458    unix_path=`$CYGPATH -u "$windows_path"`
32459    new_path="$unix_path"
32460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32462    new_path="$unix_path"
32463  fi
32464
32465
32466    new_path=`$WHICH "$new_path" 2> /dev/null`
32467    # bat and cmd files are not always considered executable in MSYS causing which
32468    # to not find them
32469    if test "x$new_path" = x \
32470        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32471        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32472      new_path="$path"
32473
32474  windows_path="$new_path"
32475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32476    unix_path=`$CYGPATH -u "$windows_path"`
32477    new_path="$unix_path"
32478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32480    new_path="$unix_path"
32481  fi
32482
32483    fi
32484
32485    if test "x$new_path" = x; then
32486      # It's still not found. Now this is an unrecoverable error.
32487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32488$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32489      has_space=`$ECHO "$complete" | $GREP " "`
32490      if test "x$has_space" != x; then
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32493      fi
32494      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32495    fi
32496  fi
32497
32498  # Now new_path has a complete unix path to the binary
32499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32500    # Keep paths in /bin as-is, but remove trailing .exe if any
32501    new_path="${new_path/%.exe/}"
32502    # Do not save /bin paths to all_fixpath_prefixes!
32503  else
32504    # Not in mixed or Windows style, start by that.
32505    new_path=`cmd //c echo $new_path`
32506
32507  input_path="$new_path"
32508  # Check if we need to convert this using DOS-style short mode. If the path
32509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32510  # take no chances and rewrite it.
32511  # Note: m4 eats our [], so we need to use [ and ] instead.
32512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32513  if test "x$has_forbidden_chars" != x; then
32514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32516  fi
32517
32518    # Output is in $new_path
32519
32520  windows_path="$new_path"
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522    unix_path=`$CYGPATH -u "$windows_path"`
32523    new_path="$unix_path"
32524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32526    new_path="$unix_path"
32527  fi
32528
32529    # remove trailing .exe if any
32530    new_path="${new_path/%.exe/}"
32531
32532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32534  fi
32535
32536    else
32537      # We're on a unix platform. Hooray! :)
32538      # First separate the path from the arguments. This will split at the first
32539      # space.
32540      complete="$VS_ENV_CMD"
32541      path="${complete%% *}"
32542      tmp="$complete EOL"
32543      arguments="${tmp#* }"
32544
32545      # Cannot rely on the command "which" here since it doesn't always work.
32546      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32547      if test -z "$is_absolute_path"; then
32548        # Path to executable is not absolute. Find it.
32549        IFS_save="$IFS"
32550        IFS=:
32551        for p in $PATH; do
32552          if test -f "$p/$path" && test -x "$p/$path"; then
32553            new_path="$p/$path"
32554            break
32555          fi
32556        done
32557        IFS="$IFS_save"
32558      else
32559        # This is an absolute path, we can use it without further modifications.
32560        new_path="$path"
32561      fi
32562
32563      if test "x$new_path" = x; then
32564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32565$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32566        has_space=`$ECHO "$complete" | $GREP " "`
32567        if test "x$has_space" != x; then
32568          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32569$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32570        fi
32571        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32572      fi
32573    fi
32574
32575    # Now join together the path and the arguments once again
32576    if test "x$arguments" != xEOL; then
32577      new_complete="$new_path ${arguments% *}"
32578    else
32579      new_complete="$new_path"
32580    fi
32581
32582    if test "x$complete" != "x$new_complete"; then
32583      VS_ENV_CMD="$new_complete"
32584      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32585$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32586    fi
32587  fi
32588
32589
32590      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32592$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32593
32594      # We need to create a couple of temporary files.
32595      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32596      $MKDIR -p $VS_ENV_TMP_DIR
32597
32598      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32599      # Instead create a shell script which will set the relevant variables when run.
32600      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32601
32602  unix_path="$WINPATH_VS_ENV_CMD"
32603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32604    windows_path=`$CYGPATH -m "$unix_path"`
32605    WINPATH_VS_ENV_CMD="$windows_path"
32606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32607    windows_path=`cmd //c echo $unix_path`
32608    WINPATH_VS_ENV_CMD="$windows_path"
32609  fi
32610
32611      WINPATH_BASH="$BASH"
32612
32613  unix_path="$WINPATH_BASH"
32614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32615    windows_path=`$CYGPATH -m "$unix_path"`
32616    WINPATH_BASH="$windows_path"
32617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32618    windows_path=`cmd //c echo $unix_path`
32619    WINPATH_BASH="$windows_path"
32620  fi
32621
32622
32623      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32624      # script (executable by bash) that will setup the important variables.
32625      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32626      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32627      # This will end up something like:
32628      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32629      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32630      # These will end up something like:
32631      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32632      # The trailing space for everyone except PATH is no typo, but is needed due
32633      # to trailing \ in the Windows paths. These will be stripped later.
32634      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32635          >> $EXTRACT_VC_ENV_BAT_FILE
32636      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32637          >> $EXTRACT_VC_ENV_BAT_FILE
32638      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32639          >> $EXTRACT_VC_ENV_BAT_FILE
32640      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32641          >> $EXTRACT_VC_ENV_BAT_FILE
32642      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32643          >> $EXTRACT_VC_ENV_BAT_FILE
32644      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32645          >> $EXTRACT_VC_ENV_BAT_FILE
32646
32647      # Now execute the newly created bat file.
32648      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32649      # Change directory so we don't need to mess with Windows paths in redirects.
32650      cd $VS_ENV_TMP_DIR
32651      cmd /c extract-vs-env.bat | $CAT
32652      cd $CURDIR
32653
32654      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32656$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32657        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32658$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32659        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32660$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32661        as_fn_error $? "Cannot continue" "$LINENO" 5
32662      fi
32663
32664      # Now set all paths and other env variables. This will allow the rest of
32665      # the configure script to find and run the compiler in the proper way.
32666      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32667$as_echo "$as_me: Setting extracted environment variables" >&6;}
32668      . $VS_ENV_TMP_DIR/set-vs-env.sh
32669      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32670      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32671    else
32672      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32673      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32674$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32675    fi
32676  fi
32677
32678  # At this point, we should have correct variables in the environment, or we can't continue.
32679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32680$as_echo_n "checking for Visual Studio variables... " >&6; }
32681
32682  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32683      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32684    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32686$as_echo "present but broken" >&6; }
32687      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32688    else
32689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32690$as_echo "ok" >&6; }
32691      # Remove any trailing "\" ";" and " " from the variables.
32692      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32693      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32694      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32695      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32696      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32697      # Remove any paths containing # (typically F#) as that messes up make. This
32698      # is needed if visual studio was installed with F# support.
32699      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32700
32701
32702
32703
32704
32705      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32706      OLDIFS="$IFS"
32707      IFS=";"
32708      for i in $VS_INCLUDE; do
32709        ipath=$i
32710        # Only process non-empty elements
32711        if test "x$ipath" != x; then
32712          IFS="$OLDIFS"
32713          # Check that directory exists before calling fixup_path
32714          testpath=$ipath
32715
32716  windows_path="$testpath"
32717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32718    unix_path=`$CYGPATH -u "$windows_path"`
32719    testpath="$unix_path"
32720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32722    testpath="$unix_path"
32723  fi
32724
32725          if test -d "$testpath"; then
32726
32727  # Only process if variable expands to non-empty
32728
32729  if test "x$ipath" != x; then
32730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32731
32732  # Input might be given as Windows format, start by converting to
32733  # unix format.
32734  path="$ipath"
32735  new_path=`$CYGPATH -u "$path"`
32736
32737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32740  # "foo.exe" is OK but "foo" is an error.
32741  #
32742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32743  # It is also a way to make sure we got the proper file name for the real test later on.
32744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32745  if test "x$test_shortpath" = x; then
32746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32747$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32748    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32749  fi
32750
32751  # Call helper function which possibly converts this using DOS-style short mode.
32752  # If so, the updated path is stored in $new_path.
32753
32754  input_path="$new_path"
32755  # Check if we need to convert this using DOS-style short mode. If the path
32756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32757  # take no chances and rewrite it.
32758  # Note: m4 eats our [], so we need to use [ and ] instead.
32759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32760  if test "x$has_forbidden_chars" != x; then
32761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32765      # Going to short mode and back again did indeed matter. Since short mode is
32766      # case insensitive, let's make it lowercase to improve readability.
32767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32768      # Now convert it back to Unix-style (cygpath)
32769      input_path=`$CYGPATH -u "$shortmode_path"`
32770      new_path="$input_path"
32771    fi
32772  fi
32773
32774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32775  if test "x$test_cygdrive_prefix" = x; then
32776    # As a simple fix, exclude /usr/bin since it's not a real path.
32777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32779      # a path prefixed by /cygdrive for fixpath to work.
32780      new_path="$CYGWIN_ROOT_PATH$input_path"
32781    fi
32782  fi
32783
32784
32785  if test "x$path" != "x$new_path"; then
32786    ipath="$new_path"
32787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32788$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32789  fi
32790
32791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32792
32793  path="$ipath"
32794  has_colon=`$ECHO $path | $GREP ^.:`
32795  new_path="$path"
32796  if test "x$has_colon" = x; then
32797    # Not in mixed or Windows style, start by that.
32798    new_path=`cmd //c echo $path`
32799  fi
32800
32801
32802  input_path="$new_path"
32803  # Check if we need to convert this using DOS-style short mode. If the path
32804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32805  # take no chances and rewrite it.
32806  # Note: m4 eats our [], so we need to use [ and ] instead.
32807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32808  if test "x$has_forbidden_chars" != x; then
32809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32811  fi
32812
32813
32814  windows_path="$new_path"
32815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32816    unix_path=`$CYGPATH -u "$windows_path"`
32817    new_path="$unix_path"
32818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32820    new_path="$unix_path"
32821  fi
32822
32823  if test "x$path" != "x$new_path"; then
32824    ipath="$new_path"
32825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32826$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32827  fi
32828
32829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32831
32832    else
32833      # We're on a unix platform. Hooray! :)
32834      path="$ipath"
32835      has_space=`$ECHO "$path" | $GREP " "`
32836      if test "x$has_space" != x; then
32837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32838$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32839        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32840      fi
32841
32842      # Use eval to expand a potential ~
32843      eval path="$path"
32844      if test ! -f "$path" && test ! -d "$path"; then
32845        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32846      fi
32847
32848      if test -d "$path"; then
32849        ipath="`cd "$path"; $THEPWDCMD -L`"
32850      else
32851        dir="`$DIRNAME "$path"`"
32852        base="`$BASENAME "$path"`"
32853        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32854      fi
32855    fi
32856  fi
32857
32858            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32859          fi
32860          IFS=";"
32861        fi
32862      done
32863      # Convert VS_LIB into SYSROOT_LDFLAGS
32864      for i in $VS_LIB; do
32865        libpath=$i
32866        # Only process non-empty elements
32867        if test "x$libpath" != x; then
32868          IFS="$OLDIFS"
32869          # Check that directory exists before calling fixup_path
32870          testpath=$libpath
32871
32872  windows_path="$testpath"
32873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874    unix_path=`$CYGPATH -u "$windows_path"`
32875    testpath="$unix_path"
32876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32878    testpath="$unix_path"
32879  fi
32880
32881          if test -d "$testpath"; then
32882
32883  # Only process if variable expands to non-empty
32884
32885  if test "x$libpath" != x; then
32886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32887
32888  # Input might be given as Windows format, start by converting to
32889  # unix format.
32890  path="$libpath"
32891  new_path=`$CYGPATH -u "$path"`
32892
32893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32896  # "foo.exe" is OK but "foo" is an error.
32897  #
32898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32899  # It is also a way to make sure we got the proper file name for the real test later on.
32900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32901  if test "x$test_shortpath" = x; then
32902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32903$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32904    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32905  fi
32906
32907  # Call helper function which possibly converts this using DOS-style short mode.
32908  # If so, the updated path is stored in $new_path.
32909
32910  input_path="$new_path"
32911  # Check if we need to convert this using DOS-style short mode. If the path
32912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32913  # take no chances and rewrite it.
32914  # Note: m4 eats our [], so we need to use [ and ] instead.
32915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32916  if test "x$has_forbidden_chars" != x; then
32917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32921      # Going to short mode and back again did indeed matter. Since short mode is
32922      # case insensitive, let's make it lowercase to improve readability.
32923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32924      # Now convert it back to Unix-style (cygpath)
32925      input_path=`$CYGPATH -u "$shortmode_path"`
32926      new_path="$input_path"
32927    fi
32928  fi
32929
32930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32931  if test "x$test_cygdrive_prefix" = x; then
32932    # As a simple fix, exclude /usr/bin since it's not a real path.
32933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32935      # a path prefixed by /cygdrive for fixpath to work.
32936      new_path="$CYGWIN_ROOT_PATH$input_path"
32937    fi
32938  fi
32939
32940
32941  if test "x$path" != "x$new_path"; then
32942    libpath="$new_path"
32943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32944$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32945  fi
32946
32947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32948
32949  path="$libpath"
32950  has_colon=`$ECHO $path | $GREP ^.:`
32951  new_path="$path"
32952  if test "x$has_colon" = x; then
32953    # Not in mixed or Windows style, start by that.
32954    new_path=`cmd //c echo $path`
32955  fi
32956
32957
32958  input_path="$new_path"
32959  # Check if we need to convert this using DOS-style short mode. If the path
32960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32961  # take no chances and rewrite it.
32962  # Note: m4 eats our [], so we need to use [ and ] instead.
32963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32964  if test "x$has_forbidden_chars" != x; then
32965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32967  fi
32968
32969
32970  windows_path="$new_path"
32971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32972    unix_path=`$CYGPATH -u "$windows_path"`
32973    new_path="$unix_path"
32974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32976    new_path="$unix_path"
32977  fi
32978
32979  if test "x$path" != "x$new_path"; then
32980    libpath="$new_path"
32981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32982$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32983  fi
32984
32985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32987
32988    else
32989      # We're on a unix platform. Hooray! :)
32990      path="$libpath"
32991      has_space=`$ECHO "$path" | $GREP " "`
32992      if test "x$has_space" != x; then
32993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32994$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32996      fi
32997
32998      # Use eval to expand a potential ~
32999      eval path="$path"
33000      if test ! -f "$path" && test ! -d "$path"; then
33001        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33002      fi
33003
33004      if test -d "$path"; then
33005        libpath="`cd "$path"; $THEPWDCMD -L`"
33006      else
33007        dir="`$DIRNAME "$path"`"
33008        base="`$BASENAME "$path"`"
33009        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33010      fi
33011    fi
33012  fi
33013
33014            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33015          fi
33016          IFS=";"
33017        fi
33018      done
33019      IFS="$OLDIFS"
33020    fi
33021  else
33022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33023$as_echo "not found" >&6; }
33024
33025    if test "x$VS_ENV_CMD" = x; then
33026      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33027$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33028      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33029$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33030    else
33031      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33032$as_echo "$as_me: Running the extraction script failed." >&6;}
33033    fi
33034    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33035$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33036    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33037$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33038    as_fn_error $? "Cannot continue" "$LINENO" 5
33039  fi
33040
33041    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33042    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33043    PATH="$VS_PATH"
33044    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33045    export INCLUDE="$VS_INCLUDE"
33046    export LIB="$VS_LIB"
33047  else
33048    if test "x$XCODE_VERSION_OUTPUT" != x; then
33049      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33050      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33051      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33052    else
33053      # Currently we do not define this for other toolchains. This might change as the need arise.
33054      TOOLCHAIN_VERSION=
33055    fi
33056  fi
33057
33058
33059  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33060  # override all other locations.
33061  if test "x$TOOLCHAIN_PATH" != x; then
33062    PATH=$TOOLCHAIN_PATH:$PATH
33063  fi
33064
33065
33066  #
33067  # Setup the compilers (CC and CXX)
33068  #
33069
33070  COMPILER_NAME=C
33071  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33072
33073  if test "x$CC" != x; then
33074    # User has supplied compiler name already, always let that override.
33075    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33076$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33077    if test "x`basename $CC`" = "x$CC"; then
33078      # A command without a complete path is provided, search $PATH.
33079
33080      for ac_prog in $CC
33081do
33082  # Extract the first word of "$ac_prog", so it can be a program name with args.
33083set dummy $ac_prog; ac_word=$2
33084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33085$as_echo_n "checking for $ac_word... " >&6; }
33086if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33087  $as_echo_n "(cached) " >&6
33088else
33089  case $POTENTIAL_CC in
33090  [\\/]* | ?:[\\/]*)
33091  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33092  ;;
33093  *)
33094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33095for as_dir in $PATH
33096do
33097  IFS=$as_save_IFS
33098  test -z "$as_dir" && as_dir=.
33099    for ac_exec_ext in '' $ac_executable_extensions; do
33100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33101    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33103    break 2
33104  fi
33105done
33106  done
33107IFS=$as_save_IFS
33108
33109  ;;
33110esac
33111fi
33112POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33113if test -n "$POTENTIAL_CC"; then
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33115$as_echo "$POTENTIAL_CC" >&6; }
33116else
33117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33118$as_echo "no" >&6; }
33119fi
33120
33121
33122  test -n "$POTENTIAL_CC" && break
33123done
33124
33125      if test "x$POTENTIAL_CC" != x; then
33126        CC=$POTENTIAL_CC
33127      else
33128        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33129      fi
33130    else
33131      # Otherwise it might already be a complete path
33132      if test ! -x "$CC"; then
33133        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33134      fi
33135    fi
33136  else
33137    # No user supplied value. Locate compiler ourselves.
33138
33139    # If we are cross compiling, assume cross compilation tools follows the
33140    # cross compilation standard where they are prefixed with the autoconf
33141    # standard name for the target. For example the binary
33142    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33143    # If we are not cross compiling, then the default compiler name will be
33144    # used.
33145
33146    CC=
33147    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33148    # before checking the rest of the PATH.
33149    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33150    # step, this should not be necessary.
33151    if test -n "$TOOLCHAIN_PATH"; then
33152      PATH_save="$PATH"
33153      PATH="$TOOLCHAIN_PATH"
33154      for ac_prog in $SEARCH_LIST
33155do
33156  # Extract the first word of "$ac_prog", so it can be a program name with args.
33157set dummy $ac_prog; ac_word=$2
33158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33159$as_echo_n "checking for $ac_word... " >&6; }
33160if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33161  $as_echo_n "(cached) " >&6
33162else
33163  case $TOOLCHAIN_PATH_CC in
33164  [\\/]* | ?:[\\/]*)
33165  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33166  ;;
33167  *)
33168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33169for as_dir in $PATH
33170do
33171  IFS=$as_save_IFS
33172  test -z "$as_dir" && as_dir=.
33173    for ac_exec_ext in '' $ac_executable_extensions; do
33174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33175    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33177    break 2
33178  fi
33179done
33180  done
33181IFS=$as_save_IFS
33182
33183  ;;
33184esac
33185fi
33186TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33187if test -n "$TOOLCHAIN_PATH_CC"; then
33188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33189$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33190else
33191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33192$as_echo "no" >&6; }
33193fi
33194
33195
33196  test -n "$TOOLCHAIN_PATH_CC" && break
33197done
33198
33199      CC=$TOOLCHAIN_PATH_CC
33200      PATH="$PATH_save"
33201    fi
33202
33203    # AC_PATH_PROGS can't be run multiple times with the same variable,
33204    # so create a new name for this run.
33205    if test "x$CC" = x; then
33206      for ac_prog in $SEARCH_LIST
33207do
33208  # Extract the first word of "$ac_prog", so it can be a program name with args.
33209set dummy $ac_prog; ac_word=$2
33210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33211$as_echo_n "checking for $ac_word... " >&6; }
33212if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33213  $as_echo_n "(cached) " >&6
33214else
33215  case $POTENTIAL_CC in
33216  [\\/]* | ?:[\\/]*)
33217  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33218  ;;
33219  *)
33220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33221for as_dir in $PATH
33222do
33223  IFS=$as_save_IFS
33224  test -z "$as_dir" && as_dir=.
33225    for ac_exec_ext in '' $ac_executable_extensions; do
33226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33227    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33229    break 2
33230  fi
33231done
33232  done
33233IFS=$as_save_IFS
33234
33235  ;;
33236esac
33237fi
33238POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33239if test -n "$POTENTIAL_CC"; then
33240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33241$as_echo "$POTENTIAL_CC" >&6; }
33242else
33243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33244$as_echo "no" >&6; }
33245fi
33246
33247
33248  test -n "$POTENTIAL_CC" && break
33249done
33250
33251      CC=$POTENTIAL_CC
33252    fi
33253
33254    if test "x$CC" = x; then
33255
33256  # Print a helpful message on how to acquire the necessary build dependency.
33257  # devkit is the help tag: freetype, cups, alsa etc
33258  MISSING_DEPENDENCY=devkit
33259
33260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261    cygwin_help $MISSING_DEPENDENCY
33262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33263    msys_help $MISSING_DEPENDENCY
33264  else
33265    PKGHANDLER_COMMAND=
33266
33267    case $PKGHANDLER in
33268      apt-get)
33269        apt_help     $MISSING_DEPENDENCY ;;
33270      yum)
33271        yum_help     $MISSING_DEPENDENCY ;;
33272      brew)
33273        brew_help    $MISSING_DEPENDENCY ;;
33274      port)
33275        port_help    $MISSING_DEPENDENCY ;;
33276      pkgutil)
33277        pkgutil_help $MISSING_DEPENDENCY ;;
33278      pkgadd)
33279        pkgadd_help  $MISSING_DEPENDENCY ;;
33280    esac
33281
33282    if test "x$PKGHANDLER_COMMAND" != x; then
33283      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33284    fi
33285  fi
33286
33287      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33288    fi
33289  fi
33290
33291  # Now we have a compiler binary in CC. Make sure it's okay.
33292
33293  # Only process if variable expands to non-empty
33294
33295  if test "x$CC" != x; then
33296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33297
33298  # First separate the path from the arguments. This will split at the first
33299  # space.
33300  complete="$CC"
33301  path="${complete%% *}"
33302  tmp="$complete EOL"
33303  arguments="${tmp#* }"
33304
33305  # Input might be given as Windows format, start by converting to
33306  # unix format.
33307  new_path=`$CYGPATH -u "$path"`
33308
33309  # Now try to locate executable using which
33310  new_path=`$WHICH "$new_path" 2> /dev/null`
33311  # bat and cmd files are not always considered executable in cygwin causing which
33312  # to not find them
33313  if test "x$new_path" = x \
33314      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33315      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33316    new_path=`$CYGPATH -u "$path"`
33317  fi
33318  if test "x$new_path" = x; then
33319    # Oops. Which didn't find the executable.
33320    # The splitting of arguments from the executable at a space might have been incorrect,
33321    # since paths with space are more likely in Windows. Give it another try with the whole
33322    # argument.
33323    path="$complete"
33324    arguments="EOL"
33325    new_path=`$CYGPATH -u "$path"`
33326    new_path=`$WHICH "$new_path" 2> /dev/null`
33327    # bat and cmd files are not always considered executable in cygwin causing which
33328    # to not find them
33329    if test "x$new_path" = x \
33330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33332      new_path=`$CYGPATH -u "$path"`
33333    fi
33334    if test "x$new_path" = x; then
33335      # It's still not found. Now this is an unrecoverable error.
33336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33337$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33338      has_space=`$ECHO "$complete" | $GREP " "`
33339      if test "x$has_space" != x; then
33340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33342      fi
33343      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33344    fi
33345  fi
33346
33347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33350  # "foo.exe" is OK but "foo" is an error.
33351  #
33352  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33353  # It is also a way to make sure we got the proper file name for the real test later on.
33354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33355  if test "x$test_shortpath" = x; then
33356    # Short path failed, file does not exist as specified.
33357    # Try adding .exe or .cmd
33358    if test -f "${new_path}.exe"; then
33359      input_to_shortpath="${new_path}.exe"
33360    elif test -f "${new_path}.cmd"; then
33361      input_to_shortpath="${new_path}.cmd"
33362    else
33363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33364$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33367      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33368    fi
33369  else
33370    input_to_shortpath="$new_path"
33371  fi
33372
33373  # Call helper function which possibly converts this using DOS-style short mode.
33374  # If so, the updated path is stored in $new_path.
33375  new_path="$input_to_shortpath"
33376
33377  input_path="$input_to_shortpath"
33378  # Check if we need to convert this using DOS-style short mode. If the path
33379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33380  # take no chances and rewrite it.
33381  # Note: m4 eats our [], so we need to use [ and ] instead.
33382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33383  if test "x$has_forbidden_chars" != x; then
33384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33388      # Going to short mode and back again did indeed matter. Since short mode is
33389      # case insensitive, let's make it lowercase to improve readability.
33390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33391      # Now convert it back to Unix-style (cygpath)
33392      input_path=`$CYGPATH -u "$shortmode_path"`
33393      new_path="$input_path"
33394    fi
33395  fi
33396
33397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33398  if test "x$test_cygdrive_prefix" = x; then
33399    # As a simple fix, exclude /usr/bin since it's not a real path.
33400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33402      # a path prefixed by /cygdrive for fixpath to work.
33403      new_path="$CYGWIN_ROOT_PATH$input_path"
33404    fi
33405  fi
33406
33407  # remove trailing .exe if any
33408  new_path="${new_path/%.exe/}"
33409
33410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33411
33412  # First separate the path from the arguments. This will split at the first
33413  # space.
33414  complete="$CC"
33415  path="${complete%% *}"
33416  tmp="$complete EOL"
33417  arguments="${tmp#* }"
33418
33419  # Input might be given as Windows format, start by converting to
33420  # unix format.
33421  new_path="$path"
33422
33423  windows_path="$new_path"
33424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33425    unix_path=`$CYGPATH -u "$windows_path"`
33426    new_path="$unix_path"
33427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33429    new_path="$unix_path"
33430  fi
33431
33432
33433  # Now try to locate executable using which
33434  new_path=`$WHICH "$new_path" 2> /dev/null`
33435
33436  if test "x$new_path" = x; then
33437    # Oops. Which didn't find the executable.
33438    # The splitting of arguments from the executable at a space might have been incorrect,
33439    # since paths with space are more likely in Windows. Give it another try with the whole
33440    # argument.
33441    path="$complete"
33442    arguments="EOL"
33443    new_path="$path"
33444
33445  windows_path="$new_path"
33446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447    unix_path=`$CYGPATH -u "$windows_path"`
33448    new_path="$unix_path"
33449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33451    new_path="$unix_path"
33452  fi
33453
33454
33455    new_path=`$WHICH "$new_path" 2> /dev/null`
33456    # bat and cmd files are not always considered executable in MSYS causing which
33457    # to not find them
33458    if test "x$new_path" = x \
33459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33461      new_path="$path"
33462
33463  windows_path="$new_path"
33464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33465    unix_path=`$CYGPATH -u "$windows_path"`
33466    new_path="$unix_path"
33467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33469    new_path="$unix_path"
33470  fi
33471
33472    fi
33473
33474    if test "x$new_path" = x; then
33475      # It's still not found. Now this is an unrecoverable error.
33476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33477$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33478      has_space=`$ECHO "$complete" | $GREP " "`
33479      if test "x$has_space" != x; then
33480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33482      fi
33483      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33484    fi
33485  fi
33486
33487  # Now new_path has a complete unix path to the binary
33488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33489    # Keep paths in /bin as-is, but remove trailing .exe if any
33490    new_path="${new_path/%.exe/}"
33491    # Do not save /bin paths to all_fixpath_prefixes!
33492  else
33493    # Not in mixed or Windows style, start by that.
33494    new_path=`cmd //c echo $new_path`
33495
33496  input_path="$new_path"
33497  # Check if we need to convert this using DOS-style short mode. If the path
33498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33499  # take no chances and rewrite it.
33500  # Note: m4 eats our [], so we need to use [ and ] instead.
33501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33502  if test "x$has_forbidden_chars" != x; then
33503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33505  fi
33506
33507    # Output is in $new_path
33508
33509  windows_path="$new_path"
33510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33511    unix_path=`$CYGPATH -u "$windows_path"`
33512    new_path="$unix_path"
33513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33515    new_path="$unix_path"
33516  fi
33517
33518    # remove trailing .exe if any
33519    new_path="${new_path/%.exe/}"
33520
33521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33523  fi
33524
33525    else
33526      # We're on a unix platform. Hooray! :)
33527      # First separate the path from the arguments. This will split at the first
33528      # space.
33529      complete="$CC"
33530      path="${complete%% *}"
33531      tmp="$complete EOL"
33532      arguments="${tmp#* }"
33533
33534      # Cannot rely on the command "which" here since it doesn't always work.
33535      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33536      if test -z "$is_absolute_path"; then
33537        # Path to executable is not absolute. Find it.
33538        IFS_save="$IFS"
33539        IFS=:
33540        for p in $PATH; do
33541          if test -f "$p/$path" && test -x "$p/$path"; then
33542            new_path="$p/$path"
33543            break
33544          fi
33545        done
33546        IFS="$IFS_save"
33547      else
33548        # This is an absolute path, we can use it without further modifications.
33549        new_path="$path"
33550      fi
33551
33552      if test "x$new_path" = x; then
33553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33554$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33555        has_space=`$ECHO "$complete" | $GREP " "`
33556        if test "x$has_space" != x; then
33557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33559        fi
33560        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33561      fi
33562    fi
33563
33564    # Now join together the path and the arguments once again
33565    if test "x$arguments" != xEOL; then
33566      new_complete="$new_path ${arguments% *}"
33567    else
33568      new_complete="$new_path"
33569    fi
33570
33571    if test "x$complete" != "x$new_complete"; then
33572      CC="$new_complete"
33573      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33574$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33575    fi
33576  fi
33577
33578  TEST_COMPILER="$CC"
33579
33580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33581$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33582  SYMLINK_ORIGINAL="$TEST_COMPILER"
33583
33584  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33585    # Follow a chain of symbolic links. Use readlink
33586    # where it exists, else fall back to horribly
33587    # complicated shell code.
33588    if test "x$READLINK_TESTED" != yes; then
33589      # On MacOSX there is a readlink tool with a different
33590      # purpose than the GNU readlink tool. Check the found readlink.
33591      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33592      if test "x$ISGNU" = x; then
33593        # A readlink that we do not know how to use.
33594        # Are there other non-GNU readlinks out there?
33595        READLINK_TESTED=yes
33596        READLINK=
33597      fi
33598    fi
33599
33600    if test "x$READLINK" != x; then
33601      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33602    else
33603      # Save the current directory for restoring afterwards
33604      STARTDIR=$PWD
33605      COUNTER=0
33606      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33607      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33608      cd $sym_link_dir
33609      # Use -P flag to resolve symlinks in directories.
33610      cd `$THEPWDCMD -P`
33611      sym_link_dir=`$THEPWDCMD -P`
33612      # Resolve file symlinks
33613      while test $COUNTER -lt 20; do
33614        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33615        if test "x$ISLINK" == x; then
33616          # This is not a symbolic link! We are done!
33617          break
33618        fi
33619        # Again resolve directory symlinks since the target of the just found
33620        # link could be in a different directory
33621        cd `$DIRNAME $ISLINK`
33622        sym_link_dir=`$THEPWDCMD -P`
33623        sym_link_file=`$BASENAME $ISLINK`
33624        let COUNTER=COUNTER+1
33625      done
33626      cd $STARTDIR
33627      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33628    fi
33629  fi
33630
33631  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33633$as_echo "no symlink" >&6; }
33634  else
33635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33636$as_echo "$SYMLINK_ORIGINAL" >&6; }
33637
33638    # We can't handle ccache by gcc wrappers, since we need to know if we're
33639    # using ccache. Instead ccache usage must be controlled by a configure option.
33640    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33641    if test "x$COMPILER_BASENAME" = "xccache"; then
33642      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33643$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33644      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33645    fi
33646  fi
33647
33648
33649  COMPILER=$CC
33650  COMPILER_NAME=$COMPILER_NAME
33651
33652  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33653    # cc -V output typically looks like
33654    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33655    # or
33656    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33657    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33658    # Check that this is likely to be the Solaris Studio cc.
33659    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33660    if test $? -ne 0; then
33661      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33662      { $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
33663$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33664      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33665$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33667$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33668      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33669    fi
33670    # Remove usage instructions (if present), and
33671    # collapse compiler output into a single line
33672    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33673        $SED -e 's/ *[Uu]sage:.*//'`
33674    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33675        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33676  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33677    # xlc -qversion output typically looks like
33678    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33679    #     Version: 11.01.0000.0015
33680    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33681    # Check that this is likely to be the IBM XL C compiler.
33682    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33683    if test $? -ne 0; then
33684      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33685      { $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
33686$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33688$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33689      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33690$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33691      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33692    fi
33693    # Collapse compiler output into a single line
33694    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33695    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33696        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33697  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33698    # There is no specific version flag, but all output starts with a version string.
33699    # First line typically looks something like:
33700    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33701    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33702    # Check that this is likely to be Microsoft CL.EXE.
33703    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33704    if test $? -ne 0; then
33705      { $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
33706$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33707      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33708$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33709      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33710    fi
33711    # Collapse compiler output into a single line
33712    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33713    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33714        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33715  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33716    # gcc --version output typically looks like
33717    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33718    #     Copyright (C) 2013 Free Software Foundation, Inc.
33719    #     This is free software; see the source for copying conditions.  There is NO
33720    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33721    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33722    # Check that this is likely to be GCC.
33723    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33724    if test $? -ne 0; then
33725      { $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
33726$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33727      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33728$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33729      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33730    fi
33731    # Remove Copyright and legalese from version string, and
33732    # collapse into a single line
33733    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33734        $SED -e 's/ *Copyright .*//'`
33735    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33736        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33737  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33738    # clang --version output typically looks like
33739    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33740    #    clang version 3.3 (tags/RELEASE_33/final)
33741    # or
33742    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33743    #    Target: x86_64-pc-linux-gnu
33744    #    Thread model: posix
33745    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33746    # Check that this is likely to be clang
33747    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33748    if test $? -ne 0; then
33749      { $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
33750$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33751      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33752$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33753      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33754    fi
33755    # Collapse compiler output into a single line
33756    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33757    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33758        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33759  else
33760      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33761  fi
33762  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33763  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33764  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33765  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33766
33767  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33768$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33769
33770
33771  # Now that we have resolved CC ourself, let autoconf have its go at it
33772  ac_ext=c
33773ac_cpp='$CPP $CPPFLAGS'
33774ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33775ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33776ac_compiler_gnu=$ac_cv_c_compiler_gnu
33777if test -n "$ac_tool_prefix"; then
33778  for ac_prog in $CC
33779  do
33780    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33783$as_echo_n "checking for $ac_word... " >&6; }
33784if ${ac_cv_prog_CC+:} false; then :
33785  $as_echo_n "(cached) " >&6
33786else
33787  if test -n "$CC"; then
33788  ac_cv_prog_CC="$CC" # Let the user override the test.
33789else
33790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33791for as_dir in $PATH
33792do
33793  IFS=$as_save_IFS
33794  test -z "$as_dir" && as_dir=.
33795    for ac_exec_ext in '' $ac_executable_extensions; do
33796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33797    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33799    break 2
33800  fi
33801done
33802  done
33803IFS=$as_save_IFS
33804
33805fi
33806fi
33807CC=$ac_cv_prog_CC
33808if test -n "$CC"; then
33809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33810$as_echo "$CC" >&6; }
33811else
33812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33813$as_echo "no" >&6; }
33814fi
33815
33816
33817    test -n "$CC" && break
33818  done
33819fi
33820if test -z "$CC"; then
33821  ac_ct_CC=$CC
33822  for ac_prog in $CC
33823do
33824  # Extract the first word of "$ac_prog", so it can be a program name with args.
33825set dummy $ac_prog; ac_word=$2
33826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33827$as_echo_n "checking for $ac_word... " >&6; }
33828if ${ac_cv_prog_ac_ct_CC+:} false; then :
33829  $as_echo_n "(cached) " >&6
33830else
33831  if test -n "$ac_ct_CC"; then
33832  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33833else
33834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33835for as_dir in $PATH
33836do
33837  IFS=$as_save_IFS
33838  test -z "$as_dir" && as_dir=.
33839    for ac_exec_ext in '' $ac_executable_extensions; do
33840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33841    ac_cv_prog_ac_ct_CC="$ac_prog"
33842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33843    break 2
33844  fi
33845done
33846  done
33847IFS=$as_save_IFS
33848
33849fi
33850fi
33851ac_ct_CC=$ac_cv_prog_ac_ct_CC
33852if test -n "$ac_ct_CC"; then
33853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33854$as_echo "$ac_ct_CC" >&6; }
33855else
33856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33857$as_echo "no" >&6; }
33858fi
33859
33860
33861  test -n "$ac_ct_CC" && break
33862done
33863
33864  if test "x$ac_ct_CC" = x; then
33865    CC=""
33866  else
33867    case $cross_compiling:$ac_tool_warned in
33868yes:)
33869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33871ac_tool_warned=yes ;;
33872esac
33873    CC=$ac_ct_CC
33874  fi
33875fi
33876
33877
33878test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33880as_fn_error $? "no acceptable C compiler found in \$PATH
33881See \`config.log' for more details" "$LINENO" 5; }
33882
33883# Provide some information about the compiler.
33884$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33885set X $ac_compile
33886ac_compiler=$2
33887for ac_option in --version -v -V -qversion; do
33888  { { ac_try="$ac_compiler $ac_option >&5"
33889case "(($ac_try" in
33890  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33891  *) ac_try_echo=$ac_try;;
33892esac
33893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33894$as_echo "$ac_try_echo"; } >&5
33895  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33896  ac_status=$?
33897  if test -s conftest.err; then
33898    sed '10a\
33899... rest of stderr output deleted ...
33900         10q' conftest.err >conftest.er1
33901    cat conftest.er1 >&5
33902  fi
33903  rm -f conftest.er1 conftest.err
33904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33905  test $ac_status = 0; }
33906done
33907
33908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33909/* end confdefs.h.  */
33910
33911int
33912main ()
33913{
33914
33915  ;
33916  return 0;
33917}
33918_ACEOF
33919ac_clean_files_save=$ac_clean_files
33920ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33921# Try to create an executable without -o first, disregard a.out.
33922# It will help us diagnose broken compilers, and finding out an intuition
33923# of exeext.
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33925$as_echo_n "checking whether the C compiler works... " >&6; }
33926ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33927
33928# The possible output files:
33929ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33930
33931ac_rmfiles=
33932for ac_file in $ac_files
33933do
33934  case $ac_file in
33935    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33936    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33937  esac
33938done
33939rm -f $ac_rmfiles
33940
33941if { { ac_try="$ac_link_default"
33942case "(($ac_try" in
33943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33944  *) ac_try_echo=$ac_try;;
33945esac
33946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33947$as_echo "$ac_try_echo"; } >&5
33948  (eval "$ac_link_default") 2>&5
33949  ac_status=$?
33950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33951  test $ac_status = 0; }; then :
33952  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33953# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33954# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33955# so that the user can short-circuit this test for compilers unknown to
33956# Autoconf.
33957for ac_file in $ac_files ''
33958do
33959  test -f "$ac_file" || continue
33960  case $ac_file in
33961    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33962	;;
33963    [ab].out )
33964	# We found the default executable, but exeext='' is most
33965	# certainly right.
33966	break;;
33967    *.* )
33968	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33969	then :; else
33970	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33971	fi
33972	# We set ac_cv_exeext here because the later test for it is not
33973	# safe: cross compilers may not add the suffix if given an `-o'
33974	# argument, so we may need to know it at that point already.
33975	# Even if this section looks crufty: it has the advantage of
33976	# actually working.
33977	break;;
33978    * )
33979	break;;
33980  esac
33981done
33982test "$ac_cv_exeext" = no && ac_cv_exeext=
33983
33984else
33985  ac_file=''
33986fi
33987if test -z "$ac_file"; then :
33988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33989$as_echo "no" >&6; }
33990$as_echo "$as_me: failed program was:" >&5
33991sed 's/^/| /' conftest.$ac_ext >&5
33992
33993{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33995as_fn_error 77 "C compiler cannot create executables
33996See \`config.log' for more details" "$LINENO" 5; }
33997else
33998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33999$as_echo "yes" >&6; }
34000fi
34001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34002$as_echo_n "checking for C compiler default output file name... " >&6; }
34003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34004$as_echo "$ac_file" >&6; }
34005ac_exeext=$ac_cv_exeext
34006
34007rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34008ac_clean_files=$ac_clean_files_save
34009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34010$as_echo_n "checking for suffix of executables... " >&6; }
34011if { { ac_try="$ac_link"
34012case "(($ac_try" in
34013  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34014  *) ac_try_echo=$ac_try;;
34015esac
34016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34017$as_echo "$ac_try_echo"; } >&5
34018  (eval "$ac_link") 2>&5
34019  ac_status=$?
34020  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34021  test $ac_status = 0; }; then :
34022  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34023# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34024# work properly (i.e., refer to `conftest.exe'), while it won't with
34025# `rm'.
34026for ac_file in conftest.exe conftest conftest.*; do
34027  test -f "$ac_file" || continue
34028  case $ac_file in
34029    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34030    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34031	  break;;
34032    * ) break;;
34033  esac
34034done
34035else
34036  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34038as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34039See \`config.log' for more details" "$LINENO" 5; }
34040fi
34041rm -f conftest conftest$ac_cv_exeext
34042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34043$as_echo "$ac_cv_exeext" >&6; }
34044
34045rm -f conftest.$ac_ext
34046EXEEXT=$ac_cv_exeext
34047ac_exeext=$EXEEXT
34048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34049/* end confdefs.h.  */
34050#include <stdio.h>
34051int
34052main ()
34053{
34054FILE *f = fopen ("conftest.out", "w");
34055 return ferror (f) || fclose (f) != 0;
34056
34057  ;
34058  return 0;
34059}
34060_ACEOF
34061ac_clean_files="$ac_clean_files conftest.out"
34062# Check that the compiler produces executables we can run.  If not, either
34063# the compiler is broken, or we cross compile.
34064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34065$as_echo_n "checking whether we are cross compiling... " >&6; }
34066if test "$cross_compiling" != yes; then
34067  { { ac_try="$ac_link"
34068case "(($ac_try" in
34069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34070  *) ac_try_echo=$ac_try;;
34071esac
34072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34073$as_echo "$ac_try_echo"; } >&5
34074  (eval "$ac_link") 2>&5
34075  ac_status=$?
34076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34077  test $ac_status = 0; }
34078  if { ac_try='./conftest$ac_cv_exeext'
34079  { { case "(($ac_try" in
34080  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34081  *) ac_try_echo=$ac_try;;
34082esac
34083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34084$as_echo "$ac_try_echo"; } >&5
34085  (eval "$ac_try") 2>&5
34086  ac_status=$?
34087  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34088  test $ac_status = 0; }; }; then
34089    cross_compiling=no
34090  else
34091    if test "$cross_compiling" = maybe; then
34092	cross_compiling=yes
34093    else
34094	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34096as_fn_error $? "cannot run C compiled programs.
34097If you meant to cross compile, use \`--host'.
34098See \`config.log' for more details" "$LINENO" 5; }
34099    fi
34100  fi
34101fi
34102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34103$as_echo "$cross_compiling" >&6; }
34104
34105rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34106ac_clean_files=$ac_clean_files_save
34107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34108$as_echo_n "checking for suffix of object files... " >&6; }
34109if ${ac_cv_objext+:} false; then :
34110  $as_echo_n "(cached) " >&6
34111else
34112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34113/* end confdefs.h.  */
34114
34115int
34116main ()
34117{
34118
34119  ;
34120  return 0;
34121}
34122_ACEOF
34123rm -f conftest.o conftest.obj
34124if { { ac_try="$ac_compile"
34125case "(($ac_try" in
34126  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34127  *) ac_try_echo=$ac_try;;
34128esac
34129eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34130$as_echo "$ac_try_echo"; } >&5
34131  (eval "$ac_compile") 2>&5
34132  ac_status=$?
34133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34134  test $ac_status = 0; }; then :
34135  for ac_file in conftest.o conftest.obj conftest.*; do
34136  test -f "$ac_file" || continue;
34137  case $ac_file in
34138    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34139    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34140       break;;
34141  esac
34142done
34143else
34144  $as_echo "$as_me: failed program was:" >&5
34145sed 's/^/| /' conftest.$ac_ext >&5
34146
34147{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34149as_fn_error $? "cannot compute suffix of object files: cannot compile
34150See \`config.log' for more details" "$LINENO" 5; }
34151fi
34152rm -f conftest.$ac_cv_objext conftest.$ac_ext
34153fi
34154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34155$as_echo "$ac_cv_objext" >&6; }
34156OBJEXT=$ac_cv_objext
34157ac_objext=$OBJEXT
34158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34159$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34160if ${ac_cv_c_compiler_gnu+:} false; then :
34161  $as_echo_n "(cached) " >&6
34162else
34163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34164/* end confdefs.h.  */
34165
34166int
34167main ()
34168{
34169#ifndef __GNUC__
34170       choke me
34171#endif
34172
34173  ;
34174  return 0;
34175}
34176_ACEOF
34177if ac_fn_c_try_compile "$LINENO"; then :
34178  ac_compiler_gnu=yes
34179else
34180  ac_compiler_gnu=no
34181fi
34182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34183ac_cv_c_compiler_gnu=$ac_compiler_gnu
34184
34185fi
34186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34187$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34188if test $ac_compiler_gnu = yes; then
34189  GCC=yes
34190else
34191  GCC=
34192fi
34193ac_test_CFLAGS=${CFLAGS+set}
34194ac_save_CFLAGS=$CFLAGS
34195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34196$as_echo_n "checking whether $CC accepts -g... " >&6; }
34197if ${ac_cv_prog_cc_g+:} false; then :
34198  $as_echo_n "(cached) " >&6
34199else
34200  ac_save_c_werror_flag=$ac_c_werror_flag
34201   ac_c_werror_flag=yes
34202   ac_cv_prog_cc_g=no
34203   CFLAGS="-g"
34204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34205/* end confdefs.h.  */
34206
34207int
34208main ()
34209{
34210
34211  ;
34212  return 0;
34213}
34214_ACEOF
34215if ac_fn_c_try_compile "$LINENO"; then :
34216  ac_cv_prog_cc_g=yes
34217else
34218  CFLAGS=""
34219      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34220/* end confdefs.h.  */
34221
34222int
34223main ()
34224{
34225
34226  ;
34227  return 0;
34228}
34229_ACEOF
34230if ac_fn_c_try_compile "$LINENO"; then :
34231
34232else
34233  ac_c_werror_flag=$ac_save_c_werror_flag
34234	 CFLAGS="-g"
34235	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34236/* end confdefs.h.  */
34237
34238int
34239main ()
34240{
34241
34242  ;
34243  return 0;
34244}
34245_ACEOF
34246if ac_fn_c_try_compile "$LINENO"; then :
34247  ac_cv_prog_cc_g=yes
34248fi
34249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34250fi
34251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34252fi
34253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34254   ac_c_werror_flag=$ac_save_c_werror_flag
34255fi
34256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34257$as_echo "$ac_cv_prog_cc_g" >&6; }
34258if test "$ac_test_CFLAGS" = set; then
34259  CFLAGS=$ac_save_CFLAGS
34260elif test $ac_cv_prog_cc_g = yes; then
34261  if test "$GCC" = yes; then
34262    CFLAGS="-g -O2"
34263  else
34264    CFLAGS="-g"
34265  fi
34266else
34267  if test "$GCC" = yes; then
34268    CFLAGS="-O2"
34269  else
34270    CFLAGS=
34271  fi
34272fi
34273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34274$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34275if ${ac_cv_prog_cc_c89+:} false; then :
34276  $as_echo_n "(cached) " >&6
34277else
34278  ac_cv_prog_cc_c89=no
34279ac_save_CC=$CC
34280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34281/* end confdefs.h.  */
34282#include <stdarg.h>
34283#include <stdio.h>
34284struct stat;
34285/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34286struct buf { int x; };
34287FILE * (*rcsopen) (struct buf *, struct stat *, int);
34288static char *e (p, i)
34289     char **p;
34290     int i;
34291{
34292  return p[i];
34293}
34294static char *f (char * (*g) (char **, int), char **p, ...)
34295{
34296  char *s;
34297  va_list v;
34298  va_start (v,p);
34299  s = g (p, va_arg (v,int));
34300  va_end (v);
34301  return s;
34302}
34303
34304/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34305   function prototypes and stuff, but not '\xHH' hex character constants.
34306   These don't provoke an error unfortunately, instead are silently treated
34307   as 'x'.  The following induces an error, until -std is added to get
34308   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34309   array size at least.  It's necessary to write '\x00'==0 to get something
34310   that's true only with -std.  */
34311int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34312
34313/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34314   inside strings and character constants.  */
34315#define FOO(x) 'x'
34316int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34317
34318int test (int i, double x);
34319struct s1 {int (*f) (int a);};
34320struct s2 {int (*f) (double a);};
34321int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34322int argc;
34323char **argv;
34324int
34325main ()
34326{
34327return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34328  ;
34329  return 0;
34330}
34331_ACEOF
34332for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34333	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34334do
34335  CC="$ac_save_CC $ac_arg"
34336  if ac_fn_c_try_compile "$LINENO"; then :
34337  ac_cv_prog_cc_c89=$ac_arg
34338fi
34339rm -f core conftest.err conftest.$ac_objext
34340  test "x$ac_cv_prog_cc_c89" != "xno" && break
34341done
34342rm -f conftest.$ac_ext
34343CC=$ac_save_CC
34344
34345fi
34346# AC_CACHE_VAL
34347case "x$ac_cv_prog_cc_c89" in
34348  x)
34349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34350$as_echo "none needed" >&6; } ;;
34351  xno)
34352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34353$as_echo "unsupported" >&6; } ;;
34354  *)
34355    CC="$CC $ac_cv_prog_cc_c89"
34356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34357$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34358esac
34359if test "x$ac_cv_prog_cc_c89" != xno; then :
34360
34361fi
34362
34363ac_ext=cpp
34364ac_cpp='$CXXCPP $CPPFLAGS'
34365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34368
34369
34370
34371  COMPILER_NAME=C++
34372  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34373
34374  if test "x$CXX" != x; then
34375    # User has supplied compiler name already, always let that override.
34376    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34377$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34378    if test "x`basename $CXX`" = "x$CXX"; then
34379      # A command without a complete path is provided, search $PATH.
34380
34381      for ac_prog in $CXX
34382do
34383  # Extract the first word of "$ac_prog", so it can be a program name with args.
34384set dummy $ac_prog; ac_word=$2
34385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34386$as_echo_n "checking for $ac_word... " >&6; }
34387if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34388  $as_echo_n "(cached) " >&6
34389else
34390  case $POTENTIAL_CXX in
34391  [\\/]* | ?:[\\/]*)
34392  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34393  ;;
34394  *)
34395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34396for as_dir in $PATH
34397do
34398  IFS=$as_save_IFS
34399  test -z "$as_dir" && as_dir=.
34400    for ac_exec_ext in '' $ac_executable_extensions; do
34401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34402    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34404    break 2
34405  fi
34406done
34407  done
34408IFS=$as_save_IFS
34409
34410  ;;
34411esac
34412fi
34413POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34414if test -n "$POTENTIAL_CXX"; then
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34416$as_echo "$POTENTIAL_CXX" >&6; }
34417else
34418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34419$as_echo "no" >&6; }
34420fi
34421
34422
34423  test -n "$POTENTIAL_CXX" && break
34424done
34425
34426      if test "x$POTENTIAL_CXX" != x; then
34427        CXX=$POTENTIAL_CXX
34428      else
34429        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34430      fi
34431    else
34432      # Otherwise it might already be a complete path
34433      if test ! -x "$CXX"; then
34434        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34435      fi
34436    fi
34437  else
34438    # No user supplied value. Locate compiler ourselves.
34439
34440    # If we are cross compiling, assume cross compilation tools follows the
34441    # cross compilation standard where they are prefixed with the autoconf
34442    # standard name for the target. For example the binary
34443    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34444    # If we are not cross compiling, then the default compiler name will be
34445    # used.
34446
34447    CXX=
34448    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34449    # before checking the rest of the PATH.
34450    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34451    # step, this should not be necessary.
34452    if test -n "$TOOLCHAIN_PATH"; then
34453      PATH_save="$PATH"
34454      PATH="$TOOLCHAIN_PATH"
34455      for ac_prog in $SEARCH_LIST
34456do
34457  # Extract the first word of "$ac_prog", so it can be a program name with args.
34458set dummy $ac_prog; ac_word=$2
34459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34460$as_echo_n "checking for $ac_word... " >&6; }
34461if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34462  $as_echo_n "(cached) " >&6
34463else
34464  case $TOOLCHAIN_PATH_CXX in
34465  [\\/]* | ?:[\\/]*)
34466  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34467  ;;
34468  *)
34469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34470for as_dir in $PATH
34471do
34472  IFS=$as_save_IFS
34473  test -z "$as_dir" && as_dir=.
34474    for ac_exec_ext in '' $ac_executable_extensions; do
34475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34476    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34478    break 2
34479  fi
34480done
34481  done
34482IFS=$as_save_IFS
34483
34484  ;;
34485esac
34486fi
34487TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34488if test -n "$TOOLCHAIN_PATH_CXX"; then
34489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34490$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34491else
34492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34493$as_echo "no" >&6; }
34494fi
34495
34496
34497  test -n "$TOOLCHAIN_PATH_CXX" && break
34498done
34499
34500      CXX=$TOOLCHAIN_PATH_CXX
34501      PATH="$PATH_save"
34502    fi
34503
34504    # AC_PATH_PROGS can't be run multiple times with the same variable,
34505    # so create a new name for this run.
34506    if test "x$CXX" = x; then
34507      for ac_prog in $SEARCH_LIST
34508do
34509  # Extract the first word of "$ac_prog", so it can be a program name with args.
34510set dummy $ac_prog; ac_word=$2
34511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34512$as_echo_n "checking for $ac_word... " >&6; }
34513if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34514  $as_echo_n "(cached) " >&6
34515else
34516  case $POTENTIAL_CXX in
34517  [\\/]* | ?:[\\/]*)
34518  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34519  ;;
34520  *)
34521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34522for as_dir in $PATH
34523do
34524  IFS=$as_save_IFS
34525  test -z "$as_dir" && as_dir=.
34526    for ac_exec_ext in '' $ac_executable_extensions; do
34527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34528    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34530    break 2
34531  fi
34532done
34533  done
34534IFS=$as_save_IFS
34535
34536  ;;
34537esac
34538fi
34539POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34540if test -n "$POTENTIAL_CXX"; then
34541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34542$as_echo "$POTENTIAL_CXX" >&6; }
34543else
34544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34545$as_echo "no" >&6; }
34546fi
34547
34548
34549  test -n "$POTENTIAL_CXX" && break
34550done
34551
34552      CXX=$POTENTIAL_CXX
34553    fi
34554
34555    if test "x$CXX" = x; then
34556
34557  # Print a helpful message on how to acquire the necessary build dependency.
34558  # devkit is the help tag: freetype, cups, alsa etc
34559  MISSING_DEPENDENCY=devkit
34560
34561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34562    cygwin_help $MISSING_DEPENDENCY
34563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34564    msys_help $MISSING_DEPENDENCY
34565  else
34566    PKGHANDLER_COMMAND=
34567
34568    case $PKGHANDLER in
34569      apt-get)
34570        apt_help     $MISSING_DEPENDENCY ;;
34571      yum)
34572        yum_help     $MISSING_DEPENDENCY ;;
34573      brew)
34574        brew_help    $MISSING_DEPENDENCY ;;
34575      port)
34576        port_help    $MISSING_DEPENDENCY ;;
34577      pkgutil)
34578        pkgutil_help $MISSING_DEPENDENCY ;;
34579      pkgadd)
34580        pkgadd_help  $MISSING_DEPENDENCY ;;
34581    esac
34582
34583    if test "x$PKGHANDLER_COMMAND" != x; then
34584      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34585    fi
34586  fi
34587
34588      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34589    fi
34590  fi
34591
34592  # Now we have a compiler binary in CXX. Make sure it's okay.
34593
34594  # Only process if variable expands to non-empty
34595
34596  if test "x$CXX" != x; then
34597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34598
34599  # First separate the path from the arguments. This will split at the first
34600  # space.
34601  complete="$CXX"
34602  path="${complete%% *}"
34603  tmp="$complete EOL"
34604  arguments="${tmp#* }"
34605
34606  # Input might be given as Windows format, start by converting to
34607  # unix format.
34608  new_path=`$CYGPATH -u "$path"`
34609
34610  # Now try to locate executable using which
34611  new_path=`$WHICH "$new_path" 2> /dev/null`
34612  # bat and cmd files are not always considered executable in cygwin causing which
34613  # to not find them
34614  if test "x$new_path" = x \
34615      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34616      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34617    new_path=`$CYGPATH -u "$path"`
34618  fi
34619  if test "x$new_path" = x; then
34620    # Oops. Which didn't find the executable.
34621    # The splitting of arguments from the executable at a space might have been incorrect,
34622    # since paths with space are more likely in Windows. Give it another try with the whole
34623    # argument.
34624    path="$complete"
34625    arguments="EOL"
34626    new_path=`$CYGPATH -u "$path"`
34627    new_path=`$WHICH "$new_path" 2> /dev/null`
34628    # bat and cmd files are not always considered executable in cygwin causing which
34629    # to not find them
34630    if test "x$new_path" = x \
34631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34633      new_path=`$CYGPATH -u "$path"`
34634    fi
34635    if test "x$new_path" = x; then
34636      # It's still not found. Now this is an unrecoverable error.
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34638$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34639      has_space=`$ECHO "$complete" | $GREP " "`
34640      if test "x$has_space" != x; then
34641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34643      fi
34644      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34645    fi
34646  fi
34647
34648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34651  # "foo.exe" is OK but "foo" is an error.
34652  #
34653  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34654  # It is also a way to make sure we got the proper file name for the real test later on.
34655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34656  if test "x$test_shortpath" = x; then
34657    # Short path failed, file does not exist as specified.
34658    # Try adding .exe or .cmd
34659    if test -f "${new_path}.exe"; then
34660      input_to_shortpath="${new_path}.exe"
34661    elif test -f "${new_path}.cmd"; then
34662      input_to_shortpath="${new_path}.cmd"
34663    else
34664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34665$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34666      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34667$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34668      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34669    fi
34670  else
34671    input_to_shortpath="$new_path"
34672  fi
34673
34674  # Call helper function which possibly converts this using DOS-style short mode.
34675  # If so, the updated path is stored in $new_path.
34676  new_path="$input_to_shortpath"
34677
34678  input_path="$input_to_shortpath"
34679  # Check if we need to convert this using DOS-style short mode. If the path
34680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34681  # take no chances and rewrite it.
34682  # Note: m4 eats our [], so we need to use [ and ] instead.
34683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34684  if test "x$has_forbidden_chars" != x; then
34685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34689      # Going to short mode and back again did indeed matter. Since short mode is
34690      # case insensitive, let's make it lowercase to improve readability.
34691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34692      # Now convert it back to Unix-style (cygpath)
34693      input_path=`$CYGPATH -u "$shortmode_path"`
34694      new_path="$input_path"
34695    fi
34696  fi
34697
34698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34699  if test "x$test_cygdrive_prefix" = x; then
34700    # As a simple fix, exclude /usr/bin since it's not a real path.
34701    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34703      # a path prefixed by /cygdrive for fixpath to work.
34704      new_path="$CYGWIN_ROOT_PATH$input_path"
34705    fi
34706  fi
34707
34708  # remove trailing .exe if any
34709  new_path="${new_path/%.exe/}"
34710
34711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34712
34713  # First separate the path from the arguments. This will split at the first
34714  # space.
34715  complete="$CXX"
34716  path="${complete%% *}"
34717  tmp="$complete EOL"
34718  arguments="${tmp#* }"
34719
34720  # Input might be given as Windows format, start by converting to
34721  # unix format.
34722  new_path="$path"
34723
34724  windows_path="$new_path"
34725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34726    unix_path=`$CYGPATH -u "$windows_path"`
34727    new_path="$unix_path"
34728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34730    new_path="$unix_path"
34731  fi
34732
34733
34734  # Now try to locate executable using which
34735  new_path=`$WHICH "$new_path" 2> /dev/null`
34736
34737  if test "x$new_path" = x; then
34738    # Oops. Which didn't find the executable.
34739    # The splitting of arguments from the executable at a space might have been incorrect,
34740    # since paths with space are more likely in Windows. Give it another try with the whole
34741    # argument.
34742    path="$complete"
34743    arguments="EOL"
34744    new_path="$path"
34745
34746  windows_path="$new_path"
34747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34748    unix_path=`$CYGPATH -u "$windows_path"`
34749    new_path="$unix_path"
34750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34752    new_path="$unix_path"
34753  fi
34754
34755
34756    new_path=`$WHICH "$new_path" 2> /dev/null`
34757    # bat and cmd files are not always considered executable in MSYS causing which
34758    # to not find them
34759    if test "x$new_path" = x \
34760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34762      new_path="$path"
34763
34764  windows_path="$new_path"
34765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34766    unix_path=`$CYGPATH -u "$windows_path"`
34767    new_path="$unix_path"
34768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34770    new_path="$unix_path"
34771  fi
34772
34773    fi
34774
34775    if test "x$new_path" = x; then
34776      # It's still not found. Now this is an unrecoverable error.
34777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34778$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34779      has_space=`$ECHO "$complete" | $GREP " "`
34780      if test "x$has_space" != x; then
34781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34783      fi
34784      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34785    fi
34786  fi
34787
34788  # Now new_path has a complete unix path to the binary
34789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34790    # Keep paths in /bin as-is, but remove trailing .exe if any
34791    new_path="${new_path/%.exe/}"
34792    # Do not save /bin paths to all_fixpath_prefixes!
34793  else
34794    # Not in mixed or Windows style, start by that.
34795    new_path=`cmd //c echo $new_path`
34796
34797  input_path="$new_path"
34798  # Check if we need to convert this using DOS-style short mode. If the path
34799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34800  # take no chances and rewrite it.
34801  # Note: m4 eats our [], so we need to use [ and ] instead.
34802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34803  if test "x$has_forbidden_chars" != x; then
34804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34806  fi
34807
34808    # Output is in $new_path
34809
34810  windows_path="$new_path"
34811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34812    unix_path=`$CYGPATH -u "$windows_path"`
34813    new_path="$unix_path"
34814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34816    new_path="$unix_path"
34817  fi
34818
34819    # remove trailing .exe if any
34820    new_path="${new_path/%.exe/}"
34821
34822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34824  fi
34825
34826    else
34827      # We're on a unix platform. Hooray! :)
34828      # First separate the path from the arguments. This will split at the first
34829      # space.
34830      complete="$CXX"
34831      path="${complete%% *}"
34832      tmp="$complete EOL"
34833      arguments="${tmp#* }"
34834
34835      # Cannot rely on the command "which" here since it doesn't always work.
34836      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34837      if test -z "$is_absolute_path"; then
34838        # Path to executable is not absolute. Find it.
34839        IFS_save="$IFS"
34840        IFS=:
34841        for p in $PATH; do
34842          if test -f "$p/$path" && test -x "$p/$path"; then
34843            new_path="$p/$path"
34844            break
34845          fi
34846        done
34847        IFS="$IFS_save"
34848      else
34849        # This is an absolute path, we can use it without further modifications.
34850        new_path="$path"
34851      fi
34852
34853      if test "x$new_path" = x; then
34854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34855$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34856        has_space=`$ECHO "$complete" | $GREP " "`
34857        if test "x$has_space" != x; then
34858          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34859$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34860        fi
34861        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34862      fi
34863    fi
34864
34865    # Now join together the path and the arguments once again
34866    if test "x$arguments" != xEOL; then
34867      new_complete="$new_path ${arguments% *}"
34868    else
34869      new_complete="$new_path"
34870    fi
34871
34872    if test "x$complete" != "x$new_complete"; then
34873      CXX="$new_complete"
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34875$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34876    fi
34877  fi
34878
34879  TEST_COMPILER="$CXX"
34880
34881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34882$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34883  SYMLINK_ORIGINAL="$TEST_COMPILER"
34884
34885  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34886    # Follow a chain of symbolic links. Use readlink
34887    # where it exists, else fall back to horribly
34888    # complicated shell code.
34889    if test "x$READLINK_TESTED" != yes; then
34890      # On MacOSX there is a readlink tool with a different
34891      # purpose than the GNU readlink tool. Check the found readlink.
34892      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34893      if test "x$ISGNU" = x; then
34894        # A readlink that we do not know how to use.
34895        # Are there other non-GNU readlinks out there?
34896        READLINK_TESTED=yes
34897        READLINK=
34898      fi
34899    fi
34900
34901    if test "x$READLINK" != x; then
34902      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34903    else
34904      # Save the current directory for restoring afterwards
34905      STARTDIR=$PWD
34906      COUNTER=0
34907      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34908      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34909      cd $sym_link_dir
34910      # Use -P flag to resolve symlinks in directories.
34911      cd `$THEPWDCMD -P`
34912      sym_link_dir=`$THEPWDCMD -P`
34913      # Resolve file symlinks
34914      while test $COUNTER -lt 20; do
34915        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34916        if test "x$ISLINK" == x; then
34917          # This is not a symbolic link! We are done!
34918          break
34919        fi
34920        # Again resolve directory symlinks since the target of the just found
34921        # link could be in a different directory
34922        cd `$DIRNAME $ISLINK`
34923        sym_link_dir=`$THEPWDCMD -P`
34924        sym_link_file=`$BASENAME $ISLINK`
34925        let COUNTER=COUNTER+1
34926      done
34927      cd $STARTDIR
34928      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34929    fi
34930  fi
34931
34932  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34934$as_echo "no symlink" >&6; }
34935  else
34936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34937$as_echo "$SYMLINK_ORIGINAL" >&6; }
34938
34939    # We can't handle ccache by gcc wrappers, since we need to know if we're
34940    # using ccache. Instead ccache usage must be controlled by a configure option.
34941    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34942    if test "x$COMPILER_BASENAME" = "xccache"; then
34943      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34944$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34945      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34946    fi
34947  fi
34948
34949
34950  COMPILER=$CXX
34951  COMPILER_NAME=$COMPILER_NAME
34952
34953  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34954    # cc -V output typically looks like
34955    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34956    # or
34957    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34958    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34959    # Check that this is likely to be the Solaris Studio cc.
34960    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34961    if test $? -ne 0; then
34962      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34963      { $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
34964$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34965      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34966$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34967      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34968$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34969      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34970    fi
34971    # Remove usage instructions (if present), and
34972    # collapse compiler output into a single line
34973    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34974        $SED -e 's/ *[Uu]sage:.*//'`
34975    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34976        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34977  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34978    # xlc -qversion output typically looks like
34979    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34980    #     Version: 11.01.0000.0015
34981    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34982    # Check that this is likely to be the IBM XL C compiler.
34983    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34984    if test $? -ne 0; then
34985      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34986      { $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
34987$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34989$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34990      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34991$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34992      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34993    fi
34994    # Collapse compiler output into a single line
34995    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34996    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34997        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34998  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34999    # There is no specific version flag, but all output starts with a version string.
35000    # First line typically looks something like:
35001    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35002    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35003    # Check that this is likely to be Microsoft CL.EXE.
35004    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35005    if test $? -ne 0; then
35006      { $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
35007$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35009$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35010      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35011    fi
35012    # Collapse compiler output into a single line
35013    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35014    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35015        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35016  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35017    # gcc --version output typically looks like
35018    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35019    #     Copyright (C) 2013 Free Software Foundation, Inc.
35020    #     This is free software; see the source for copying conditions.  There is NO
35021    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35022    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35023    # Check that this is likely to be GCC.
35024    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35025    if test $? -ne 0; then
35026      { $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
35027$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35028      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35029$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35030      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35031    fi
35032    # Remove Copyright and legalese from version string, and
35033    # collapse into a single line
35034    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35035        $SED -e 's/ *Copyright .*//'`
35036    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35037        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35038  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35039    # clang --version output typically looks like
35040    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35041    #    clang version 3.3 (tags/RELEASE_33/final)
35042    # or
35043    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35044    #    Target: x86_64-pc-linux-gnu
35045    #    Thread model: posix
35046    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35047    # Check that this is likely to be clang
35048    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35049    if test $? -ne 0; then
35050      { $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
35051$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35052      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35053$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35054      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35055    fi
35056    # Collapse compiler output into a single line
35057    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35058    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35059        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35060  else
35061      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35062  fi
35063  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35064  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35065  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35066  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35067
35068  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35069$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35070
35071
35072  # Now that we have resolved CXX ourself, let autoconf have its go at it
35073  ac_ext=cpp
35074ac_cpp='$CXXCPP $CPPFLAGS'
35075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35078if test -z "$CXX"; then
35079  if test -n "$CCC"; then
35080    CXX=$CCC
35081  else
35082    if test -n "$ac_tool_prefix"; then
35083  for ac_prog in $CXX
35084  do
35085    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35088$as_echo_n "checking for $ac_word... " >&6; }
35089if ${ac_cv_prog_CXX+:} false; then :
35090  $as_echo_n "(cached) " >&6
35091else
35092  if test -n "$CXX"; then
35093  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35094else
35095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35096for as_dir in $PATH
35097do
35098  IFS=$as_save_IFS
35099  test -z "$as_dir" && as_dir=.
35100    for ac_exec_ext in '' $ac_executable_extensions; do
35101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35102    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35104    break 2
35105  fi
35106done
35107  done
35108IFS=$as_save_IFS
35109
35110fi
35111fi
35112CXX=$ac_cv_prog_CXX
35113if test -n "$CXX"; then
35114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35115$as_echo "$CXX" >&6; }
35116else
35117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35118$as_echo "no" >&6; }
35119fi
35120
35121
35122    test -n "$CXX" && break
35123  done
35124fi
35125if test -z "$CXX"; then
35126  ac_ct_CXX=$CXX
35127  for ac_prog in $CXX
35128do
35129  # Extract the first word of "$ac_prog", so it can be a program name with args.
35130set dummy $ac_prog; ac_word=$2
35131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35132$as_echo_n "checking for $ac_word... " >&6; }
35133if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35134  $as_echo_n "(cached) " >&6
35135else
35136  if test -n "$ac_ct_CXX"; then
35137  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35138else
35139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35140for as_dir in $PATH
35141do
35142  IFS=$as_save_IFS
35143  test -z "$as_dir" && as_dir=.
35144    for ac_exec_ext in '' $ac_executable_extensions; do
35145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35146    ac_cv_prog_ac_ct_CXX="$ac_prog"
35147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35148    break 2
35149  fi
35150done
35151  done
35152IFS=$as_save_IFS
35153
35154fi
35155fi
35156ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35157if test -n "$ac_ct_CXX"; then
35158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35159$as_echo "$ac_ct_CXX" >&6; }
35160else
35161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35162$as_echo "no" >&6; }
35163fi
35164
35165
35166  test -n "$ac_ct_CXX" && break
35167done
35168
35169  if test "x$ac_ct_CXX" = x; then
35170    CXX="g++"
35171  else
35172    case $cross_compiling:$ac_tool_warned in
35173yes:)
35174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35176ac_tool_warned=yes ;;
35177esac
35178    CXX=$ac_ct_CXX
35179  fi
35180fi
35181
35182  fi
35183fi
35184# Provide some information about the compiler.
35185$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35186set X $ac_compile
35187ac_compiler=$2
35188for ac_option in --version -v -V -qversion; do
35189  { { ac_try="$ac_compiler $ac_option >&5"
35190case "(($ac_try" in
35191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35192  *) ac_try_echo=$ac_try;;
35193esac
35194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35195$as_echo "$ac_try_echo"; } >&5
35196  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35197  ac_status=$?
35198  if test -s conftest.err; then
35199    sed '10a\
35200... rest of stderr output deleted ...
35201         10q' conftest.err >conftest.er1
35202    cat conftest.er1 >&5
35203  fi
35204  rm -f conftest.er1 conftest.err
35205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35206  test $ac_status = 0; }
35207done
35208
35209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35210$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35211if ${ac_cv_cxx_compiler_gnu+:} false; then :
35212  $as_echo_n "(cached) " >&6
35213else
35214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35215/* end confdefs.h.  */
35216
35217int
35218main ()
35219{
35220#ifndef __GNUC__
35221       choke me
35222#endif
35223
35224  ;
35225  return 0;
35226}
35227_ACEOF
35228if ac_fn_cxx_try_compile "$LINENO"; then :
35229  ac_compiler_gnu=yes
35230else
35231  ac_compiler_gnu=no
35232fi
35233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35234ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35235
35236fi
35237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35238$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35239if test $ac_compiler_gnu = yes; then
35240  GXX=yes
35241else
35242  GXX=
35243fi
35244ac_test_CXXFLAGS=${CXXFLAGS+set}
35245ac_save_CXXFLAGS=$CXXFLAGS
35246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35247$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35248if ${ac_cv_prog_cxx_g+:} false; then :
35249  $as_echo_n "(cached) " >&6
35250else
35251  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35252   ac_cxx_werror_flag=yes
35253   ac_cv_prog_cxx_g=no
35254   CXXFLAGS="-g"
35255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35256/* end confdefs.h.  */
35257
35258int
35259main ()
35260{
35261
35262  ;
35263  return 0;
35264}
35265_ACEOF
35266if ac_fn_cxx_try_compile "$LINENO"; then :
35267  ac_cv_prog_cxx_g=yes
35268else
35269  CXXFLAGS=""
35270      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35271/* end confdefs.h.  */
35272
35273int
35274main ()
35275{
35276
35277  ;
35278  return 0;
35279}
35280_ACEOF
35281if ac_fn_cxx_try_compile "$LINENO"; then :
35282
35283else
35284  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35285	 CXXFLAGS="-g"
35286	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35287/* end confdefs.h.  */
35288
35289int
35290main ()
35291{
35292
35293  ;
35294  return 0;
35295}
35296_ACEOF
35297if ac_fn_cxx_try_compile "$LINENO"; then :
35298  ac_cv_prog_cxx_g=yes
35299fi
35300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35301fi
35302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35303fi
35304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35305   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35306fi
35307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35308$as_echo "$ac_cv_prog_cxx_g" >&6; }
35309if test "$ac_test_CXXFLAGS" = set; then
35310  CXXFLAGS=$ac_save_CXXFLAGS
35311elif test $ac_cv_prog_cxx_g = yes; then
35312  if test "$GXX" = yes; then
35313    CXXFLAGS="-g -O2"
35314  else
35315    CXXFLAGS="-g"
35316  fi
35317else
35318  if test "$GXX" = yes; then
35319    CXXFLAGS="-O2"
35320  else
35321    CXXFLAGS=
35322  fi
35323fi
35324ac_ext=cpp
35325ac_cpp='$CXXCPP $CPPFLAGS'
35326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35329
35330
35331  # This is the compiler version number on the form X.Y[.Z]
35332
35333
35334
35335
35336  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35337    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35338$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35339    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35340$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35341  fi
35342
35343  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35344  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35345    { $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
35346$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;}
35347  fi
35348
35349  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35350    { $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
35351$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35352  fi
35353
35354  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35355
35356
35357  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407    # Execute function body
35408
35409  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35410  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35411
35412  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35413    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35414  fi
35415
35416  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35417    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35418  fi
35419
35420  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35421  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35422
35423  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35424    :
35425
35426  else
35427    :
35428
35429          { $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
35430$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35431
35432
35433  fi
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448  fi
35449
35450  #
35451  # Setup the preprocessor (CPP and CXXCPP)
35452  #
35453  ac_ext=c
35454ac_cpp='$CPP $CPPFLAGS'
35455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35457ac_compiler_gnu=$ac_cv_c_compiler_gnu
35458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35459$as_echo_n "checking how to run the C preprocessor... " >&6; }
35460# On Suns, sometimes $CPP names a directory.
35461if test -n "$CPP" && test -d "$CPP"; then
35462  CPP=
35463fi
35464if test -z "$CPP"; then
35465  if ${ac_cv_prog_CPP+:} false; then :
35466  $as_echo_n "(cached) " >&6
35467else
35468      # Double quotes because CPP needs to be expanded
35469    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35470    do
35471      ac_preproc_ok=false
35472for ac_c_preproc_warn_flag in '' yes
35473do
35474  # Use a header file that comes with gcc, so configuring glibc
35475  # with a fresh cross-compiler works.
35476  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35477  # <limits.h> exists even on freestanding compilers.
35478  # On the NeXT, cc -E runs the code through the compiler's parser,
35479  # not just through cpp. "Syntax error" is here to catch this case.
35480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35481/* end confdefs.h.  */
35482#ifdef __STDC__
35483# include <limits.h>
35484#else
35485# include <assert.h>
35486#endif
35487		     Syntax error
35488_ACEOF
35489if ac_fn_c_try_cpp "$LINENO"; then :
35490
35491else
35492  # Broken: fails on valid input.
35493continue
35494fi
35495rm -f conftest.err conftest.i conftest.$ac_ext
35496
35497  # OK, works on sane cases.  Now check whether nonexistent headers
35498  # can be detected and how.
35499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35500/* end confdefs.h.  */
35501#include <ac_nonexistent.h>
35502_ACEOF
35503if ac_fn_c_try_cpp "$LINENO"; then :
35504  # Broken: success on invalid input.
35505continue
35506else
35507  # Passes both tests.
35508ac_preproc_ok=:
35509break
35510fi
35511rm -f conftest.err conftest.i conftest.$ac_ext
35512
35513done
35514# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35515rm -f conftest.i conftest.err conftest.$ac_ext
35516if $ac_preproc_ok; then :
35517  break
35518fi
35519
35520    done
35521    ac_cv_prog_CPP=$CPP
35522
35523fi
35524  CPP=$ac_cv_prog_CPP
35525else
35526  ac_cv_prog_CPP=$CPP
35527fi
35528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35529$as_echo "$CPP" >&6; }
35530ac_preproc_ok=false
35531for ac_c_preproc_warn_flag in '' yes
35532do
35533  # Use a header file that comes with gcc, so configuring glibc
35534  # with a fresh cross-compiler works.
35535  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35536  # <limits.h> exists even on freestanding compilers.
35537  # On the NeXT, cc -E runs the code through the compiler's parser,
35538  # not just through cpp. "Syntax error" is here to catch this case.
35539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35540/* end confdefs.h.  */
35541#ifdef __STDC__
35542# include <limits.h>
35543#else
35544# include <assert.h>
35545#endif
35546		     Syntax error
35547_ACEOF
35548if ac_fn_c_try_cpp "$LINENO"; then :
35549
35550else
35551  # Broken: fails on valid input.
35552continue
35553fi
35554rm -f conftest.err conftest.i conftest.$ac_ext
35555
35556  # OK, works on sane cases.  Now check whether nonexistent headers
35557  # can be detected and how.
35558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35559/* end confdefs.h.  */
35560#include <ac_nonexistent.h>
35561_ACEOF
35562if ac_fn_c_try_cpp "$LINENO"; then :
35563  # Broken: success on invalid input.
35564continue
35565else
35566  # Passes both tests.
35567ac_preproc_ok=:
35568break
35569fi
35570rm -f conftest.err conftest.i conftest.$ac_ext
35571
35572done
35573# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35574rm -f conftest.i conftest.err conftest.$ac_ext
35575if $ac_preproc_ok; then :
35576
35577else
35578  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35580as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35581See \`config.log' for more details" "$LINENO" 5; }
35582fi
35583
35584ac_ext=cpp
35585ac_cpp='$CXXCPP $CPPFLAGS'
35586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35589
35590
35591  # Only process if variable expands to non-empty
35592
35593  if test "x$CPP" != x; then
35594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35595
35596  # First separate the path from the arguments. This will split at the first
35597  # space.
35598  complete="$CPP"
35599  path="${complete%% *}"
35600  tmp="$complete EOL"
35601  arguments="${tmp#* }"
35602
35603  # Input might be given as Windows format, start by converting to
35604  # unix format.
35605  new_path=`$CYGPATH -u "$path"`
35606
35607  # Now try to locate executable using which
35608  new_path=`$WHICH "$new_path" 2> /dev/null`
35609  # bat and cmd files are not always considered executable in cygwin causing which
35610  # to not find them
35611  if test "x$new_path" = x \
35612      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35613      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35614    new_path=`$CYGPATH -u "$path"`
35615  fi
35616  if test "x$new_path" = x; then
35617    # Oops. Which didn't find the executable.
35618    # The splitting of arguments from the executable at a space might have been incorrect,
35619    # since paths with space are more likely in Windows. Give it another try with the whole
35620    # argument.
35621    path="$complete"
35622    arguments="EOL"
35623    new_path=`$CYGPATH -u "$path"`
35624    new_path=`$WHICH "$new_path" 2> /dev/null`
35625    # bat and cmd files are not always considered executable in cygwin causing which
35626    # to not find them
35627    if test "x$new_path" = x \
35628        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35629        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35630      new_path=`$CYGPATH -u "$path"`
35631    fi
35632    if test "x$new_path" = x; then
35633      # It's still not found. Now this is an unrecoverable error.
35634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35635$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35636      has_space=`$ECHO "$complete" | $GREP " "`
35637      if test "x$has_space" != x; then
35638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35640      fi
35641      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35642    fi
35643  fi
35644
35645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35648  # "foo.exe" is OK but "foo" is an error.
35649  #
35650  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35651  # It is also a way to make sure we got the proper file name for the real test later on.
35652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35653  if test "x$test_shortpath" = x; then
35654    # Short path failed, file does not exist as specified.
35655    # Try adding .exe or .cmd
35656    if test -f "${new_path}.exe"; then
35657      input_to_shortpath="${new_path}.exe"
35658    elif test -f "${new_path}.cmd"; then
35659      input_to_shortpath="${new_path}.cmd"
35660    else
35661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35662$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35663      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35664$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35665      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35666    fi
35667  else
35668    input_to_shortpath="$new_path"
35669  fi
35670
35671  # Call helper function which possibly converts this using DOS-style short mode.
35672  # If so, the updated path is stored in $new_path.
35673  new_path="$input_to_shortpath"
35674
35675  input_path="$input_to_shortpath"
35676  # Check if we need to convert this using DOS-style short mode. If the path
35677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35678  # take no chances and rewrite it.
35679  # Note: m4 eats our [], so we need to use [ and ] instead.
35680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35681  if test "x$has_forbidden_chars" != x; then
35682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35686      # Going to short mode and back again did indeed matter. Since short mode is
35687      # case insensitive, let's make it lowercase to improve readability.
35688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35689      # Now convert it back to Unix-style (cygpath)
35690      input_path=`$CYGPATH -u "$shortmode_path"`
35691      new_path="$input_path"
35692    fi
35693  fi
35694
35695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35696  if test "x$test_cygdrive_prefix" = x; then
35697    # As a simple fix, exclude /usr/bin since it's not a real path.
35698    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35700      # a path prefixed by /cygdrive for fixpath to work.
35701      new_path="$CYGWIN_ROOT_PATH$input_path"
35702    fi
35703  fi
35704
35705  # remove trailing .exe if any
35706  new_path="${new_path/%.exe/}"
35707
35708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35709
35710  # First separate the path from the arguments. This will split at the first
35711  # space.
35712  complete="$CPP"
35713  path="${complete%% *}"
35714  tmp="$complete EOL"
35715  arguments="${tmp#* }"
35716
35717  # Input might be given as Windows format, start by converting to
35718  # unix format.
35719  new_path="$path"
35720
35721  windows_path="$new_path"
35722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35723    unix_path=`$CYGPATH -u "$windows_path"`
35724    new_path="$unix_path"
35725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35727    new_path="$unix_path"
35728  fi
35729
35730
35731  # Now try to locate executable using which
35732  new_path=`$WHICH "$new_path" 2> /dev/null`
35733
35734  if test "x$new_path" = x; then
35735    # Oops. Which didn't find the executable.
35736    # The splitting of arguments from the executable at a space might have been incorrect,
35737    # since paths with space are more likely in Windows. Give it another try with the whole
35738    # argument.
35739    path="$complete"
35740    arguments="EOL"
35741    new_path="$path"
35742
35743  windows_path="$new_path"
35744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35745    unix_path=`$CYGPATH -u "$windows_path"`
35746    new_path="$unix_path"
35747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35749    new_path="$unix_path"
35750  fi
35751
35752
35753    new_path=`$WHICH "$new_path" 2> /dev/null`
35754    # bat and cmd files are not always considered executable in MSYS causing which
35755    # to not find them
35756    if test "x$new_path" = x \
35757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35759      new_path="$path"
35760
35761  windows_path="$new_path"
35762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35763    unix_path=`$CYGPATH -u "$windows_path"`
35764    new_path="$unix_path"
35765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35767    new_path="$unix_path"
35768  fi
35769
35770    fi
35771
35772    if test "x$new_path" = x; then
35773      # It's still not found. Now this is an unrecoverable error.
35774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35775$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35776      has_space=`$ECHO "$complete" | $GREP " "`
35777      if test "x$has_space" != x; then
35778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35780      fi
35781      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35782    fi
35783  fi
35784
35785  # Now new_path has a complete unix path to the binary
35786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35787    # Keep paths in /bin as-is, but remove trailing .exe if any
35788    new_path="${new_path/%.exe/}"
35789    # Do not save /bin paths to all_fixpath_prefixes!
35790  else
35791    # Not in mixed or Windows style, start by that.
35792    new_path=`cmd //c echo $new_path`
35793
35794  input_path="$new_path"
35795  # Check if we need to convert this using DOS-style short mode. If the path
35796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35797  # take no chances and rewrite it.
35798  # Note: m4 eats our [], so we need to use [ and ] instead.
35799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35800  if test "x$has_forbidden_chars" != x; then
35801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35803  fi
35804
35805    # Output is in $new_path
35806
35807  windows_path="$new_path"
35808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35809    unix_path=`$CYGPATH -u "$windows_path"`
35810    new_path="$unix_path"
35811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35813    new_path="$unix_path"
35814  fi
35815
35816    # remove trailing .exe if any
35817    new_path="${new_path/%.exe/}"
35818
35819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35821  fi
35822
35823    else
35824      # We're on a unix platform. Hooray! :)
35825      # First separate the path from the arguments. This will split at the first
35826      # space.
35827      complete="$CPP"
35828      path="${complete%% *}"
35829      tmp="$complete EOL"
35830      arguments="${tmp#* }"
35831
35832      # Cannot rely on the command "which" here since it doesn't always work.
35833      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35834      if test -z "$is_absolute_path"; then
35835        # Path to executable is not absolute. Find it.
35836        IFS_save="$IFS"
35837        IFS=:
35838        for p in $PATH; do
35839          if test -f "$p/$path" && test -x "$p/$path"; then
35840            new_path="$p/$path"
35841            break
35842          fi
35843        done
35844        IFS="$IFS_save"
35845      else
35846        # This is an absolute path, we can use it without further modifications.
35847        new_path="$path"
35848      fi
35849
35850      if test "x$new_path" = x; then
35851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35852$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35853        has_space=`$ECHO "$complete" | $GREP " "`
35854        if test "x$has_space" != x; then
35855          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35856$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35857        fi
35858        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35859      fi
35860    fi
35861
35862    # Now join together the path and the arguments once again
35863    if test "x$arguments" != xEOL; then
35864      new_complete="$new_path ${arguments% *}"
35865    else
35866      new_complete="$new_path"
35867    fi
35868
35869    if test "x$complete" != "x$new_complete"; then
35870      CPP="$new_complete"
35871      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35872$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35873    fi
35874  fi
35875
35876  ac_ext=cpp
35877ac_cpp='$CXXCPP $CPPFLAGS'
35878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35882$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35883if test -z "$CXXCPP"; then
35884  if ${ac_cv_prog_CXXCPP+:} false; then :
35885  $as_echo_n "(cached) " >&6
35886else
35887      # Double quotes because CXXCPP needs to be expanded
35888    for CXXCPP in "$CXX -E" "/lib/cpp"
35889    do
35890      ac_preproc_ok=false
35891for ac_cxx_preproc_warn_flag in '' yes
35892do
35893  # Use a header file that comes with gcc, so configuring glibc
35894  # with a fresh cross-compiler works.
35895  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35896  # <limits.h> exists even on freestanding compilers.
35897  # On the NeXT, cc -E runs the code through the compiler's parser,
35898  # not just through cpp. "Syntax error" is here to catch this case.
35899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35900/* end confdefs.h.  */
35901#ifdef __STDC__
35902# include <limits.h>
35903#else
35904# include <assert.h>
35905#endif
35906		     Syntax error
35907_ACEOF
35908if ac_fn_cxx_try_cpp "$LINENO"; then :
35909
35910else
35911  # Broken: fails on valid input.
35912continue
35913fi
35914rm -f conftest.err conftest.i conftest.$ac_ext
35915
35916  # OK, works on sane cases.  Now check whether nonexistent headers
35917  # can be detected and how.
35918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35919/* end confdefs.h.  */
35920#include <ac_nonexistent.h>
35921_ACEOF
35922if ac_fn_cxx_try_cpp "$LINENO"; then :
35923  # Broken: success on invalid input.
35924continue
35925else
35926  # Passes both tests.
35927ac_preproc_ok=:
35928break
35929fi
35930rm -f conftest.err conftest.i conftest.$ac_ext
35931
35932done
35933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35934rm -f conftest.i conftest.err conftest.$ac_ext
35935if $ac_preproc_ok; then :
35936  break
35937fi
35938
35939    done
35940    ac_cv_prog_CXXCPP=$CXXCPP
35941
35942fi
35943  CXXCPP=$ac_cv_prog_CXXCPP
35944else
35945  ac_cv_prog_CXXCPP=$CXXCPP
35946fi
35947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35948$as_echo "$CXXCPP" >&6; }
35949ac_preproc_ok=false
35950for ac_cxx_preproc_warn_flag in '' yes
35951do
35952  # Use a header file that comes with gcc, so configuring glibc
35953  # with a fresh cross-compiler works.
35954  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35955  # <limits.h> exists even on freestanding compilers.
35956  # On the NeXT, cc -E runs the code through the compiler's parser,
35957  # not just through cpp. "Syntax error" is here to catch this case.
35958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35959/* end confdefs.h.  */
35960#ifdef __STDC__
35961# include <limits.h>
35962#else
35963# include <assert.h>
35964#endif
35965		     Syntax error
35966_ACEOF
35967if ac_fn_cxx_try_cpp "$LINENO"; then :
35968
35969else
35970  # Broken: fails on valid input.
35971continue
35972fi
35973rm -f conftest.err conftest.i conftest.$ac_ext
35974
35975  # OK, works on sane cases.  Now check whether nonexistent headers
35976  # can be detected and how.
35977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35978/* end confdefs.h.  */
35979#include <ac_nonexistent.h>
35980_ACEOF
35981if ac_fn_cxx_try_cpp "$LINENO"; then :
35982  # Broken: success on invalid input.
35983continue
35984else
35985  # Passes both tests.
35986ac_preproc_ok=:
35987break
35988fi
35989rm -f conftest.err conftest.i conftest.$ac_ext
35990
35991done
35992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35993rm -f conftest.i conftest.err conftest.$ac_ext
35994if $ac_preproc_ok; then :
35995
35996else
35997  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35999as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36000See \`config.log' for more details" "$LINENO" 5; }
36001fi
36002
36003ac_ext=cpp
36004ac_cpp='$CXXCPP $CPPFLAGS'
36005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36008
36009
36010  # Only process if variable expands to non-empty
36011
36012  if test "x$CXXCPP" != x; then
36013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36014
36015  # First separate the path from the arguments. This will split at the first
36016  # space.
36017  complete="$CXXCPP"
36018  path="${complete%% *}"
36019  tmp="$complete EOL"
36020  arguments="${tmp#* }"
36021
36022  # Input might be given as Windows format, start by converting to
36023  # unix format.
36024  new_path=`$CYGPATH -u "$path"`
36025
36026  # Now try to locate executable using which
36027  new_path=`$WHICH "$new_path" 2> /dev/null`
36028  # bat and cmd files are not always considered executable in cygwin causing which
36029  # to not find them
36030  if test "x$new_path" = x \
36031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36033    new_path=`$CYGPATH -u "$path"`
36034  fi
36035  if test "x$new_path" = x; then
36036    # Oops. Which didn't find the executable.
36037    # The splitting of arguments from the executable at a space might have been incorrect,
36038    # since paths with space are more likely in Windows. Give it another try with the whole
36039    # argument.
36040    path="$complete"
36041    arguments="EOL"
36042    new_path=`$CYGPATH -u "$path"`
36043    new_path=`$WHICH "$new_path" 2> /dev/null`
36044    # bat and cmd files are not always considered executable in cygwin causing which
36045    # to not find them
36046    if test "x$new_path" = x \
36047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36049      new_path=`$CYGPATH -u "$path"`
36050    fi
36051    if test "x$new_path" = x; then
36052      # It's still not found. Now this is an unrecoverable error.
36053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36054$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36055      has_space=`$ECHO "$complete" | $GREP " "`
36056      if test "x$has_space" != x; then
36057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36059      fi
36060      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36061    fi
36062  fi
36063
36064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36067  # "foo.exe" is OK but "foo" is an error.
36068  #
36069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36070  # It is also a way to make sure we got the proper file name for the real test later on.
36071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36072  if test "x$test_shortpath" = x; then
36073    # Short path failed, file does not exist as specified.
36074    # Try adding .exe or .cmd
36075    if test -f "${new_path}.exe"; then
36076      input_to_shortpath="${new_path}.exe"
36077    elif test -f "${new_path}.cmd"; then
36078      input_to_shortpath="${new_path}.cmd"
36079    else
36080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36081$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36084      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36085    fi
36086  else
36087    input_to_shortpath="$new_path"
36088  fi
36089
36090  # Call helper function which possibly converts this using DOS-style short mode.
36091  # If so, the updated path is stored in $new_path.
36092  new_path="$input_to_shortpath"
36093
36094  input_path="$input_to_shortpath"
36095  # Check if we need to convert this using DOS-style short mode. If the path
36096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36097  # take no chances and rewrite it.
36098  # Note: m4 eats our [], so we need to use [ and ] instead.
36099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36100  if test "x$has_forbidden_chars" != x; then
36101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36105      # Going to short mode and back again did indeed matter. Since short mode is
36106      # case insensitive, let's make it lowercase to improve readability.
36107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36108      # Now convert it back to Unix-style (cygpath)
36109      input_path=`$CYGPATH -u "$shortmode_path"`
36110      new_path="$input_path"
36111    fi
36112  fi
36113
36114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36115  if test "x$test_cygdrive_prefix" = x; then
36116    # As a simple fix, exclude /usr/bin since it's not a real path.
36117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36119      # a path prefixed by /cygdrive for fixpath to work.
36120      new_path="$CYGWIN_ROOT_PATH$input_path"
36121    fi
36122  fi
36123
36124  # remove trailing .exe if any
36125  new_path="${new_path/%.exe/}"
36126
36127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36128
36129  # First separate the path from the arguments. This will split at the first
36130  # space.
36131  complete="$CXXCPP"
36132  path="${complete%% *}"
36133  tmp="$complete EOL"
36134  arguments="${tmp#* }"
36135
36136  # Input might be given as Windows format, start by converting to
36137  # unix format.
36138  new_path="$path"
36139
36140  windows_path="$new_path"
36141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36142    unix_path=`$CYGPATH -u "$windows_path"`
36143    new_path="$unix_path"
36144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36146    new_path="$unix_path"
36147  fi
36148
36149
36150  # Now try to locate executable using which
36151  new_path=`$WHICH "$new_path" 2> /dev/null`
36152
36153  if test "x$new_path" = x; then
36154    # Oops. Which didn't find the executable.
36155    # The splitting of arguments from the executable at a space might have been incorrect,
36156    # since paths with space are more likely in Windows. Give it another try with the whole
36157    # argument.
36158    path="$complete"
36159    arguments="EOL"
36160    new_path="$path"
36161
36162  windows_path="$new_path"
36163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36164    unix_path=`$CYGPATH -u "$windows_path"`
36165    new_path="$unix_path"
36166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36168    new_path="$unix_path"
36169  fi
36170
36171
36172    new_path=`$WHICH "$new_path" 2> /dev/null`
36173    # bat and cmd files are not always considered executable in MSYS causing which
36174    # to not find them
36175    if test "x$new_path" = x \
36176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36178      new_path="$path"
36179
36180  windows_path="$new_path"
36181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36182    unix_path=`$CYGPATH -u "$windows_path"`
36183    new_path="$unix_path"
36184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36186    new_path="$unix_path"
36187  fi
36188
36189    fi
36190
36191    if test "x$new_path" = x; then
36192      # It's still not found. Now this is an unrecoverable error.
36193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36194$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36195      has_space=`$ECHO "$complete" | $GREP " "`
36196      if test "x$has_space" != x; then
36197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36199      fi
36200      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36201    fi
36202  fi
36203
36204  # Now new_path has a complete unix path to the binary
36205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36206    # Keep paths in /bin as-is, but remove trailing .exe if any
36207    new_path="${new_path/%.exe/}"
36208    # Do not save /bin paths to all_fixpath_prefixes!
36209  else
36210    # Not in mixed or Windows style, start by that.
36211    new_path=`cmd //c echo $new_path`
36212
36213  input_path="$new_path"
36214  # Check if we need to convert this using DOS-style short mode. If the path
36215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36216  # take no chances and rewrite it.
36217  # Note: m4 eats our [], so we need to use [ and ] instead.
36218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36219  if test "x$has_forbidden_chars" != x; then
36220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36222  fi
36223
36224    # Output is in $new_path
36225
36226  windows_path="$new_path"
36227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36228    unix_path=`$CYGPATH -u "$windows_path"`
36229    new_path="$unix_path"
36230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36232    new_path="$unix_path"
36233  fi
36234
36235    # remove trailing .exe if any
36236    new_path="${new_path/%.exe/}"
36237
36238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36240  fi
36241
36242    else
36243      # We're on a unix platform. Hooray! :)
36244      # First separate the path from the arguments. This will split at the first
36245      # space.
36246      complete="$CXXCPP"
36247      path="${complete%% *}"
36248      tmp="$complete EOL"
36249      arguments="${tmp#* }"
36250
36251      # Cannot rely on the command "which" here since it doesn't always work.
36252      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36253      if test -z "$is_absolute_path"; then
36254        # Path to executable is not absolute. Find it.
36255        IFS_save="$IFS"
36256        IFS=:
36257        for p in $PATH; do
36258          if test -f "$p/$path" && test -x "$p/$path"; then
36259            new_path="$p/$path"
36260            break
36261          fi
36262        done
36263        IFS="$IFS_save"
36264      else
36265        # This is an absolute path, we can use it without further modifications.
36266        new_path="$path"
36267      fi
36268
36269      if test "x$new_path" = x; then
36270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36271$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36272        has_space=`$ECHO "$complete" | $GREP " "`
36273        if test "x$has_space" != x; then
36274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36276        fi
36277        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36278      fi
36279    fi
36280
36281    # Now join together the path and the arguments once again
36282    if test "x$arguments" != xEOL; then
36283      new_complete="$new_path ${arguments% *}"
36284    else
36285      new_complete="$new_path"
36286    fi
36287
36288    if test "x$complete" != "x$new_complete"; then
36289      CXXCPP="$new_complete"
36290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36291$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36292    fi
36293  fi
36294
36295
36296  #
36297  # Setup the linker (LD)
36298  #
36299  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36300    # In the Microsoft toolchain we have a separate LD command "link".
36301    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36302    # a cygwin program for something completely different.
36303    # Extract the first word of "link", so it can be a program name with args.
36304set dummy link; ac_word=$2
36305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36306$as_echo_n "checking for $ac_word... " >&6; }
36307if ${ac_cv_prog_LD+:} false; then :
36308  $as_echo_n "(cached) " >&6
36309else
36310  if test -n "$LD"; then
36311  ac_cv_prog_LD="$LD" # Let the user override the test.
36312else
36313  ac_prog_rejected=no
36314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36315for as_dir in $PATH
36316do
36317  IFS=$as_save_IFS
36318  test -z "$as_dir" && as_dir=.
36319    for ac_exec_ext in '' $ac_executable_extensions; do
36320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36321    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36322       ac_prog_rejected=yes
36323       continue
36324     fi
36325    ac_cv_prog_LD="link"
36326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36327    break 2
36328  fi
36329done
36330  done
36331IFS=$as_save_IFS
36332
36333if test $ac_prog_rejected = yes; then
36334  # We found a bogon in the path, so make sure we never use it.
36335  set dummy $ac_cv_prog_LD
36336  shift
36337  if test $# != 0; then
36338    # We chose a different compiler from the bogus one.
36339    # However, it has the same basename, so the bogon will be chosen
36340    # first if we set LD to just the basename; use the full file name.
36341    shift
36342    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36343  fi
36344fi
36345fi
36346fi
36347LD=$ac_cv_prog_LD
36348if test -n "$LD"; then
36349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36350$as_echo "$LD" >&6; }
36351else
36352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36353$as_echo "no" >&6; }
36354fi
36355
36356
36357
36358  # Only process if variable expands to non-empty
36359
36360  if test "x$LD" != x; then
36361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362
36363  # First separate the path from the arguments. This will split at the first
36364  # space.
36365  complete="$LD"
36366  path="${complete%% *}"
36367  tmp="$complete EOL"
36368  arguments="${tmp#* }"
36369
36370  # Input might be given as Windows format, start by converting to
36371  # unix format.
36372  new_path=`$CYGPATH -u "$path"`
36373
36374  # Now try to locate executable using which
36375  new_path=`$WHICH "$new_path" 2> /dev/null`
36376  # bat and cmd files are not always considered executable in cygwin causing which
36377  # to not find them
36378  if test "x$new_path" = x \
36379      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36380      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36381    new_path=`$CYGPATH -u "$path"`
36382  fi
36383  if test "x$new_path" = x; then
36384    # Oops. Which didn't find the executable.
36385    # The splitting of arguments from the executable at a space might have been incorrect,
36386    # since paths with space are more likely in Windows. Give it another try with the whole
36387    # argument.
36388    path="$complete"
36389    arguments="EOL"
36390    new_path=`$CYGPATH -u "$path"`
36391    new_path=`$WHICH "$new_path" 2> /dev/null`
36392    # bat and cmd files are not always considered executable in cygwin causing which
36393    # to not find them
36394    if test "x$new_path" = x \
36395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36397      new_path=`$CYGPATH -u "$path"`
36398    fi
36399    if test "x$new_path" = x; then
36400      # It's still not found. Now this is an unrecoverable error.
36401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36402$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36403      has_space=`$ECHO "$complete" | $GREP " "`
36404      if test "x$has_space" != x; then
36405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36407      fi
36408      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36409    fi
36410  fi
36411
36412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36415  # "foo.exe" is OK but "foo" is an error.
36416  #
36417  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36418  # It is also a way to make sure we got the proper file name for the real test later on.
36419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36420  if test "x$test_shortpath" = x; then
36421    # Short path failed, file does not exist as specified.
36422    # Try adding .exe or .cmd
36423    if test -f "${new_path}.exe"; then
36424      input_to_shortpath="${new_path}.exe"
36425    elif test -f "${new_path}.cmd"; then
36426      input_to_shortpath="${new_path}.cmd"
36427    else
36428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36429$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36432      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36433    fi
36434  else
36435    input_to_shortpath="$new_path"
36436  fi
36437
36438  # Call helper function which possibly converts this using DOS-style short mode.
36439  # If so, the updated path is stored in $new_path.
36440  new_path="$input_to_shortpath"
36441
36442  input_path="$input_to_shortpath"
36443  # Check if we need to convert this using DOS-style short mode. If the path
36444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36445  # take no chances and rewrite it.
36446  # Note: m4 eats our [], so we need to use [ and ] instead.
36447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36448  if test "x$has_forbidden_chars" != x; then
36449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36453      # Going to short mode and back again did indeed matter. Since short mode is
36454      # case insensitive, let's make it lowercase to improve readability.
36455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36456      # Now convert it back to Unix-style (cygpath)
36457      input_path=`$CYGPATH -u "$shortmode_path"`
36458      new_path="$input_path"
36459    fi
36460  fi
36461
36462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36463  if test "x$test_cygdrive_prefix" = x; then
36464    # As a simple fix, exclude /usr/bin since it's not a real path.
36465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36467      # a path prefixed by /cygdrive for fixpath to work.
36468      new_path="$CYGWIN_ROOT_PATH$input_path"
36469    fi
36470  fi
36471
36472  # remove trailing .exe if any
36473  new_path="${new_path/%.exe/}"
36474
36475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36476
36477  # First separate the path from the arguments. This will split at the first
36478  # space.
36479  complete="$LD"
36480  path="${complete%% *}"
36481  tmp="$complete EOL"
36482  arguments="${tmp#* }"
36483
36484  # Input might be given as Windows format, start by converting to
36485  # unix format.
36486  new_path="$path"
36487
36488  windows_path="$new_path"
36489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36490    unix_path=`$CYGPATH -u "$windows_path"`
36491    new_path="$unix_path"
36492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36494    new_path="$unix_path"
36495  fi
36496
36497
36498  # Now try to locate executable using which
36499  new_path=`$WHICH "$new_path" 2> /dev/null`
36500
36501  if test "x$new_path" = x; then
36502    # Oops. Which didn't find the executable.
36503    # The splitting of arguments from the executable at a space might have been incorrect,
36504    # since paths with space are more likely in Windows. Give it another try with the whole
36505    # argument.
36506    path="$complete"
36507    arguments="EOL"
36508    new_path="$path"
36509
36510  windows_path="$new_path"
36511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36512    unix_path=`$CYGPATH -u "$windows_path"`
36513    new_path="$unix_path"
36514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36516    new_path="$unix_path"
36517  fi
36518
36519
36520    new_path=`$WHICH "$new_path" 2> /dev/null`
36521    # bat and cmd files are not always considered executable in MSYS causing which
36522    # to not find them
36523    if test "x$new_path" = x \
36524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36526      new_path="$path"
36527
36528  windows_path="$new_path"
36529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36530    unix_path=`$CYGPATH -u "$windows_path"`
36531    new_path="$unix_path"
36532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36534    new_path="$unix_path"
36535  fi
36536
36537    fi
36538
36539    if test "x$new_path" = x; then
36540      # It's still not found. Now this is an unrecoverable error.
36541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36542$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36543      has_space=`$ECHO "$complete" | $GREP " "`
36544      if test "x$has_space" != x; then
36545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36547      fi
36548      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36549    fi
36550  fi
36551
36552  # Now new_path has a complete unix path to the binary
36553  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36554    # Keep paths in /bin as-is, but remove trailing .exe if any
36555    new_path="${new_path/%.exe/}"
36556    # Do not save /bin paths to all_fixpath_prefixes!
36557  else
36558    # Not in mixed or Windows style, start by that.
36559    new_path=`cmd //c echo $new_path`
36560
36561  input_path="$new_path"
36562  # Check if we need to convert this using DOS-style short mode. If the path
36563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36564  # take no chances and rewrite it.
36565  # Note: m4 eats our [], so we need to use [ and ] instead.
36566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36567  if test "x$has_forbidden_chars" != x; then
36568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36570  fi
36571
36572    # Output is in $new_path
36573
36574  windows_path="$new_path"
36575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36576    unix_path=`$CYGPATH -u "$windows_path"`
36577    new_path="$unix_path"
36578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36580    new_path="$unix_path"
36581  fi
36582
36583    # remove trailing .exe if any
36584    new_path="${new_path/%.exe/}"
36585
36586    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36587    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36588  fi
36589
36590    else
36591      # We're on a unix platform. Hooray! :)
36592      # First separate the path from the arguments. This will split at the first
36593      # space.
36594      complete="$LD"
36595      path="${complete%% *}"
36596      tmp="$complete EOL"
36597      arguments="${tmp#* }"
36598
36599      # Cannot rely on the command "which" here since it doesn't always work.
36600      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36601      if test -z "$is_absolute_path"; then
36602        # Path to executable is not absolute. Find it.
36603        IFS_save="$IFS"
36604        IFS=:
36605        for p in $PATH; do
36606          if test -f "$p/$path" && test -x "$p/$path"; then
36607            new_path="$p/$path"
36608            break
36609          fi
36610        done
36611        IFS="$IFS_save"
36612      else
36613        # This is an absolute path, we can use it without further modifications.
36614        new_path="$path"
36615      fi
36616
36617      if test "x$new_path" = x; then
36618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36619$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36620        has_space=`$ECHO "$complete" | $GREP " "`
36621        if test "x$has_space" != x; then
36622          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36623$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36624        fi
36625        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36626      fi
36627    fi
36628
36629    # Now join together the path and the arguments once again
36630    if test "x$arguments" != xEOL; then
36631      new_complete="$new_path ${arguments% *}"
36632    else
36633      new_complete="$new_path"
36634    fi
36635
36636    if test "x$complete" != "x$new_complete"; then
36637      LD="$new_complete"
36638      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36639$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36640    fi
36641  fi
36642
36643    # Verify that we indeed succeeded with this trick.
36644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36645$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36646    "$LD" --version > /dev/null
36647    if test $? -eq 0 ; then
36648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36649$as_echo "no" >&6; }
36650      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36651    else
36652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36653$as_echo "yes" >&6; }
36654    fi
36655    LDCXX="$LD"
36656  else
36657    # All other toolchains use the compiler to link.
36658    LD="$CC"
36659    LDCXX="$CXX"
36660  fi
36661
36662  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36663
36664
36665  #
36666  # Setup the assembler (AS)
36667  #
36668  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36669
36670
36671  # Publish this variable in the help.
36672
36673
36674  if [ -z "${AS+x}" ]; then
36675    # The variable is not set by user, try to locate tool using the code snippet
36676    for ac_prog in as
36677do
36678  # Extract the first word of "$ac_prog", so it can be a program name with args.
36679set dummy $ac_prog; ac_word=$2
36680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36681$as_echo_n "checking for $ac_word... " >&6; }
36682if ${ac_cv_path_AS+:} false; then :
36683  $as_echo_n "(cached) " >&6
36684else
36685  case $AS in
36686  [\\/]* | ?:[\\/]*)
36687  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36688  ;;
36689  *)
36690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36691for as_dir in $PATH
36692do
36693  IFS=$as_save_IFS
36694  test -z "$as_dir" && as_dir=.
36695    for ac_exec_ext in '' $ac_executable_extensions; do
36696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36697    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36699    break 2
36700  fi
36701done
36702  done
36703IFS=$as_save_IFS
36704
36705  ;;
36706esac
36707fi
36708AS=$ac_cv_path_AS
36709if test -n "$AS"; then
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36711$as_echo "$AS" >&6; }
36712else
36713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36714$as_echo "no" >&6; }
36715fi
36716
36717
36718  test -n "$AS" && break
36719done
36720
36721  else
36722    # The variable is set, but is it from the command line or the environment?
36723
36724    # Try to remove the string !AS! from our list.
36725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36727      # If it failed, the variable was not from the command line. Ignore it,
36728      # but warn the user (except for BASH, which is always set by the calling BASH).
36729      if test "xAS" != xBASH; then
36730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36731$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36732      fi
36733      # Try to locate tool using the code snippet
36734      for ac_prog in as
36735do
36736  # Extract the first word of "$ac_prog", so it can be a program name with args.
36737set dummy $ac_prog; ac_word=$2
36738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36739$as_echo_n "checking for $ac_word... " >&6; }
36740if ${ac_cv_path_AS+:} false; then :
36741  $as_echo_n "(cached) " >&6
36742else
36743  case $AS in
36744  [\\/]* | ?:[\\/]*)
36745  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36746  ;;
36747  *)
36748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36749for as_dir in $PATH
36750do
36751  IFS=$as_save_IFS
36752  test -z "$as_dir" && as_dir=.
36753    for ac_exec_ext in '' $ac_executable_extensions; do
36754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36755    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36757    break 2
36758  fi
36759done
36760  done
36761IFS=$as_save_IFS
36762
36763  ;;
36764esac
36765fi
36766AS=$ac_cv_path_AS
36767if test -n "$AS"; then
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36769$as_echo "$AS" >&6; }
36770else
36771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36772$as_echo "no" >&6; }
36773fi
36774
36775
36776  test -n "$AS" && break
36777done
36778
36779    else
36780      # If it succeeded, then it was overridden by the user. We will use it
36781      # for the tool.
36782
36783      # First remove it from the list of overridden variables, so we can test
36784      # for unknown variables in the end.
36785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36786
36787      # Check if we try to supply an empty value
36788      if test "x$AS" = x; then
36789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36790$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36792$as_echo_n "checking for AS... " >&6; }
36793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36794$as_echo "disabled" >&6; }
36795      else
36796        # Check if the provided tool contains a complete path.
36797        tool_specified="$AS"
36798        tool_basename="${tool_specified##*/}"
36799        if test "x$tool_basename" = "x$tool_specified"; then
36800          # A command without a complete path is provided, search $PATH.
36801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36802$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36803          # Extract the first word of "$tool_basename", so it can be a program name with args.
36804set dummy $tool_basename; ac_word=$2
36805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36806$as_echo_n "checking for $ac_word... " >&6; }
36807if ${ac_cv_path_AS+:} false; then :
36808  $as_echo_n "(cached) " >&6
36809else
36810  case $AS in
36811  [\\/]* | ?:[\\/]*)
36812  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36813  ;;
36814  *)
36815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36816for as_dir in $PATH
36817do
36818  IFS=$as_save_IFS
36819  test -z "$as_dir" && as_dir=.
36820    for ac_exec_ext in '' $ac_executable_extensions; do
36821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36822    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36824    break 2
36825  fi
36826done
36827  done
36828IFS=$as_save_IFS
36829
36830  ;;
36831esac
36832fi
36833AS=$ac_cv_path_AS
36834if test -n "$AS"; then
36835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36836$as_echo "$AS" >&6; }
36837else
36838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36839$as_echo "no" >&6; }
36840fi
36841
36842
36843          if test "x$AS" = x; then
36844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36845          fi
36846        else
36847          # Otherwise we believe it is a complete path. Use it as it is.
36848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36849$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36851$as_echo_n "checking for AS... " >&6; }
36852          if test ! -x "$tool_specified"; then
36853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36854$as_echo "not found" >&6; }
36855            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36856          fi
36857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36858$as_echo "$tool_specified" >&6; }
36859        fi
36860      fi
36861    fi
36862
36863  fi
36864
36865
36866
36867  # Only process if variable expands to non-empty
36868
36869  if test "x$AS" != x; then
36870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36871
36872  # First separate the path from the arguments. This will split at the first
36873  # space.
36874  complete="$AS"
36875  path="${complete%% *}"
36876  tmp="$complete EOL"
36877  arguments="${tmp#* }"
36878
36879  # Input might be given as Windows format, start by converting to
36880  # unix format.
36881  new_path=`$CYGPATH -u "$path"`
36882
36883  # Now try to locate executable using which
36884  new_path=`$WHICH "$new_path" 2> /dev/null`
36885  # bat and cmd files are not always considered executable in cygwin causing which
36886  # to not find them
36887  if test "x$new_path" = x \
36888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36890    new_path=`$CYGPATH -u "$path"`
36891  fi
36892  if test "x$new_path" = x; then
36893    # Oops. Which didn't find the executable.
36894    # The splitting of arguments from the executable at a space might have been incorrect,
36895    # since paths with space are more likely in Windows. Give it another try with the whole
36896    # argument.
36897    path="$complete"
36898    arguments="EOL"
36899    new_path=`$CYGPATH -u "$path"`
36900    new_path=`$WHICH "$new_path" 2> /dev/null`
36901    # bat and cmd files are not always considered executable in cygwin causing which
36902    # to not find them
36903    if test "x$new_path" = x \
36904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36906      new_path=`$CYGPATH -u "$path"`
36907    fi
36908    if test "x$new_path" = x; then
36909      # It's still not found. Now this is an unrecoverable error.
36910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36911$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36912      has_space=`$ECHO "$complete" | $GREP " "`
36913      if test "x$has_space" != x; then
36914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36916      fi
36917      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36918    fi
36919  fi
36920
36921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36924  # "foo.exe" is OK but "foo" is an error.
36925  #
36926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36927  # It is also a way to make sure we got the proper file name for the real test later on.
36928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36929  if test "x$test_shortpath" = x; then
36930    # Short path failed, file does not exist as specified.
36931    # Try adding .exe or .cmd
36932    if test -f "${new_path}.exe"; then
36933      input_to_shortpath="${new_path}.exe"
36934    elif test -f "${new_path}.cmd"; then
36935      input_to_shortpath="${new_path}.cmd"
36936    else
36937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36938$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36941      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36942    fi
36943  else
36944    input_to_shortpath="$new_path"
36945  fi
36946
36947  # Call helper function which possibly converts this using DOS-style short mode.
36948  # If so, the updated path is stored in $new_path.
36949  new_path="$input_to_shortpath"
36950
36951  input_path="$input_to_shortpath"
36952  # Check if we need to convert this using DOS-style short mode. If the path
36953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36954  # take no chances and rewrite it.
36955  # Note: m4 eats our [], so we need to use [ and ] instead.
36956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36957  if test "x$has_forbidden_chars" != x; then
36958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36962      # Going to short mode and back again did indeed matter. Since short mode is
36963      # case insensitive, let's make it lowercase to improve readability.
36964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36965      # Now convert it back to Unix-style (cygpath)
36966      input_path=`$CYGPATH -u "$shortmode_path"`
36967      new_path="$input_path"
36968    fi
36969  fi
36970
36971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36972  if test "x$test_cygdrive_prefix" = x; then
36973    # As a simple fix, exclude /usr/bin since it's not a real path.
36974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36976      # a path prefixed by /cygdrive for fixpath to work.
36977      new_path="$CYGWIN_ROOT_PATH$input_path"
36978    fi
36979  fi
36980
36981  # remove trailing .exe if any
36982  new_path="${new_path/%.exe/}"
36983
36984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36985
36986  # First separate the path from the arguments. This will split at the first
36987  # space.
36988  complete="$AS"
36989  path="${complete%% *}"
36990  tmp="$complete EOL"
36991  arguments="${tmp#* }"
36992
36993  # Input might be given as Windows format, start by converting to
36994  # unix format.
36995  new_path="$path"
36996
36997  windows_path="$new_path"
36998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36999    unix_path=`$CYGPATH -u "$windows_path"`
37000    new_path="$unix_path"
37001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37003    new_path="$unix_path"
37004  fi
37005
37006
37007  # Now try to locate executable using which
37008  new_path=`$WHICH "$new_path" 2> /dev/null`
37009
37010  if test "x$new_path" = x; then
37011    # Oops. Which didn't find the executable.
37012    # The splitting of arguments from the executable at a space might have been incorrect,
37013    # since paths with space are more likely in Windows. Give it another try with the whole
37014    # argument.
37015    path="$complete"
37016    arguments="EOL"
37017    new_path="$path"
37018
37019  windows_path="$new_path"
37020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37021    unix_path=`$CYGPATH -u "$windows_path"`
37022    new_path="$unix_path"
37023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37025    new_path="$unix_path"
37026  fi
37027
37028
37029    new_path=`$WHICH "$new_path" 2> /dev/null`
37030    # bat and cmd files are not always considered executable in MSYS causing which
37031    # to not find them
37032    if test "x$new_path" = x \
37033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37035      new_path="$path"
37036
37037  windows_path="$new_path"
37038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37039    unix_path=`$CYGPATH -u "$windows_path"`
37040    new_path="$unix_path"
37041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37043    new_path="$unix_path"
37044  fi
37045
37046    fi
37047
37048    if test "x$new_path" = x; then
37049      # It's still not found. Now this is an unrecoverable error.
37050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37051$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37052      has_space=`$ECHO "$complete" | $GREP " "`
37053      if test "x$has_space" != x; then
37054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37056      fi
37057      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37058    fi
37059  fi
37060
37061  # Now new_path has a complete unix path to the binary
37062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37063    # Keep paths in /bin as-is, but remove trailing .exe if any
37064    new_path="${new_path/%.exe/}"
37065    # Do not save /bin paths to all_fixpath_prefixes!
37066  else
37067    # Not in mixed or Windows style, start by that.
37068    new_path=`cmd //c echo $new_path`
37069
37070  input_path="$new_path"
37071  # Check if we need to convert this using DOS-style short mode. If the path
37072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37073  # take no chances and rewrite it.
37074  # Note: m4 eats our [], so we need to use [ and ] instead.
37075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37076  if test "x$has_forbidden_chars" != x; then
37077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37079  fi
37080
37081    # Output is in $new_path
37082
37083  windows_path="$new_path"
37084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37085    unix_path=`$CYGPATH -u "$windows_path"`
37086    new_path="$unix_path"
37087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37089    new_path="$unix_path"
37090  fi
37091
37092    # remove trailing .exe if any
37093    new_path="${new_path/%.exe/}"
37094
37095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37097  fi
37098
37099    else
37100      # We're on a unix platform. Hooray! :)
37101      # First separate the path from the arguments. This will split at the first
37102      # space.
37103      complete="$AS"
37104      path="${complete%% *}"
37105      tmp="$complete EOL"
37106      arguments="${tmp#* }"
37107
37108      # Cannot rely on the command "which" here since it doesn't always work.
37109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37110      if test -z "$is_absolute_path"; then
37111        # Path to executable is not absolute. Find it.
37112        IFS_save="$IFS"
37113        IFS=:
37114        for p in $PATH; do
37115          if test -f "$p/$path" && test -x "$p/$path"; then
37116            new_path="$p/$path"
37117            break
37118          fi
37119        done
37120        IFS="$IFS_save"
37121      else
37122        # This is an absolute path, we can use it without further modifications.
37123        new_path="$path"
37124      fi
37125
37126      if test "x$new_path" = x; then
37127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37128$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37129        has_space=`$ECHO "$complete" | $GREP " "`
37130        if test "x$has_space" != x; then
37131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37133        fi
37134        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37135      fi
37136    fi
37137
37138    # Now join together the path and the arguments once again
37139    if test "x$arguments" != xEOL; then
37140      new_complete="$new_path ${arguments% *}"
37141    else
37142      new_complete="$new_path"
37143    fi
37144
37145    if test "x$complete" != "x$new_complete"; then
37146      AS="$new_complete"
37147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37148$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37149    fi
37150  fi
37151
37152    if test "x$AS" = x; then
37153      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37154    fi
37155  else
37156    # FIXME: is this correct for microsoft?
37157    AS="$CC -c"
37158  fi
37159
37160
37161  #
37162  # Setup the archiver (AR)
37163  #
37164  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37165    # The corresponding ar tool is lib.exe (used to create static libraries)
37166    # Extract the first word of "lib", so it can be a program name with args.
37167set dummy lib; ac_word=$2
37168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37169$as_echo_n "checking for $ac_word... " >&6; }
37170if ${ac_cv_prog_AR+:} false; then :
37171  $as_echo_n "(cached) " >&6
37172else
37173  if test -n "$AR"; then
37174  ac_cv_prog_AR="$AR" # Let the user override the test.
37175else
37176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37177for as_dir in $PATH
37178do
37179  IFS=$as_save_IFS
37180  test -z "$as_dir" && as_dir=.
37181    for ac_exec_ext in '' $ac_executable_extensions; do
37182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37183    ac_cv_prog_AR="lib"
37184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37185    break 2
37186  fi
37187done
37188  done
37189IFS=$as_save_IFS
37190
37191fi
37192fi
37193AR=$ac_cv_prog_AR
37194if test -n "$AR"; then
37195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37196$as_echo "$AR" >&6; }
37197else
37198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37199$as_echo "no" >&6; }
37200fi
37201
37202
37203  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37204
37205
37206  # Publish this variable in the help.
37207
37208
37209  if [ -z "${AR+x}" ]; then
37210    # The variable is not set by user, try to locate tool using the code snippet
37211    if test -n "$ac_tool_prefix"; then
37212  for ac_prog in ar gcc-ar
37213  do
37214    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37215set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37217$as_echo_n "checking for $ac_word... " >&6; }
37218if ${ac_cv_prog_AR+:} false; then :
37219  $as_echo_n "(cached) " >&6
37220else
37221  if test -n "$AR"; then
37222  ac_cv_prog_AR="$AR" # Let the user override the test.
37223else
37224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37225for as_dir in $PATH
37226do
37227  IFS=$as_save_IFS
37228  test -z "$as_dir" && as_dir=.
37229    for ac_exec_ext in '' $ac_executable_extensions; do
37230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37231    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37233    break 2
37234  fi
37235done
37236  done
37237IFS=$as_save_IFS
37238
37239fi
37240fi
37241AR=$ac_cv_prog_AR
37242if test -n "$AR"; then
37243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37244$as_echo "$AR" >&6; }
37245else
37246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37247$as_echo "no" >&6; }
37248fi
37249
37250
37251    test -n "$AR" && break
37252  done
37253fi
37254if test -z "$AR"; then
37255  ac_ct_AR=$AR
37256  for ac_prog in ar gcc-ar
37257do
37258  # Extract the first word of "$ac_prog", so it can be a program name with args.
37259set dummy $ac_prog; ac_word=$2
37260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37261$as_echo_n "checking for $ac_word... " >&6; }
37262if ${ac_cv_prog_ac_ct_AR+:} false; then :
37263  $as_echo_n "(cached) " >&6
37264else
37265  if test -n "$ac_ct_AR"; then
37266  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37267else
37268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37269for as_dir in $PATH
37270do
37271  IFS=$as_save_IFS
37272  test -z "$as_dir" && as_dir=.
37273    for ac_exec_ext in '' $ac_executable_extensions; do
37274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37275    ac_cv_prog_ac_ct_AR="$ac_prog"
37276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37277    break 2
37278  fi
37279done
37280  done
37281IFS=$as_save_IFS
37282
37283fi
37284fi
37285ac_ct_AR=$ac_cv_prog_ac_ct_AR
37286if test -n "$ac_ct_AR"; then
37287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37288$as_echo "$ac_ct_AR" >&6; }
37289else
37290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291$as_echo "no" >&6; }
37292fi
37293
37294
37295  test -n "$ac_ct_AR" && break
37296done
37297
37298  if test "x$ac_ct_AR" = x; then
37299    AR=""
37300  else
37301    case $cross_compiling:$ac_tool_warned in
37302yes:)
37303{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37304$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37305ac_tool_warned=yes ;;
37306esac
37307    AR=$ac_ct_AR
37308  fi
37309fi
37310
37311  else
37312    # The variable is set, but is it from the command line or the environment?
37313
37314    # Try to remove the string !AR! from our list.
37315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37317      # If it failed, the variable was not from the command line. Ignore it,
37318      # but warn the user (except for BASH, which is always set by the calling BASH).
37319      if test "xAR" != xBASH; then
37320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37321$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37322      fi
37323      # Try to locate tool using the code snippet
37324      if test -n "$ac_tool_prefix"; then
37325  for ac_prog in ar gcc-ar
37326  do
37327    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37328set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37330$as_echo_n "checking for $ac_word... " >&6; }
37331if ${ac_cv_prog_AR+:} false; then :
37332  $as_echo_n "(cached) " >&6
37333else
37334  if test -n "$AR"; then
37335  ac_cv_prog_AR="$AR" # Let the user override the test.
37336else
37337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37338for as_dir in $PATH
37339do
37340  IFS=$as_save_IFS
37341  test -z "$as_dir" && as_dir=.
37342    for ac_exec_ext in '' $ac_executable_extensions; do
37343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37344    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37346    break 2
37347  fi
37348done
37349  done
37350IFS=$as_save_IFS
37351
37352fi
37353fi
37354AR=$ac_cv_prog_AR
37355if test -n "$AR"; then
37356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37357$as_echo "$AR" >&6; }
37358else
37359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37360$as_echo "no" >&6; }
37361fi
37362
37363
37364    test -n "$AR" && break
37365  done
37366fi
37367if test -z "$AR"; then
37368  ac_ct_AR=$AR
37369  for ac_prog in ar gcc-ar
37370do
37371  # Extract the first word of "$ac_prog", so it can be a program name with args.
37372set dummy $ac_prog; ac_word=$2
37373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37374$as_echo_n "checking for $ac_word... " >&6; }
37375if ${ac_cv_prog_ac_ct_AR+:} false; then :
37376  $as_echo_n "(cached) " >&6
37377else
37378  if test -n "$ac_ct_AR"; then
37379  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37380else
37381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37382for as_dir in $PATH
37383do
37384  IFS=$as_save_IFS
37385  test -z "$as_dir" && as_dir=.
37386    for ac_exec_ext in '' $ac_executable_extensions; do
37387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37388    ac_cv_prog_ac_ct_AR="$ac_prog"
37389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37390    break 2
37391  fi
37392done
37393  done
37394IFS=$as_save_IFS
37395
37396fi
37397fi
37398ac_ct_AR=$ac_cv_prog_ac_ct_AR
37399if test -n "$ac_ct_AR"; then
37400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37401$as_echo "$ac_ct_AR" >&6; }
37402else
37403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37404$as_echo "no" >&6; }
37405fi
37406
37407
37408  test -n "$ac_ct_AR" && break
37409done
37410
37411  if test "x$ac_ct_AR" = x; then
37412    AR=""
37413  else
37414    case $cross_compiling:$ac_tool_warned in
37415yes:)
37416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37418ac_tool_warned=yes ;;
37419esac
37420    AR=$ac_ct_AR
37421  fi
37422fi
37423
37424    else
37425      # If it succeeded, then it was overridden by the user. We will use it
37426      # for the tool.
37427
37428      # First remove it from the list of overridden variables, so we can test
37429      # for unknown variables in the end.
37430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37431
37432      # Check if we try to supply an empty value
37433      if test "x$AR" = x; then
37434        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37435$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37437$as_echo_n "checking for AR... " >&6; }
37438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37439$as_echo "disabled" >&6; }
37440      else
37441        # Check if the provided tool contains a complete path.
37442        tool_specified="$AR"
37443        tool_basename="${tool_specified##*/}"
37444        if test "x$tool_basename" = "x$tool_specified"; then
37445          # A command without a complete path is provided, search $PATH.
37446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37447$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37448          # Extract the first word of "$tool_basename", so it can be a program name with args.
37449set dummy $tool_basename; ac_word=$2
37450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37451$as_echo_n "checking for $ac_word... " >&6; }
37452if ${ac_cv_path_AR+:} false; then :
37453  $as_echo_n "(cached) " >&6
37454else
37455  case $AR in
37456  [\\/]* | ?:[\\/]*)
37457  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37458  ;;
37459  *)
37460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37461for as_dir in $PATH
37462do
37463  IFS=$as_save_IFS
37464  test -z "$as_dir" && as_dir=.
37465    for ac_exec_ext in '' $ac_executable_extensions; do
37466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37467    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37469    break 2
37470  fi
37471done
37472  done
37473IFS=$as_save_IFS
37474
37475  ;;
37476esac
37477fi
37478AR=$ac_cv_path_AR
37479if test -n "$AR"; then
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37481$as_echo "$AR" >&6; }
37482else
37483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37484$as_echo "no" >&6; }
37485fi
37486
37487
37488          if test "x$AR" = x; then
37489            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37490          fi
37491        else
37492          # Otherwise we believe it is a complete path. Use it as it is.
37493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37494$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37495          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37496$as_echo_n "checking for AR... " >&6; }
37497          if test ! -x "$tool_specified"; then
37498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37499$as_echo "not found" >&6; }
37500            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37501          fi
37502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37503$as_echo "$tool_specified" >&6; }
37504        fi
37505      fi
37506    fi
37507
37508  fi
37509
37510
37511  else
37512
37513
37514  # Publish this variable in the help.
37515
37516
37517  if [ -z "${AR+x}" ]; then
37518    # The variable is not set by user, try to locate tool using the code snippet
37519    if test -n "$ac_tool_prefix"; then
37520  for ac_prog in ar
37521  do
37522    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37523set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37525$as_echo_n "checking for $ac_word... " >&6; }
37526if ${ac_cv_prog_AR+:} false; then :
37527  $as_echo_n "(cached) " >&6
37528else
37529  if test -n "$AR"; then
37530  ac_cv_prog_AR="$AR" # Let the user override the test.
37531else
37532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37533for as_dir in $PATH
37534do
37535  IFS=$as_save_IFS
37536  test -z "$as_dir" && as_dir=.
37537    for ac_exec_ext in '' $ac_executable_extensions; do
37538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37539    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37541    break 2
37542  fi
37543done
37544  done
37545IFS=$as_save_IFS
37546
37547fi
37548fi
37549AR=$ac_cv_prog_AR
37550if test -n "$AR"; then
37551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37552$as_echo "$AR" >&6; }
37553else
37554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37555$as_echo "no" >&6; }
37556fi
37557
37558
37559    test -n "$AR" && break
37560  done
37561fi
37562if test -z "$AR"; then
37563  ac_ct_AR=$AR
37564  for ac_prog in ar
37565do
37566  # Extract the first word of "$ac_prog", so it can be a program name with args.
37567set dummy $ac_prog; ac_word=$2
37568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37569$as_echo_n "checking for $ac_word... " >&6; }
37570if ${ac_cv_prog_ac_ct_AR+:} false; then :
37571  $as_echo_n "(cached) " >&6
37572else
37573  if test -n "$ac_ct_AR"; then
37574  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37575else
37576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37577for as_dir in $PATH
37578do
37579  IFS=$as_save_IFS
37580  test -z "$as_dir" && as_dir=.
37581    for ac_exec_ext in '' $ac_executable_extensions; do
37582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37583    ac_cv_prog_ac_ct_AR="$ac_prog"
37584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37585    break 2
37586  fi
37587done
37588  done
37589IFS=$as_save_IFS
37590
37591fi
37592fi
37593ac_ct_AR=$ac_cv_prog_ac_ct_AR
37594if test -n "$ac_ct_AR"; then
37595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37596$as_echo "$ac_ct_AR" >&6; }
37597else
37598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599$as_echo "no" >&6; }
37600fi
37601
37602
37603  test -n "$ac_ct_AR" && break
37604done
37605
37606  if test "x$ac_ct_AR" = x; then
37607    AR=""
37608  else
37609    case $cross_compiling:$ac_tool_warned in
37610yes:)
37611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37613ac_tool_warned=yes ;;
37614esac
37615    AR=$ac_ct_AR
37616  fi
37617fi
37618
37619  else
37620    # The variable is set, but is it from the command line or the environment?
37621
37622    # Try to remove the string !AR! from our list.
37623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37625      # If it failed, the variable was not from the command line. Ignore it,
37626      # but warn the user (except for BASH, which is always set by the calling BASH).
37627      if test "xAR" != xBASH; then
37628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37629$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37630      fi
37631      # Try to locate tool using the code snippet
37632      if test -n "$ac_tool_prefix"; then
37633  for ac_prog in ar
37634  do
37635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37638$as_echo_n "checking for $ac_word... " >&6; }
37639if ${ac_cv_prog_AR+:} false; then :
37640  $as_echo_n "(cached) " >&6
37641else
37642  if test -n "$AR"; then
37643  ac_cv_prog_AR="$AR" # Let the user override the test.
37644else
37645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37646for as_dir in $PATH
37647do
37648  IFS=$as_save_IFS
37649  test -z "$as_dir" && as_dir=.
37650    for ac_exec_ext in '' $ac_executable_extensions; do
37651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37652    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37654    break 2
37655  fi
37656done
37657  done
37658IFS=$as_save_IFS
37659
37660fi
37661fi
37662AR=$ac_cv_prog_AR
37663if test -n "$AR"; then
37664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37665$as_echo "$AR" >&6; }
37666else
37667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37668$as_echo "no" >&6; }
37669fi
37670
37671
37672    test -n "$AR" && break
37673  done
37674fi
37675if test -z "$AR"; then
37676  ac_ct_AR=$AR
37677  for ac_prog in ar
37678do
37679  # Extract the first word of "$ac_prog", so it can be a program name with args.
37680set dummy $ac_prog; ac_word=$2
37681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37682$as_echo_n "checking for $ac_word... " >&6; }
37683if ${ac_cv_prog_ac_ct_AR+:} false; then :
37684  $as_echo_n "(cached) " >&6
37685else
37686  if test -n "$ac_ct_AR"; then
37687  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37688else
37689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37690for as_dir in $PATH
37691do
37692  IFS=$as_save_IFS
37693  test -z "$as_dir" && as_dir=.
37694    for ac_exec_ext in '' $ac_executable_extensions; do
37695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37696    ac_cv_prog_ac_ct_AR="$ac_prog"
37697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698    break 2
37699  fi
37700done
37701  done
37702IFS=$as_save_IFS
37703
37704fi
37705fi
37706ac_ct_AR=$ac_cv_prog_ac_ct_AR
37707if test -n "$ac_ct_AR"; then
37708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37709$as_echo "$ac_ct_AR" >&6; }
37710else
37711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37712$as_echo "no" >&6; }
37713fi
37714
37715
37716  test -n "$ac_ct_AR" && break
37717done
37718
37719  if test "x$ac_ct_AR" = x; then
37720    AR=""
37721  else
37722    case $cross_compiling:$ac_tool_warned in
37723yes:)
37724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37726ac_tool_warned=yes ;;
37727esac
37728    AR=$ac_ct_AR
37729  fi
37730fi
37731
37732    else
37733      # If it succeeded, then it was overridden by the user. We will use it
37734      # for the tool.
37735
37736      # First remove it from the list of overridden variables, so we can test
37737      # for unknown variables in the end.
37738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37739
37740      # Check if we try to supply an empty value
37741      if test "x$AR" = x; then
37742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37743$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37745$as_echo_n "checking for AR... " >&6; }
37746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37747$as_echo "disabled" >&6; }
37748      else
37749        # Check if the provided tool contains a complete path.
37750        tool_specified="$AR"
37751        tool_basename="${tool_specified##*/}"
37752        if test "x$tool_basename" = "x$tool_specified"; then
37753          # A command without a complete path is provided, search $PATH.
37754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37755$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37756          # Extract the first word of "$tool_basename", so it can be a program name with args.
37757set dummy $tool_basename; ac_word=$2
37758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37759$as_echo_n "checking for $ac_word... " >&6; }
37760if ${ac_cv_path_AR+:} false; then :
37761  $as_echo_n "(cached) " >&6
37762else
37763  case $AR in
37764  [\\/]* | ?:[\\/]*)
37765  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37766  ;;
37767  *)
37768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37769for as_dir in $PATH
37770do
37771  IFS=$as_save_IFS
37772  test -z "$as_dir" && as_dir=.
37773    for ac_exec_ext in '' $ac_executable_extensions; do
37774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37775    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37777    break 2
37778  fi
37779done
37780  done
37781IFS=$as_save_IFS
37782
37783  ;;
37784esac
37785fi
37786AR=$ac_cv_path_AR
37787if test -n "$AR"; then
37788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37789$as_echo "$AR" >&6; }
37790else
37791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37792$as_echo "no" >&6; }
37793fi
37794
37795
37796          if test "x$AR" = x; then
37797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37798          fi
37799        else
37800          # Otherwise we believe it is a complete path. Use it as it is.
37801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37802$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37804$as_echo_n "checking for AR... " >&6; }
37805          if test ! -x "$tool_specified"; then
37806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37807$as_echo "not found" >&6; }
37808            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37809          fi
37810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37811$as_echo "$tool_specified" >&6; }
37812        fi
37813      fi
37814    fi
37815
37816  fi
37817
37818
37819  fi
37820
37821  # Only process if variable expands to non-empty
37822
37823  if test "x$AR" != x; then
37824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37825
37826  # First separate the path from the arguments. This will split at the first
37827  # space.
37828  complete="$AR"
37829  path="${complete%% *}"
37830  tmp="$complete EOL"
37831  arguments="${tmp#* }"
37832
37833  # Input might be given as Windows format, start by converting to
37834  # unix format.
37835  new_path=`$CYGPATH -u "$path"`
37836
37837  # Now try to locate executable using which
37838  new_path=`$WHICH "$new_path" 2> /dev/null`
37839  # bat and cmd files are not always considered executable in cygwin causing which
37840  # to not find them
37841  if test "x$new_path" = x \
37842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37844    new_path=`$CYGPATH -u "$path"`
37845  fi
37846  if test "x$new_path" = x; then
37847    # Oops. Which didn't find the executable.
37848    # The splitting of arguments from the executable at a space might have been incorrect,
37849    # since paths with space are more likely in Windows. Give it another try with the whole
37850    # argument.
37851    path="$complete"
37852    arguments="EOL"
37853    new_path=`$CYGPATH -u "$path"`
37854    new_path=`$WHICH "$new_path" 2> /dev/null`
37855    # bat and cmd files are not always considered executable in cygwin causing which
37856    # to not find them
37857    if test "x$new_path" = x \
37858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37860      new_path=`$CYGPATH -u "$path"`
37861    fi
37862    if test "x$new_path" = x; then
37863      # It's still not found. Now this is an unrecoverable error.
37864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37865$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37866      has_space=`$ECHO "$complete" | $GREP " "`
37867      if test "x$has_space" != x; then
37868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37870      fi
37871      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37872    fi
37873  fi
37874
37875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37878  # "foo.exe" is OK but "foo" is an error.
37879  #
37880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37881  # It is also a way to make sure we got the proper file name for the real test later on.
37882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37883  if test "x$test_shortpath" = x; then
37884    # Short path failed, file does not exist as specified.
37885    # Try adding .exe or .cmd
37886    if test -f "${new_path}.exe"; then
37887      input_to_shortpath="${new_path}.exe"
37888    elif test -f "${new_path}.cmd"; then
37889      input_to_shortpath="${new_path}.cmd"
37890    else
37891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37892$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37895      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37896    fi
37897  else
37898    input_to_shortpath="$new_path"
37899  fi
37900
37901  # Call helper function which possibly converts this using DOS-style short mode.
37902  # If so, the updated path is stored in $new_path.
37903  new_path="$input_to_shortpath"
37904
37905  input_path="$input_to_shortpath"
37906  # Check if we need to convert this using DOS-style short mode. If the path
37907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37908  # take no chances and rewrite it.
37909  # Note: m4 eats our [], so we need to use [ and ] instead.
37910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37911  if test "x$has_forbidden_chars" != x; then
37912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37916      # Going to short mode and back again did indeed matter. Since short mode is
37917      # case insensitive, let's make it lowercase to improve readability.
37918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37919      # Now convert it back to Unix-style (cygpath)
37920      input_path=`$CYGPATH -u "$shortmode_path"`
37921      new_path="$input_path"
37922    fi
37923  fi
37924
37925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37926  if test "x$test_cygdrive_prefix" = x; then
37927    # As a simple fix, exclude /usr/bin since it's not a real path.
37928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37930      # a path prefixed by /cygdrive for fixpath to work.
37931      new_path="$CYGWIN_ROOT_PATH$input_path"
37932    fi
37933  fi
37934
37935  # remove trailing .exe if any
37936  new_path="${new_path/%.exe/}"
37937
37938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37939
37940  # First separate the path from the arguments. This will split at the first
37941  # space.
37942  complete="$AR"
37943  path="${complete%% *}"
37944  tmp="$complete EOL"
37945  arguments="${tmp#* }"
37946
37947  # Input might be given as Windows format, start by converting to
37948  # unix format.
37949  new_path="$path"
37950
37951  windows_path="$new_path"
37952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37953    unix_path=`$CYGPATH -u "$windows_path"`
37954    new_path="$unix_path"
37955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37957    new_path="$unix_path"
37958  fi
37959
37960
37961  # Now try to locate executable using which
37962  new_path=`$WHICH "$new_path" 2> /dev/null`
37963
37964  if test "x$new_path" = x; then
37965    # Oops. Which didn't find the executable.
37966    # The splitting of arguments from the executable at a space might have been incorrect,
37967    # since paths with space are more likely in Windows. Give it another try with the whole
37968    # argument.
37969    path="$complete"
37970    arguments="EOL"
37971    new_path="$path"
37972
37973  windows_path="$new_path"
37974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37975    unix_path=`$CYGPATH -u "$windows_path"`
37976    new_path="$unix_path"
37977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37979    new_path="$unix_path"
37980  fi
37981
37982
37983    new_path=`$WHICH "$new_path" 2> /dev/null`
37984    # bat and cmd files are not always considered executable in MSYS causing which
37985    # to not find them
37986    if test "x$new_path" = x \
37987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37989      new_path="$path"
37990
37991  windows_path="$new_path"
37992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37993    unix_path=`$CYGPATH -u "$windows_path"`
37994    new_path="$unix_path"
37995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37997    new_path="$unix_path"
37998  fi
37999
38000    fi
38001
38002    if test "x$new_path" = x; then
38003      # It's still not found. Now this is an unrecoverable error.
38004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38005$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38006      has_space=`$ECHO "$complete" | $GREP " "`
38007      if test "x$has_space" != x; then
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38010      fi
38011      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38012    fi
38013  fi
38014
38015  # Now new_path has a complete unix path to the binary
38016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38017    # Keep paths in /bin as-is, but remove trailing .exe if any
38018    new_path="${new_path/%.exe/}"
38019    # Do not save /bin paths to all_fixpath_prefixes!
38020  else
38021    # Not in mixed or Windows style, start by that.
38022    new_path=`cmd //c echo $new_path`
38023
38024  input_path="$new_path"
38025  # Check if we need to convert this using DOS-style short mode. If the path
38026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38027  # take no chances and rewrite it.
38028  # Note: m4 eats our [], so we need to use [ and ] instead.
38029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38030  if test "x$has_forbidden_chars" != x; then
38031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38033  fi
38034
38035    # Output is in $new_path
38036
38037  windows_path="$new_path"
38038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38039    unix_path=`$CYGPATH -u "$windows_path"`
38040    new_path="$unix_path"
38041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38043    new_path="$unix_path"
38044  fi
38045
38046    # remove trailing .exe if any
38047    new_path="${new_path/%.exe/}"
38048
38049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38051  fi
38052
38053    else
38054      # We're on a unix platform. Hooray! :)
38055      # First separate the path from the arguments. This will split at the first
38056      # space.
38057      complete="$AR"
38058      path="${complete%% *}"
38059      tmp="$complete EOL"
38060      arguments="${tmp#* }"
38061
38062      # Cannot rely on the command "which" here since it doesn't always work.
38063      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38064      if test -z "$is_absolute_path"; then
38065        # Path to executable is not absolute. Find it.
38066        IFS_save="$IFS"
38067        IFS=:
38068        for p in $PATH; do
38069          if test -f "$p/$path" && test -x "$p/$path"; then
38070            new_path="$p/$path"
38071            break
38072          fi
38073        done
38074        IFS="$IFS_save"
38075      else
38076        # This is an absolute path, we can use it without further modifications.
38077        new_path="$path"
38078      fi
38079
38080      if test "x$new_path" = x; then
38081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38082$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38083        has_space=`$ECHO "$complete" | $GREP " "`
38084        if test "x$has_space" != x; then
38085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38087        fi
38088        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38089      fi
38090    fi
38091
38092    # Now join together the path and the arguments once again
38093    if test "x$arguments" != xEOL; then
38094      new_complete="$new_path ${arguments% *}"
38095    else
38096      new_complete="$new_path"
38097    fi
38098
38099    if test "x$complete" != "x$new_complete"; then
38100      AR="$new_complete"
38101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38102$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38103    fi
38104  fi
38105
38106
38107
38108  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38109
38110
38111  # Publish this variable in the help.
38112
38113
38114  if [ -z "${LIPO+x}" ]; then
38115    # The variable is not set by user, try to locate tool using the code snippet
38116    for ac_prog in lipo
38117do
38118  # Extract the first word of "$ac_prog", so it can be a program name with args.
38119set dummy $ac_prog; ac_word=$2
38120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38121$as_echo_n "checking for $ac_word... " >&6; }
38122if ${ac_cv_path_LIPO+:} false; then :
38123  $as_echo_n "(cached) " >&6
38124else
38125  case $LIPO in
38126  [\\/]* | ?:[\\/]*)
38127  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38128  ;;
38129  *)
38130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38131for as_dir in $PATH
38132do
38133  IFS=$as_save_IFS
38134  test -z "$as_dir" && as_dir=.
38135    for ac_exec_ext in '' $ac_executable_extensions; do
38136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38137    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38139    break 2
38140  fi
38141done
38142  done
38143IFS=$as_save_IFS
38144
38145  ;;
38146esac
38147fi
38148LIPO=$ac_cv_path_LIPO
38149if test -n "$LIPO"; then
38150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38151$as_echo "$LIPO" >&6; }
38152else
38153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38154$as_echo "no" >&6; }
38155fi
38156
38157
38158  test -n "$LIPO" && break
38159done
38160
38161  else
38162    # The variable is set, but is it from the command line or the environment?
38163
38164    # Try to remove the string !LIPO! from our list.
38165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38167      # If it failed, the variable was not from the command line. Ignore it,
38168      # but warn the user (except for BASH, which is always set by the calling BASH).
38169      if test "xLIPO" != xBASH; then
38170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38171$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38172      fi
38173      # Try to locate tool using the code snippet
38174      for ac_prog in lipo
38175do
38176  # Extract the first word of "$ac_prog", so it can be a program name with args.
38177set dummy $ac_prog; ac_word=$2
38178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38179$as_echo_n "checking for $ac_word... " >&6; }
38180if ${ac_cv_path_LIPO+:} false; then :
38181  $as_echo_n "(cached) " >&6
38182else
38183  case $LIPO in
38184  [\\/]* | ?:[\\/]*)
38185  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38186  ;;
38187  *)
38188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38189for as_dir in $PATH
38190do
38191  IFS=$as_save_IFS
38192  test -z "$as_dir" && as_dir=.
38193    for ac_exec_ext in '' $ac_executable_extensions; do
38194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38195    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38197    break 2
38198  fi
38199done
38200  done
38201IFS=$as_save_IFS
38202
38203  ;;
38204esac
38205fi
38206LIPO=$ac_cv_path_LIPO
38207if test -n "$LIPO"; then
38208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38209$as_echo "$LIPO" >&6; }
38210else
38211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38212$as_echo "no" >&6; }
38213fi
38214
38215
38216  test -n "$LIPO" && break
38217done
38218
38219    else
38220      # If it succeeded, then it was overridden by the user. We will use it
38221      # for the tool.
38222
38223      # First remove it from the list of overridden variables, so we can test
38224      # for unknown variables in the end.
38225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38226
38227      # Check if we try to supply an empty value
38228      if test "x$LIPO" = x; then
38229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38230$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38232$as_echo_n "checking for LIPO... " >&6; }
38233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38234$as_echo "disabled" >&6; }
38235      else
38236        # Check if the provided tool contains a complete path.
38237        tool_specified="$LIPO"
38238        tool_basename="${tool_specified##*/}"
38239        if test "x$tool_basename" = "x$tool_specified"; then
38240          # A command without a complete path is provided, search $PATH.
38241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38242$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38243          # Extract the first word of "$tool_basename", so it can be a program name with args.
38244set dummy $tool_basename; ac_word=$2
38245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246$as_echo_n "checking for $ac_word... " >&6; }
38247if ${ac_cv_path_LIPO+:} false; then :
38248  $as_echo_n "(cached) " >&6
38249else
38250  case $LIPO in
38251  [\\/]* | ?:[\\/]*)
38252  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38253  ;;
38254  *)
38255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38256for as_dir in $PATH
38257do
38258  IFS=$as_save_IFS
38259  test -z "$as_dir" && as_dir=.
38260    for ac_exec_ext in '' $ac_executable_extensions; do
38261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38262    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38264    break 2
38265  fi
38266done
38267  done
38268IFS=$as_save_IFS
38269
38270  ;;
38271esac
38272fi
38273LIPO=$ac_cv_path_LIPO
38274if test -n "$LIPO"; then
38275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38276$as_echo "$LIPO" >&6; }
38277else
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38279$as_echo "no" >&6; }
38280fi
38281
38282
38283          if test "x$LIPO" = x; then
38284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38285          fi
38286        else
38287          # Otherwise we believe it is a complete path. Use it as it is.
38288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38289$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38291$as_echo_n "checking for LIPO... " >&6; }
38292          if test ! -x "$tool_specified"; then
38293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38294$as_echo "not found" >&6; }
38295            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38296          fi
38297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38298$as_echo "$tool_specified" >&6; }
38299        fi
38300      fi
38301    fi
38302
38303  fi
38304
38305
38306
38307  # Only process if variable expands to non-empty
38308
38309  if test "x$LIPO" != x; then
38310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38311
38312  # First separate the path from the arguments. This will split at the first
38313  # space.
38314  complete="$LIPO"
38315  path="${complete%% *}"
38316  tmp="$complete EOL"
38317  arguments="${tmp#* }"
38318
38319  # Input might be given as Windows format, start by converting to
38320  # unix format.
38321  new_path=`$CYGPATH -u "$path"`
38322
38323  # Now try to locate executable using which
38324  new_path=`$WHICH "$new_path" 2> /dev/null`
38325  # bat and cmd files are not always considered executable in cygwin causing which
38326  # to not find them
38327  if test "x$new_path" = x \
38328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38330    new_path=`$CYGPATH -u "$path"`
38331  fi
38332  if test "x$new_path" = x; then
38333    # Oops. Which didn't find the executable.
38334    # The splitting of arguments from the executable at a space might have been incorrect,
38335    # since paths with space are more likely in Windows. Give it another try with the whole
38336    # argument.
38337    path="$complete"
38338    arguments="EOL"
38339    new_path=`$CYGPATH -u "$path"`
38340    new_path=`$WHICH "$new_path" 2> /dev/null`
38341    # bat and cmd files are not always considered executable in cygwin causing which
38342    # to not find them
38343    if test "x$new_path" = x \
38344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38346      new_path=`$CYGPATH -u "$path"`
38347    fi
38348    if test "x$new_path" = x; then
38349      # It's still not found. Now this is an unrecoverable error.
38350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38351$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38352      has_space=`$ECHO "$complete" | $GREP " "`
38353      if test "x$has_space" != x; then
38354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38356      fi
38357      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38358    fi
38359  fi
38360
38361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38364  # "foo.exe" is OK but "foo" is an error.
38365  #
38366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38367  # It is also a way to make sure we got the proper file name for the real test later on.
38368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38369  if test "x$test_shortpath" = x; then
38370    # Short path failed, file does not exist as specified.
38371    # Try adding .exe or .cmd
38372    if test -f "${new_path}.exe"; then
38373      input_to_shortpath="${new_path}.exe"
38374    elif test -f "${new_path}.cmd"; then
38375      input_to_shortpath="${new_path}.cmd"
38376    else
38377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38378$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38381      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38382    fi
38383  else
38384    input_to_shortpath="$new_path"
38385  fi
38386
38387  # Call helper function which possibly converts this using DOS-style short mode.
38388  # If so, the updated path is stored in $new_path.
38389  new_path="$input_to_shortpath"
38390
38391  input_path="$input_to_shortpath"
38392  # Check if we need to convert this using DOS-style short mode. If the path
38393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38394  # take no chances and rewrite it.
38395  # Note: m4 eats our [], so we need to use [ and ] instead.
38396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38397  if test "x$has_forbidden_chars" != x; then
38398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38402      # Going to short mode and back again did indeed matter. Since short mode is
38403      # case insensitive, let's make it lowercase to improve readability.
38404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38405      # Now convert it back to Unix-style (cygpath)
38406      input_path=`$CYGPATH -u "$shortmode_path"`
38407      new_path="$input_path"
38408    fi
38409  fi
38410
38411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38412  if test "x$test_cygdrive_prefix" = x; then
38413    # As a simple fix, exclude /usr/bin since it's not a real path.
38414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38416      # a path prefixed by /cygdrive for fixpath to work.
38417      new_path="$CYGWIN_ROOT_PATH$input_path"
38418    fi
38419  fi
38420
38421  # remove trailing .exe if any
38422  new_path="${new_path/%.exe/}"
38423
38424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38425
38426  # First separate the path from the arguments. This will split at the first
38427  # space.
38428  complete="$LIPO"
38429  path="${complete%% *}"
38430  tmp="$complete EOL"
38431  arguments="${tmp#* }"
38432
38433  # Input might be given as Windows format, start by converting to
38434  # unix format.
38435  new_path="$path"
38436
38437  windows_path="$new_path"
38438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38439    unix_path=`$CYGPATH -u "$windows_path"`
38440    new_path="$unix_path"
38441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38443    new_path="$unix_path"
38444  fi
38445
38446
38447  # Now try to locate executable using which
38448  new_path=`$WHICH "$new_path" 2> /dev/null`
38449
38450  if test "x$new_path" = x; then
38451    # Oops. Which didn't find the executable.
38452    # The splitting of arguments from the executable at a space might have been incorrect,
38453    # since paths with space are more likely in Windows. Give it another try with the whole
38454    # argument.
38455    path="$complete"
38456    arguments="EOL"
38457    new_path="$path"
38458
38459  windows_path="$new_path"
38460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38461    unix_path=`$CYGPATH -u "$windows_path"`
38462    new_path="$unix_path"
38463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38465    new_path="$unix_path"
38466  fi
38467
38468
38469    new_path=`$WHICH "$new_path" 2> /dev/null`
38470    # bat and cmd files are not always considered executable in MSYS causing which
38471    # to not find them
38472    if test "x$new_path" = x \
38473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38475      new_path="$path"
38476
38477  windows_path="$new_path"
38478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38479    unix_path=`$CYGPATH -u "$windows_path"`
38480    new_path="$unix_path"
38481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38483    new_path="$unix_path"
38484  fi
38485
38486    fi
38487
38488    if test "x$new_path" = x; then
38489      # It's still not found. Now this is an unrecoverable error.
38490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38491$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38492      has_space=`$ECHO "$complete" | $GREP " "`
38493      if test "x$has_space" != x; then
38494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38496      fi
38497      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38498    fi
38499  fi
38500
38501  # Now new_path has a complete unix path to the binary
38502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38503    # Keep paths in /bin as-is, but remove trailing .exe if any
38504    new_path="${new_path/%.exe/}"
38505    # Do not save /bin paths to all_fixpath_prefixes!
38506  else
38507    # Not in mixed or Windows style, start by that.
38508    new_path=`cmd //c echo $new_path`
38509
38510  input_path="$new_path"
38511  # Check if we need to convert this using DOS-style short mode. If the path
38512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38513  # take no chances and rewrite it.
38514  # Note: m4 eats our [], so we need to use [ and ] instead.
38515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38516  if test "x$has_forbidden_chars" != x; then
38517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38519  fi
38520
38521    # Output is in $new_path
38522
38523  windows_path="$new_path"
38524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38525    unix_path=`$CYGPATH -u "$windows_path"`
38526    new_path="$unix_path"
38527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38529    new_path="$unix_path"
38530  fi
38531
38532    # remove trailing .exe if any
38533    new_path="${new_path/%.exe/}"
38534
38535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38537  fi
38538
38539    else
38540      # We're on a unix platform. Hooray! :)
38541      # First separate the path from the arguments. This will split at the first
38542      # space.
38543      complete="$LIPO"
38544      path="${complete%% *}"
38545      tmp="$complete EOL"
38546      arguments="${tmp#* }"
38547
38548      # Cannot rely on the command "which" here since it doesn't always work.
38549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38550      if test -z "$is_absolute_path"; then
38551        # Path to executable is not absolute. Find it.
38552        IFS_save="$IFS"
38553        IFS=:
38554        for p in $PATH; do
38555          if test -f "$p/$path" && test -x "$p/$path"; then
38556            new_path="$p/$path"
38557            break
38558          fi
38559        done
38560        IFS="$IFS_save"
38561      else
38562        # This is an absolute path, we can use it without further modifications.
38563        new_path="$path"
38564      fi
38565
38566      if test "x$new_path" = x; then
38567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38568$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38569        has_space=`$ECHO "$complete" | $GREP " "`
38570        if test "x$has_space" != x; then
38571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38573        fi
38574        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38575      fi
38576    fi
38577
38578    # Now join together the path and the arguments once again
38579    if test "x$arguments" != xEOL; then
38580      new_complete="$new_path ${arguments% *}"
38581    else
38582      new_complete="$new_path"
38583    fi
38584
38585    if test "x$complete" != "x$new_complete"; then
38586      LIPO="$new_complete"
38587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38588$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38589    fi
38590  fi
38591
38592  fi
38593
38594  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38595    # Extract the first word of "mt", so it can be a program name with args.
38596set dummy mt; ac_word=$2
38597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38598$as_echo_n "checking for $ac_word... " >&6; }
38599if ${ac_cv_prog_MT+:} false; then :
38600  $as_echo_n "(cached) " >&6
38601else
38602  if test -n "$MT"; then
38603  ac_cv_prog_MT="$MT" # Let the user override the test.
38604else
38605  ac_prog_rejected=no
38606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38607for as_dir in $PATH
38608do
38609  IFS=$as_save_IFS
38610  test -z "$as_dir" && as_dir=.
38611    for ac_exec_ext in '' $ac_executable_extensions; do
38612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38613    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38614       ac_prog_rejected=yes
38615       continue
38616     fi
38617    ac_cv_prog_MT="mt"
38618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38619    break 2
38620  fi
38621done
38622  done
38623IFS=$as_save_IFS
38624
38625if test $ac_prog_rejected = yes; then
38626  # We found a bogon in the path, so make sure we never use it.
38627  set dummy $ac_cv_prog_MT
38628  shift
38629  if test $# != 0; then
38630    # We chose a different compiler from the bogus one.
38631    # However, it has the same basename, so the bogon will be chosen
38632    # first if we set MT to just the basename; use the full file name.
38633    shift
38634    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38635  fi
38636fi
38637fi
38638fi
38639MT=$ac_cv_prog_MT
38640if test -n "$MT"; then
38641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38642$as_echo "$MT" >&6; }
38643else
38644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38645$as_echo "no" >&6; }
38646fi
38647
38648
38649
38650  # Only process if variable expands to non-empty
38651
38652  if test "x$MT" != x; then
38653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38654
38655  # First separate the path from the arguments. This will split at the first
38656  # space.
38657  complete="$MT"
38658  path="${complete%% *}"
38659  tmp="$complete EOL"
38660  arguments="${tmp#* }"
38661
38662  # Input might be given as Windows format, start by converting to
38663  # unix format.
38664  new_path=`$CYGPATH -u "$path"`
38665
38666  # Now try to locate executable using which
38667  new_path=`$WHICH "$new_path" 2> /dev/null`
38668  # bat and cmd files are not always considered executable in cygwin causing which
38669  # to not find them
38670  if test "x$new_path" = x \
38671      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38672      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38673    new_path=`$CYGPATH -u "$path"`
38674  fi
38675  if test "x$new_path" = x; then
38676    # Oops. Which didn't find the executable.
38677    # The splitting of arguments from the executable at a space might have been incorrect,
38678    # since paths with space are more likely in Windows. Give it another try with the whole
38679    # argument.
38680    path="$complete"
38681    arguments="EOL"
38682    new_path=`$CYGPATH -u "$path"`
38683    new_path=`$WHICH "$new_path" 2> /dev/null`
38684    # bat and cmd files are not always considered executable in cygwin causing which
38685    # to not find them
38686    if test "x$new_path" = x \
38687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38689      new_path=`$CYGPATH -u "$path"`
38690    fi
38691    if test "x$new_path" = x; then
38692      # It's still not found. Now this is an unrecoverable error.
38693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38694$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38695      has_space=`$ECHO "$complete" | $GREP " "`
38696      if test "x$has_space" != x; then
38697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38699      fi
38700      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38701    fi
38702  fi
38703
38704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38707  # "foo.exe" is OK but "foo" is an error.
38708  #
38709  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38710  # It is also a way to make sure we got the proper file name for the real test later on.
38711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38712  if test "x$test_shortpath" = x; then
38713    # Short path failed, file does not exist as specified.
38714    # Try adding .exe or .cmd
38715    if test -f "${new_path}.exe"; then
38716      input_to_shortpath="${new_path}.exe"
38717    elif test -f "${new_path}.cmd"; then
38718      input_to_shortpath="${new_path}.cmd"
38719    else
38720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38721$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38722      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38723$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38724      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38725    fi
38726  else
38727    input_to_shortpath="$new_path"
38728  fi
38729
38730  # Call helper function which possibly converts this using DOS-style short mode.
38731  # If so, the updated path is stored in $new_path.
38732  new_path="$input_to_shortpath"
38733
38734  input_path="$input_to_shortpath"
38735  # Check if we need to convert this using DOS-style short mode. If the path
38736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38737  # take no chances and rewrite it.
38738  # Note: m4 eats our [], so we need to use [ and ] instead.
38739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38740  if test "x$has_forbidden_chars" != x; then
38741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38745      # Going to short mode and back again did indeed matter. Since short mode is
38746      # case insensitive, let's make it lowercase to improve readability.
38747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38748      # Now convert it back to Unix-style (cygpath)
38749      input_path=`$CYGPATH -u "$shortmode_path"`
38750      new_path="$input_path"
38751    fi
38752  fi
38753
38754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38755  if test "x$test_cygdrive_prefix" = x; then
38756    # As a simple fix, exclude /usr/bin since it's not a real path.
38757    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38759      # a path prefixed by /cygdrive for fixpath to work.
38760      new_path="$CYGWIN_ROOT_PATH$input_path"
38761    fi
38762  fi
38763
38764  # remove trailing .exe if any
38765  new_path="${new_path/%.exe/}"
38766
38767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38768
38769  # First separate the path from the arguments. This will split at the first
38770  # space.
38771  complete="$MT"
38772  path="${complete%% *}"
38773  tmp="$complete EOL"
38774  arguments="${tmp#* }"
38775
38776  # Input might be given as Windows format, start by converting to
38777  # unix format.
38778  new_path="$path"
38779
38780  windows_path="$new_path"
38781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38782    unix_path=`$CYGPATH -u "$windows_path"`
38783    new_path="$unix_path"
38784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38786    new_path="$unix_path"
38787  fi
38788
38789
38790  # Now try to locate executable using which
38791  new_path=`$WHICH "$new_path" 2> /dev/null`
38792
38793  if test "x$new_path" = x; then
38794    # Oops. Which didn't find the executable.
38795    # The splitting of arguments from the executable at a space might have been incorrect,
38796    # since paths with space are more likely in Windows. Give it another try with the whole
38797    # argument.
38798    path="$complete"
38799    arguments="EOL"
38800    new_path="$path"
38801
38802  windows_path="$new_path"
38803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38804    unix_path=`$CYGPATH -u "$windows_path"`
38805    new_path="$unix_path"
38806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38808    new_path="$unix_path"
38809  fi
38810
38811
38812    new_path=`$WHICH "$new_path" 2> /dev/null`
38813    # bat and cmd files are not always considered executable in MSYS causing which
38814    # to not find them
38815    if test "x$new_path" = x \
38816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38818      new_path="$path"
38819
38820  windows_path="$new_path"
38821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38822    unix_path=`$CYGPATH -u "$windows_path"`
38823    new_path="$unix_path"
38824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38826    new_path="$unix_path"
38827  fi
38828
38829    fi
38830
38831    if test "x$new_path" = x; then
38832      # It's still not found. Now this is an unrecoverable error.
38833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38834$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38835      has_space=`$ECHO "$complete" | $GREP " "`
38836      if test "x$has_space" != x; then
38837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38839      fi
38840      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38841    fi
38842  fi
38843
38844  # Now new_path has a complete unix path to the binary
38845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38846    # Keep paths in /bin as-is, but remove trailing .exe if any
38847    new_path="${new_path/%.exe/}"
38848    # Do not save /bin paths to all_fixpath_prefixes!
38849  else
38850    # Not in mixed or Windows style, start by that.
38851    new_path=`cmd //c echo $new_path`
38852
38853  input_path="$new_path"
38854  # Check if we need to convert this using DOS-style short mode. If the path
38855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38856  # take no chances and rewrite it.
38857  # Note: m4 eats our [], so we need to use [ and ] instead.
38858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38859  if test "x$has_forbidden_chars" != x; then
38860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38862  fi
38863
38864    # Output is in $new_path
38865
38866  windows_path="$new_path"
38867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868    unix_path=`$CYGPATH -u "$windows_path"`
38869    new_path="$unix_path"
38870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38872    new_path="$unix_path"
38873  fi
38874
38875    # remove trailing .exe if any
38876    new_path="${new_path/%.exe/}"
38877
38878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38880  fi
38881
38882    else
38883      # We're on a unix platform. Hooray! :)
38884      # First separate the path from the arguments. This will split at the first
38885      # space.
38886      complete="$MT"
38887      path="${complete%% *}"
38888      tmp="$complete EOL"
38889      arguments="${tmp#* }"
38890
38891      # Cannot rely on the command "which" here since it doesn't always work.
38892      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38893      if test -z "$is_absolute_path"; then
38894        # Path to executable is not absolute. Find it.
38895        IFS_save="$IFS"
38896        IFS=:
38897        for p in $PATH; do
38898          if test -f "$p/$path" && test -x "$p/$path"; then
38899            new_path="$p/$path"
38900            break
38901          fi
38902        done
38903        IFS="$IFS_save"
38904      else
38905        # This is an absolute path, we can use it without further modifications.
38906        new_path="$path"
38907      fi
38908
38909      if test "x$new_path" = x; then
38910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38911$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38912        has_space=`$ECHO "$complete" | $GREP " "`
38913        if test "x$has_space" != x; then
38914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38916        fi
38917        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38918      fi
38919    fi
38920
38921    # Now join together the path and the arguments once again
38922    if test "x$arguments" != xEOL; then
38923      new_complete="$new_path ${arguments% *}"
38924    else
38925      new_complete="$new_path"
38926    fi
38927
38928    if test "x$complete" != "x$new_complete"; then
38929      MT="$new_complete"
38930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38931$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38932    fi
38933  fi
38934
38935    # Setup the resource compiler (RC)
38936    # Extract the first word of "rc", so it can be a program name with args.
38937set dummy rc; ac_word=$2
38938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38939$as_echo_n "checking for $ac_word... " >&6; }
38940if ${ac_cv_prog_RC+:} false; then :
38941  $as_echo_n "(cached) " >&6
38942else
38943  if test -n "$RC"; then
38944  ac_cv_prog_RC="$RC" # Let the user override the test.
38945else
38946  ac_prog_rejected=no
38947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38948for as_dir in $PATH
38949do
38950  IFS=$as_save_IFS
38951  test -z "$as_dir" && as_dir=.
38952    for ac_exec_ext in '' $ac_executable_extensions; do
38953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38954    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38955       ac_prog_rejected=yes
38956       continue
38957     fi
38958    ac_cv_prog_RC="rc"
38959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38960    break 2
38961  fi
38962done
38963  done
38964IFS=$as_save_IFS
38965
38966if test $ac_prog_rejected = yes; then
38967  # We found a bogon in the path, so make sure we never use it.
38968  set dummy $ac_cv_prog_RC
38969  shift
38970  if test $# != 0; then
38971    # We chose a different compiler from the bogus one.
38972    # However, it has the same basename, so the bogon will be chosen
38973    # first if we set RC to just the basename; use the full file name.
38974    shift
38975    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38976  fi
38977fi
38978fi
38979fi
38980RC=$ac_cv_prog_RC
38981if test -n "$RC"; then
38982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38983$as_echo "$RC" >&6; }
38984else
38985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38986$as_echo "no" >&6; }
38987fi
38988
38989
38990
38991  # Only process if variable expands to non-empty
38992
38993  if test "x$RC" != x; then
38994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38995
38996  # First separate the path from the arguments. This will split at the first
38997  # space.
38998  complete="$RC"
38999  path="${complete%% *}"
39000  tmp="$complete EOL"
39001  arguments="${tmp#* }"
39002
39003  # Input might be given as Windows format, start by converting to
39004  # unix format.
39005  new_path=`$CYGPATH -u "$path"`
39006
39007  # Now try to locate executable using which
39008  new_path=`$WHICH "$new_path" 2> /dev/null`
39009  # bat and cmd files are not always considered executable in cygwin causing which
39010  # to not find them
39011  if test "x$new_path" = x \
39012      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39013      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39014    new_path=`$CYGPATH -u "$path"`
39015  fi
39016  if test "x$new_path" = x; then
39017    # Oops. Which didn't find the executable.
39018    # The splitting of arguments from the executable at a space might have been incorrect,
39019    # since paths with space are more likely in Windows. Give it another try with the whole
39020    # argument.
39021    path="$complete"
39022    arguments="EOL"
39023    new_path=`$CYGPATH -u "$path"`
39024    new_path=`$WHICH "$new_path" 2> /dev/null`
39025    # bat and cmd files are not always considered executable in cygwin causing which
39026    # to not find them
39027    if test "x$new_path" = x \
39028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39030      new_path=`$CYGPATH -u "$path"`
39031    fi
39032    if test "x$new_path" = x; then
39033      # It's still not found. Now this is an unrecoverable error.
39034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39035$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39036      has_space=`$ECHO "$complete" | $GREP " "`
39037      if test "x$has_space" != x; then
39038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39040      fi
39041      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39042    fi
39043  fi
39044
39045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39048  # "foo.exe" is OK but "foo" is an error.
39049  #
39050  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39051  # It is also a way to make sure we got the proper file name for the real test later on.
39052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39053  if test "x$test_shortpath" = x; then
39054    # Short path failed, file does not exist as specified.
39055    # Try adding .exe or .cmd
39056    if test -f "${new_path}.exe"; then
39057      input_to_shortpath="${new_path}.exe"
39058    elif test -f "${new_path}.cmd"; then
39059      input_to_shortpath="${new_path}.cmd"
39060    else
39061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39062$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39065      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39066    fi
39067  else
39068    input_to_shortpath="$new_path"
39069  fi
39070
39071  # Call helper function which possibly converts this using DOS-style short mode.
39072  # If so, the updated path is stored in $new_path.
39073  new_path="$input_to_shortpath"
39074
39075  input_path="$input_to_shortpath"
39076  # Check if we need to convert this using DOS-style short mode. If the path
39077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39078  # take no chances and rewrite it.
39079  # Note: m4 eats our [], so we need to use [ and ] instead.
39080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39081  if test "x$has_forbidden_chars" != x; then
39082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39086      # Going to short mode and back again did indeed matter. Since short mode is
39087      # case insensitive, let's make it lowercase to improve readability.
39088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39089      # Now convert it back to Unix-style (cygpath)
39090      input_path=`$CYGPATH -u "$shortmode_path"`
39091      new_path="$input_path"
39092    fi
39093  fi
39094
39095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39096  if test "x$test_cygdrive_prefix" = x; then
39097    # As a simple fix, exclude /usr/bin since it's not a real path.
39098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39100      # a path prefixed by /cygdrive for fixpath to work.
39101      new_path="$CYGWIN_ROOT_PATH$input_path"
39102    fi
39103  fi
39104
39105  # remove trailing .exe if any
39106  new_path="${new_path/%.exe/}"
39107
39108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39109
39110  # First separate the path from the arguments. This will split at the first
39111  # space.
39112  complete="$RC"
39113  path="${complete%% *}"
39114  tmp="$complete EOL"
39115  arguments="${tmp#* }"
39116
39117  # Input might be given as Windows format, start by converting to
39118  # unix format.
39119  new_path="$path"
39120
39121  windows_path="$new_path"
39122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39123    unix_path=`$CYGPATH -u "$windows_path"`
39124    new_path="$unix_path"
39125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39127    new_path="$unix_path"
39128  fi
39129
39130
39131  # Now try to locate executable using which
39132  new_path=`$WHICH "$new_path" 2> /dev/null`
39133
39134  if test "x$new_path" = x; then
39135    # Oops. Which didn't find the executable.
39136    # The splitting of arguments from the executable at a space might have been incorrect,
39137    # since paths with space are more likely in Windows. Give it another try with the whole
39138    # argument.
39139    path="$complete"
39140    arguments="EOL"
39141    new_path="$path"
39142
39143  windows_path="$new_path"
39144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39145    unix_path=`$CYGPATH -u "$windows_path"`
39146    new_path="$unix_path"
39147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39149    new_path="$unix_path"
39150  fi
39151
39152
39153    new_path=`$WHICH "$new_path" 2> /dev/null`
39154    # bat and cmd files are not always considered executable in MSYS causing which
39155    # to not find them
39156    if test "x$new_path" = x \
39157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39159      new_path="$path"
39160
39161  windows_path="$new_path"
39162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39163    unix_path=`$CYGPATH -u "$windows_path"`
39164    new_path="$unix_path"
39165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39167    new_path="$unix_path"
39168  fi
39169
39170    fi
39171
39172    if test "x$new_path" = x; then
39173      # It's still not found. Now this is an unrecoverable error.
39174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39175$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39176      has_space=`$ECHO "$complete" | $GREP " "`
39177      if test "x$has_space" != x; then
39178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39180      fi
39181      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39182    fi
39183  fi
39184
39185  # Now new_path has a complete unix path to the binary
39186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39187    # Keep paths in /bin as-is, but remove trailing .exe if any
39188    new_path="${new_path/%.exe/}"
39189    # Do not save /bin paths to all_fixpath_prefixes!
39190  else
39191    # Not in mixed or Windows style, start by that.
39192    new_path=`cmd //c echo $new_path`
39193
39194  input_path="$new_path"
39195  # Check if we need to convert this using DOS-style short mode. If the path
39196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39197  # take no chances and rewrite it.
39198  # Note: m4 eats our [], so we need to use [ and ] instead.
39199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39200  if test "x$has_forbidden_chars" != x; then
39201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39203  fi
39204
39205    # Output is in $new_path
39206
39207  windows_path="$new_path"
39208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39209    unix_path=`$CYGPATH -u "$windows_path"`
39210    new_path="$unix_path"
39211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39213    new_path="$unix_path"
39214  fi
39215
39216    # remove trailing .exe if any
39217    new_path="${new_path/%.exe/}"
39218
39219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39221  fi
39222
39223    else
39224      # We're on a unix platform. Hooray! :)
39225      # First separate the path from the arguments. This will split at the first
39226      # space.
39227      complete="$RC"
39228      path="${complete%% *}"
39229      tmp="$complete EOL"
39230      arguments="${tmp#* }"
39231
39232      # Cannot rely on the command "which" here since it doesn't always work.
39233      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39234      if test -z "$is_absolute_path"; then
39235        # Path to executable is not absolute. Find it.
39236        IFS_save="$IFS"
39237        IFS=:
39238        for p in $PATH; do
39239          if test -f "$p/$path" && test -x "$p/$path"; then
39240            new_path="$p/$path"
39241            break
39242          fi
39243        done
39244        IFS="$IFS_save"
39245      else
39246        # This is an absolute path, we can use it without further modifications.
39247        new_path="$path"
39248      fi
39249
39250      if test "x$new_path" = x; then
39251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39252$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39253        has_space=`$ECHO "$complete" | $GREP " "`
39254        if test "x$has_space" != x; then
39255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39257        fi
39258        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39259      fi
39260    fi
39261
39262    # Now join together the path and the arguments once again
39263    if test "x$arguments" != xEOL; then
39264      new_complete="$new_path ${arguments% *}"
39265    else
39266      new_complete="$new_path"
39267    fi
39268
39269    if test "x$complete" != "x$new_complete"; then
39270      RC="$new_complete"
39271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39272$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39273    fi
39274  fi
39275
39276    # Extract the first word of "dumpbin", so it can be a program name with args.
39277set dummy dumpbin; ac_word=$2
39278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39279$as_echo_n "checking for $ac_word... " >&6; }
39280if ${ac_cv_prog_DUMPBIN+:} false; then :
39281  $as_echo_n "(cached) " >&6
39282else
39283  if test -n "$DUMPBIN"; then
39284  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39285else
39286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39287for as_dir in $PATH
39288do
39289  IFS=$as_save_IFS
39290  test -z "$as_dir" && as_dir=.
39291    for ac_exec_ext in '' $ac_executable_extensions; do
39292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39293    ac_cv_prog_DUMPBIN="dumpbin"
39294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39295    break 2
39296  fi
39297done
39298  done
39299IFS=$as_save_IFS
39300
39301fi
39302fi
39303DUMPBIN=$ac_cv_prog_DUMPBIN
39304if test -n "$DUMPBIN"; then
39305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39306$as_echo "$DUMPBIN" >&6; }
39307else
39308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39309$as_echo "no" >&6; }
39310fi
39311
39312
39313
39314  # Only process if variable expands to non-empty
39315
39316  if test "x$DUMPBIN" != x; then
39317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39318
39319  # First separate the path from the arguments. This will split at the first
39320  # space.
39321  complete="$DUMPBIN"
39322  path="${complete%% *}"
39323  tmp="$complete EOL"
39324  arguments="${tmp#* }"
39325
39326  # Input might be given as Windows format, start by converting to
39327  # unix format.
39328  new_path=`$CYGPATH -u "$path"`
39329
39330  # Now try to locate executable using which
39331  new_path=`$WHICH "$new_path" 2> /dev/null`
39332  # bat and cmd files are not always considered executable in cygwin causing which
39333  # to not find them
39334  if test "x$new_path" = x \
39335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39337    new_path=`$CYGPATH -u "$path"`
39338  fi
39339  if test "x$new_path" = x; then
39340    # Oops. Which didn't find the executable.
39341    # The splitting of arguments from the executable at a space might have been incorrect,
39342    # since paths with space are more likely in Windows. Give it another try with the whole
39343    # argument.
39344    path="$complete"
39345    arguments="EOL"
39346    new_path=`$CYGPATH -u "$path"`
39347    new_path=`$WHICH "$new_path" 2> /dev/null`
39348    # bat and cmd files are not always considered executable in cygwin causing which
39349    # to not find them
39350    if test "x$new_path" = x \
39351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39353      new_path=`$CYGPATH -u "$path"`
39354    fi
39355    if test "x$new_path" = x; then
39356      # It's still not found. Now this is an unrecoverable error.
39357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39358$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39359      has_space=`$ECHO "$complete" | $GREP " "`
39360      if test "x$has_space" != x; then
39361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39363      fi
39364      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39365    fi
39366  fi
39367
39368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39371  # "foo.exe" is OK but "foo" is an error.
39372  #
39373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39374  # It is also a way to make sure we got the proper file name for the real test later on.
39375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39376  if test "x$test_shortpath" = x; then
39377    # Short path failed, file does not exist as specified.
39378    # Try adding .exe or .cmd
39379    if test -f "${new_path}.exe"; then
39380      input_to_shortpath="${new_path}.exe"
39381    elif test -f "${new_path}.cmd"; then
39382      input_to_shortpath="${new_path}.cmd"
39383    else
39384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39385$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39388      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39389    fi
39390  else
39391    input_to_shortpath="$new_path"
39392  fi
39393
39394  # Call helper function which possibly converts this using DOS-style short mode.
39395  # If so, the updated path is stored in $new_path.
39396  new_path="$input_to_shortpath"
39397
39398  input_path="$input_to_shortpath"
39399  # Check if we need to convert this using DOS-style short mode. If the path
39400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39401  # take no chances and rewrite it.
39402  # Note: m4 eats our [], so we need to use [ and ] instead.
39403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39404  if test "x$has_forbidden_chars" != x; then
39405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39409      # Going to short mode and back again did indeed matter. Since short mode is
39410      # case insensitive, let's make it lowercase to improve readability.
39411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39412      # Now convert it back to Unix-style (cygpath)
39413      input_path=`$CYGPATH -u "$shortmode_path"`
39414      new_path="$input_path"
39415    fi
39416  fi
39417
39418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39419  if test "x$test_cygdrive_prefix" = x; then
39420    # As a simple fix, exclude /usr/bin since it's not a real path.
39421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39423      # a path prefixed by /cygdrive for fixpath to work.
39424      new_path="$CYGWIN_ROOT_PATH$input_path"
39425    fi
39426  fi
39427
39428  # remove trailing .exe if any
39429  new_path="${new_path/%.exe/}"
39430
39431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39432
39433  # First separate the path from the arguments. This will split at the first
39434  # space.
39435  complete="$DUMPBIN"
39436  path="${complete%% *}"
39437  tmp="$complete EOL"
39438  arguments="${tmp#* }"
39439
39440  # Input might be given as Windows format, start by converting to
39441  # unix format.
39442  new_path="$path"
39443
39444  windows_path="$new_path"
39445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39446    unix_path=`$CYGPATH -u "$windows_path"`
39447    new_path="$unix_path"
39448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39450    new_path="$unix_path"
39451  fi
39452
39453
39454  # Now try to locate executable using which
39455  new_path=`$WHICH "$new_path" 2> /dev/null`
39456
39457  if test "x$new_path" = x; then
39458    # Oops. Which didn't find the executable.
39459    # The splitting of arguments from the executable at a space might have been incorrect,
39460    # since paths with space are more likely in Windows. Give it another try with the whole
39461    # argument.
39462    path="$complete"
39463    arguments="EOL"
39464    new_path="$path"
39465
39466  windows_path="$new_path"
39467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39468    unix_path=`$CYGPATH -u "$windows_path"`
39469    new_path="$unix_path"
39470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39472    new_path="$unix_path"
39473  fi
39474
39475
39476    new_path=`$WHICH "$new_path" 2> /dev/null`
39477    # bat and cmd files are not always considered executable in MSYS causing which
39478    # to not find them
39479    if test "x$new_path" = x \
39480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39482      new_path="$path"
39483
39484  windows_path="$new_path"
39485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39486    unix_path=`$CYGPATH -u "$windows_path"`
39487    new_path="$unix_path"
39488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39490    new_path="$unix_path"
39491  fi
39492
39493    fi
39494
39495    if test "x$new_path" = x; then
39496      # It's still not found. Now this is an unrecoverable error.
39497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39498$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39499      has_space=`$ECHO "$complete" | $GREP " "`
39500      if test "x$has_space" != x; then
39501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39503      fi
39504      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39505    fi
39506  fi
39507
39508  # Now new_path has a complete unix path to the binary
39509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39510    # Keep paths in /bin as-is, but remove trailing .exe if any
39511    new_path="${new_path/%.exe/}"
39512    # Do not save /bin paths to all_fixpath_prefixes!
39513  else
39514    # Not in mixed or Windows style, start by that.
39515    new_path=`cmd //c echo $new_path`
39516
39517  input_path="$new_path"
39518  # Check if we need to convert this using DOS-style short mode. If the path
39519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39520  # take no chances and rewrite it.
39521  # Note: m4 eats our [], so we need to use [ and ] instead.
39522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39523  if test "x$has_forbidden_chars" != x; then
39524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39526  fi
39527
39528    # Output is in $new_path
39529
39530  windows_path="$new_path"
39531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39532    unix_path=`$CYGPATH -u "$windows_path"`
39533    new_path="$unix_path"
39534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39536    new_path="$unix_path"
39537  fi
39538
39539    # remove trailing .exe if any
39540    new_path="${new_path/%.exe/}"
39541
39542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39544  fi
39545
39546    else
39547      # We're on a unix platform. Hooray! :)
39548      # First separate the path from the arguments. This will split at the first
39549      # space.
39550      complete="$DUMPBIN"
39551      path="${complete%% *}"
39552      tmp="$complete EOL"
39553      arguments="${tmp#* }"
39554
39555      # Cannot rely on the command "which" here since it doesn't always work.
39556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39557      if test -z "$is_absolute_path"; then
39558        # Path to executable is not absolute. Find it.
39559        IFS_save="$IFS"
39560        IFS=:
39561        for p in $PATH; do
39562          if test -f "$p/$path" && test -x "$p/$path"; then
39563            new_path="$p/$path"
39564            break
39565          fi
39566        done
39567        IFS="$IFS_save"
39568      else
39569        # This is an absolute path, we can use it without further modifications.
39570        new_path="$path"
39571      fi
39572
39573      if test "x$new_path" = x; then
39574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39575$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39576        has_space=`$ECHO "$complete" | $GREP " "`
39577        if test "x$has_space" != x; then
39578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39580        fi
39581        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39582      fi
39583    fi
39584
39585    # Now join together the path and the arguments once again
39586    if test "x$arguments" != xEOL; then
39587      new_complete="$new_path ${arguments% *}"
39588    else
39589      new_complete="$new_path"
39590    fi
39591
39592    if test "x$complete" != "x$new_complete"; then
39593      DUMPBIN="$new_complete"
39594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39595$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39596    fi
39597  fi
39598
39599    # We need to check for 'msbuild.exe' because at the place where we expect to
39600    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39601    # won't find the 'msbuild.exe' executable in that case (and the
39602    # 'ac_executable_extensions' is unusable due to performance reasons).
39603    # Notice that we intentionally don't fix up the path to MSBUILD because we
39604    # will call it in a DOS shell during freetype detection on Windows (see
39605    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39606    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39607set dummy msbuild.exe; ac_word=$2
39608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39609$as_echo_n "checking for $ac_word... " >&6; }
39610if ${ac_cv_prog_MSBUILD+:} false; then :
39611  $as_echo_n "(cached) " >&6
39612else
39613  if test -n "$MSBUILD"; then
39614  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39615else
39616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39617for as_dir in $PATH
39618do
39619  IFS=$as_save_IFS
39620  test -z "$as_dir" && as_dir=.
39621    for ac_exec_ext in '' $ac_executable_extensions; do
39622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39623    ac_cv_prog_MSBUILD="msbuild.exe"
39624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39625    break 2
39626  fi
39627done
39628  done
39629IFS=$as_save_IFS
39630
39631fi
39632fi
39633MSBUILD=$ac_cv_prog_MSBUILD
39634if test -n "$MSBUILD"; then
39635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39636$as_echo "$MSBUILD" >&6; }
39637else
39638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39639$as_echo "no" >&6; }
39640fi
39641
39642
39643  fi
39644
39645  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39646
39647
39648  # Publish this variable in the help.
39649
39650
39651  if [ -z "${STRIP+x}" ]; then
39652    # The variable is not set by user, try to locate tool using the code snippet
39653    for ac_prog in strip
39654do
39655  # Extract the first word of "$ac_prog", so it can be a program name with args.
39656set dummy $ac_prog; ac_word=$2
39657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39658$as_echo_n "checking for $ac_word... " >&6; }
39659if ${ac_cv_path_STRIP+:} false; then :
39660  $as_echo_n "(cached) " >&6
39661else
39662  case $STRIP in
39663  [\\/]* | ?:[\\/]*)
39664  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39665  ;;
39666  *)
39667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39668for as_dir in $PATH
39669do
39670  IFS=$as_save_IFS
39671  test -z "$as_dir" && as_dir=.
39672    for ac_exec_ext in '' $ac_executable_extensions; do
39673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39674    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39676    break 2
39677  fi
39678done
39679  done
39680IFS=$as_save_IFS
39681
39682  ;;
39683esac
39684fi
39685STRIP=$ac_cv_path_STRIP
39686if test -n "$STRIP"; then
39687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39688$as_echo "$STRIP" >&6; }
39689else
39690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39691$as_echo "no" >&6; }
39692fi
39693
39694
39695  test -n "$STRIP" && break
39696done
39697
39698  else
39699    # The variable is set, but is it from the command line or the environment?
39700
39701    # Try to remove the string !STRIP! from our list.
39702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39704      # If it failed, the variable was not from the command line. Ignore it,
39705      # but warn the user (except for BASH, which is always set by the calling BASH).
39706      if test "xSTRIP" != xBASH; then
39707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39708$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39709      fi
39710      # Try to locate tool using the code snippet
39711      for ac_prog in strip
39712do
39713  # Extract the first word of "$ac_prog", so it can be a program name with args.
39714set dummy $ac_prog; ac_word=$2
39715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39716$as_echo_n "checking for $ac_word... " >&6; }
39717if ${ac_cv_path_STRIP+:} false; then :
39718  $as_echo_n "(cached) " >&6
39719else
39720  case $STRIP in
39721  [\\/]* | ?:[\\/]*)
39722  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39723  ;;
39724  *)
39725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39726for as_dir in $PATH
39727do
39728  IFS=$as_save_IFS
39729  test -z "$as_dir" && as_dir=.
39730    for ac_exec_ext in '' $ac_executable_extensions; do
39731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39732    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39734    break 2
39735  fi
39736done
39737  done
39738IFS=$as_save_IFS
39739
39740  ;;
39741esac
39742fi
39743STRIP=$ac_cv_path_STRIP
39744if test -n "$STRIP"; then
39745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39746$as_echo "$STRIP" >&6; }
39747else
39748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39749$as_echo "no" >&6; }
39750fi
39751
39752
39753  test -n "$STRIP" && break
39754done
39755
39756    else
39757      # If it succeeded, then it was overridden by the user. We will use it
39758      # for the tool.
39759
39760      # First remove it from the list of overridden variables, so we can test
39761      # for unknown variables in the end.
39762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39763
39764      # Check if we try to supply an empty value
39765      if test "x$STRIP" = x; then
39766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39767$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39769$as_echo_n "checking for STRIP... " >&6; }
39770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39771$as_echo "disabled" >&6; }
39772      else
39773        # Check if the provided tool contains a complete path.
39774        tool_specified="$STRIP"
39775        tool_basename="${tool_specified##*/}"
39776        if test "x$tool_basename" = "x$tool_specified"; then
39777          # A command without a complete path is provided, search $PATH.
39778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39779$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39780          # Extract the first word of "$tool_basename", so it can be a program name with args.
39781set dummy $tool_basename; ac_word=$2
39782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39783$as_echo_n "checking for $ac_word... " >&6; }
39784if ${ac_cv_path_STRIP+:} false; then :
39785  $as_echo_n "(cached) " >&6
39786else
39787  case $STRIP in
39788  [\\/]* | ?:[\\/]*)
39789  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39790  ;;
39791  *)
39792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39793for as_dir in $PATH
39794do
39795  IFS=$as_save_IFS
39796  test -z "$as_dir" && as_dir=.
39797    for ac_exec_ext in '' $ac_executable_extensions; do
39798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39799    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39801    break 2
39802  fi
39803done
39804  done
39805IFS=$as_save_IFS
39806
39807  ;;
39808esac
39809fi
39810STRIP=$ac_cv_path_STRIP
39811if test -n "$STRIP"; then
39812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39813$as_echo "$STRIP" >&6; }
39814else
39815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39816$as_echo "no" >&6; }
39817fi
39818
39819
39820          if test "x$STRIP" = x; then
39821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39822          fi
39823        else
39824          # Otherwise we believe it is a complete path. Use it as it is.
39825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39826$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39828$as_echo_n "checking for STRIP... " >&6; }
39829          if test ! -x "$tool_specified"; then
39830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39831$as_echo "not found" >&6; }
39832            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39833          fi
39834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39835$as_echo "$tool_specified" >&6; }
39836        fi
39837      fi
39838    fi
39839
39840  fi
39841
39842
39843
39844  # Only process if variable expands to non-empty
39845
39846  if test "x$STRIP" != x; then
39847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39848
39849  # First separate the path from the arguments. This will split at the first
39850  # space.
39851  complete="$STRIP"
39852  path="${complete%% *}"
39853  tmp="$complete EOL"
39854  arguments="${tmp#* }"
39855
39856  # Input might be given as Windows format, start by converting to
39857  # unix format.
39858  new_path=`$CYGPATH -u "$path"`
39859
39860  # Now try to locate executable using which
39861  new_path=`$WHICH "$new_path" 2> /dev/null`
39862  # bat and cmd files are not always considered executable in cygwin causing which
39863  # to not find them
39864  if test "x$new_path" = x \
39865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39867    new_path=`$CYGPATH -u "$path"`
39868  fi
39869  if test "x$new_path" = x; then
39870    # Oops. Which didn't find the executable.
39871    # The splitting of arguments from the executable at a space might have been incorrect,
39872    # since paths with space are more likely in Windows. Give it another try with the whole
39873    # argument.
39874    path="$complete"
39875    arguments="EOL"
39876    new_path=`$CYGPATH -u "$path"`
39877    new_path=`$WHICH "$new_path" 2> /dev/null`
39878    # bat and cmd files are not always considered executable in cygwin causing which
39879    # to not find them
39880    if test "x$new_path" = x \
39881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39883      new_path=`$CYGPATH -u "$path"`
39884    fi
39885    if test "x$new_path" = x; then
39886      # It's still not found. Now this is an unrecoverable error.
39887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39888$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39889      has_space=`$ECHO "$complete" | $GREP " "`
39890      if test "x$has_space" != x; then
39891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39893      fi
39894      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39895    fi
39896  fi
39897
39898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39901  # "foo.exe" is OK but "foo" is an error.
39902  #
39903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39904  # It is also a way to make sure we got the proper file name for the real test later on.
39905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39906  if test "x$test_shortpath" = x; then
39907    # Short path failed, file does not exist as specified.
39908    # Try adding .exe or .cmd
39909    if test -f "${new_path}.exe"; then
39910      input_to_shortpath="${new_path}.exe"
39911    elif test -f "${new_path}.cmd"; then
39912      input_to_shortpath="${new_path}.cmd"
39913    else
39914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39915$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39918      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39919    fi
39920  else
39921    input_to_shortpath="$new_path"
39922  fi
39923
39924  # Call helper function which possibly converts this using DOS-style short mode.
39925  # If so, the updated path is stored in $new_path.
39926  new_path="$input_to_shortpath"
39927
39928  input_path="$input_to_shortpath"
39929  # Check if we need to convert this using DOS-style short mode. If the path
39930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39931  # take no chances and rewrite it.
39932  # Note: m4 eats our [], so we need to use [ and ] instead.
39933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39934  if test "x$has_forbidden_chars" != x; then
39935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39939      # Going to short mode and back again did indeed matter. Since short mode is
39940      # case insensitive, let's make it lowercase to improve readability.
39941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39942      # Now convert it back to Unix-style (cygpath)
39943      input_path=`$CYGPATH -u "$shortmode_path"`
39944      new_path="$input_path"
39945    fi
39946  fi
39947
39948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39949  if test "x$test_cygdrive_prefix" = x; then
39950    # As a simple fix, exclude /usr/bin since it's not a real path.
39951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39953      # a path prefixed by /cygdrive for fixpath to work.
39954      new_path="$CYGWIN_ROOT_PATH$input_path"
39955    fi
39956  fi
39957
39958  # remove trailing .exe if any
39959  new_path="${new_path/%.exe/}"
39960
39961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39962
39963  # First separate the path from the arguments. This will split at the first
39964  # space.
39965  complete="$STRIP"
39966  path="${complete%% *}"
39967  tmp="$complete EOL"
39968  arguments="${tmp#* }"
39969
39970  # Input might be given as Windows format, start by converting to
39971  # unix format.
39972  new_path="$path"
39973
39974  windows_path="$new_path"
39975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39976    unix_path=`$CYGPATH -u "$windows_path"`
39977    new_path="$unix_path"
39978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39980    new_path="$unix_path"
39981  fi
39982
39983
39984  # Now try to locate executable using which
39985  new_path=`$WHICH "$new_path" 2> /dev/null`
39986
39987  if test "x$new_path" = x; then
39988    # Oops. Which didn't find the executable.
39989    # The splitting of arguments from the executable at a space might have been incorrect,
39990    # since paths with space are more likely in Windows. Give it another try with the whole
39991    # argument.
39992    path="$complete"
39993    arguments="EOL"
39994    new_path="$path"
39995
39996  windows_path="$new_path"
39997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39998    unix_path=`$CYGPATH -u "$windows_path"`
39999    new_path="$unix_path"
40000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40002    new_path="$unix_path"
40003  fi
40004
40005
40006    new_path=`$WHICH "$new_path" 2> /dev/null`
40007    # bat and cmd files are not always considered executable in MSYS causing which
40008    # to not find them
40009    if test "x$new_path" = x \
40010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40012      new_path="$path"
40013
40014  windows_path="$new_path"
40015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40016    unix_path=`$CYGPATH -u "$windows_path"`
40017    new_path="$unix_path"
40018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40020    new_path="$unix_path"
40021  fi
40022
40023    fi
40024
40025    if test "x$new_path" = x; then
40026      # It's still not found. Now this is an unrecoverable error.
40027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40028$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40029      has_space=`$ECHO "$complete" | $GREP " "`
40030      if test "x$has_space" != x; then
40031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40033      fi
40034      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40035    fi
40036  fi
40037
40038  # Now new_path has a complete unix path to the binary
40039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40040    # Keep paths in /bin as-is, but remove trailing .exe if any
40041    new_path="${new_path/%.exe/}"
40042    # Do not save /bin paths to all_fixpath_prefixes!
40043  else
40044    # Not in mixed or Windows style, start by that.
40045    new_path=`cmd //c echo $new_path`
40046
40047  input_path="$new_path"
40048  # Check if we need to convert this using DOS-style short mode. If the path
40049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40050  # take no chances and rewrite it.
40051  # Note: m4 eats our [], so we need to use [ and ] instead.
40052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40053  if test "x$has_forbidden_chars" != x; then
40054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40056  fi
40057
40058    # Output is in $new_path
40059
40060  windows_path="$new_path"
40061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40062    unix_path=`$CYGPATH -u "$windows_path"`
40063    new_path="$unix_path"
40064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40066    new_path="$unix_path"
40067  fi
40068
40069    # remove trailing .exe if any
40070    new_path="${new_path/%.exe/}"
40071
40072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40074  fi
40075
40076    else
40077      # We're on a unix platform. Hooray! :)
40078      # First separate the path from the arguments. This will split at the first
40079      # space.
40080      complete="$STRIP"
40081      path="${complete%% *}"
40082      tmp="$complete EOL"
40083      arguments="${tmp#* }"
40084
40085      # Cannot rely on the command "which" here since it doesn't always work.
40086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40087      if test -z "$is_absolute_path"; then
40088        # Path to executable is not absolute. Find it.
40089        IFS_save="$IFS"
40090        IFS=:
40091        for p in $PATH; do
40092          if test -f "$p/$path" && test -x "$p/$path"; then
40093            new_path="$p/$path"
40094            break
40095          fi
40096        done
40097        IFS="$IFS_save"
40098      else
40099        # This is an absolute path, we can use it without further modifications.
40100        new_path="$path"
40101      fi
40102
40103      if test "x$new_path" = x; then
40104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40105$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40106        has_space=`$ECHO "$complete" | $GREP " "`
40107        if test "x$has_space" != x; then
40108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40110        fi
40111        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40112      fi
40113    fi
40114
40115    # Now join together the path and the arguments once again
40116    if test "x$arguments" != xEOL; then
40117      new_complete="$new_path ${arguments% *}"
40118    else
40119      new_complete="$new_path"
40120    fi
40121
40122    if test "x$complete" != "x$new_complete"; then
40123      STRIP="$new_complete"
40124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40125$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40126    fi
40127  fi
40128
40129
40130
40131  # Publish this variable in the help.
40132
40133
40134  if [ -z "${NM+x}" ]; then
40135    # The variable is not set by user, try to locate tool using the code snippet
40136    for ac_prog in nm
40137do
40138  # Extract the first word of "$ac_prog", so it can be a program name with args.
40139set dummy $ac_prog; ac_word=$2
40140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40141$as_echo_n "checking for $ac_word... " >&6; }
40142if ${ac_cv_path_NM+:} false; then :
40143  $as_echo_n "(cached) " >&6
40144else
40145  case $NM in
40146  [\\/]* | ?:[\\/]*)
40147  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40148  ;;
40149  *)
40150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40151for as_dir in $PATH
40152do
40153  IFS=$as_save_IFS
40154  test -z "$as_dir" && as_dir=.
40155    for ac_exec_ext in '' $ac_executable_extensions; do
40156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40157    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40159    break 2
40160  fi
40161done
40162  done
40163IFS=$as_save_IFS
40164
40165  ;;
40166esac
40167fi
40168NM=$ac_cv_path_NM
40169if test -n "$NM"; then
40170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40171$as_echo "$NM" >&6; }
40172else
40173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40174$as_echo "no" >&6; }
40175fi
40176
40177
40178  test -n "$NM" && break
40179done
40180
40181  else
40182    # The variable is set, but is it from the command line or the environment?
40183
40184    # Try to remove the string !NM! from our list.
40185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40187      # If it failed, the variable was not from the command line. Ignore it,
40188      # but warn the user (except for BASH, which is always set by the calling BASH).
40189      if test "xNM" != xBASH; then
40190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40191$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40192      fi
40193      # Try to locate tool using the code snippet
40194      for ac_prog in nm
40195do
40196  # Extract the first word of "$ac_prog", so it can be a program name with args.
40197set dummy $ac_prog; ac_word=$2
40198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40199$as_echo_n "checking for $ac_word... " >&6; }
40200if ${ac_cv_path_NM+:} false; then :
40201  $as_echo_n "(cached) " >&6
40202else
40203  case $NM in
40204  [\\/]* | ?:[\\/]*)
40205  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40206  ;;
40207  *)
40208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40209for as_dir in $PATH
40210do
40211  IFS=$as_save_IFS
40212  test -z "$as_dir" && as_dir=.
40213    for ac_exec_ext in '' $ac_executable_extensions; do
40214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40215    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40217    break 2
40218  fi
40219done
40220  done
40221IFS=$as_save_IFS
40222
40223  ;;
40224esac
40225fi
40226NM=$ac_cv_path_NM
40227if test -n "$NM"; then
40228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40229$as_echo "$NM" >&6; }
40230else
40231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40232$as_echo "no" >&6; }
40233fi
40234
40235
40236  test -n "$NM" && break
40237done
40238
40239    else
40240      # If it succeeded, then it was overridden by the user. We will use it
40241      # for the tool.
40242
40243      # First remove it from the list of overridden variables, so we can test
40244      # for unknown variables in the end.
40245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40246
40247      # Check if we try to supply an empty value
40248      if test "x$NM" = x; then
40249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40250$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40252$as_echo_n "checking for NM... " >&6; }
40253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40254$as_echo "disabled" >&6; }
40255      else
40256        # Check if the provided tool contains a complete path.
40257        tool_specified="$NM"
40258        tool_basename="${tool_specified##*/}"
40259        if test "x$tool_basename" = "x$tool_specified"; then
40260          # A command without a complete path is provided, search $PATH.
40261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40262$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40263          # Extract the first word of "$tool_basename", so it can be a program name with args.
40264set dummy $tool_basename; ac_word=$2
40265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40266$as_echo_n "checking for $ac_word... " >&6; }
40267if ${ac_cv_path_NM+:} false; then :
40268  $as_echo_n "(cached) " >&6
40269else
40270  case $NM in
40271  [\\/]* | ?:[\\/]*)
40272  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40273  ;;
40274  *)
40275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40276for as_dir in $PATH
40277do
40278  IFS=$as_save_IFS
40279  test -z "$as_dir" && as_dir=.
40280    for ac_exec_ext in '' $ac_executable_extensions; do
40281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40282    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40284    break 2
40285  fi
40286done
40287  done
40288IFS=$as_save_IFS
40289
40290  ;;
40291esac
40292fi
40293NM=$ac_cv_path_NM
40294if test -n "$NM"; then
40295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40296$as_echo "$NM" >&6; }
40297else
40298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40299$as_echo "no" >&6; }
40300fi
40301
40302
40303          if test "x$NM" = x; then
40304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40305          fi
40306        else
40307          # Otherwise we believe it is a complete path. Use it as it is.
40308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40309$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40311$as_echo_n "checking for NM... " >&6; }
40312          if test ! -x "$tool_specified"; then
40313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40314$as_echo "not found" >&6; }
40315            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40316          fi
40317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40318$as_echo "$tool_specified" >&6; }
40319        fi
40320      fi
40321    fi
40322
40323  fi
40324
40325
40326
40327  # Only process if variable expands to non-empty
40328
40329  if test "x$NM" != x; then
40330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40331
40332  # First separate the path from the arguments. This will split at the first
40333  # space.
40334  complete="$NM"
40335  path="${complete%% *}"
40336  tmp="$complete EOL"
40337  arguments="${tmp#* }"
40338
40339  # Input might be given as Windows format, start by converting to
40340  # unix format.
40341  new_path=`$CYGPATH -u "$path"`
40342
40343  # Now try to locate executable using which
40344  new_path=`$WHICH "$new_path" 2> /dev/null`
40345  # bat and cmd files are not always considered executable in cygwin causing which
40346  # to not find them
40347  if test "x$new_path" = x \
40348      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40349      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40350    new_path=`$CYGPATH -u "$path"`
40351  fi
40352  if test "x$new_path" = x; then
40353    # Oops. Which didn't find the executable.
40354    # The splitting of arguments from the executable at a space might have been incorrect,
40355    # since paths with space are more likely in Windows. Give it another try with the whole
40356    # argument.
40357    path="$complete"
40358    arguments="EOL"
40359    new_path=`$CYGPATH -u "$path"`
40360    new_path=`$WHICH "$new_path" 2> /dev/null`
40361    # bat and cmd files are not always considered executable in cygwin causing which
40362    # to not find them
40363    if test "x$new_path" = x \
40364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40366      new_path=`$CYGPATH -u "$path"`
40367    fi
40368    if test "x$new_path" = x; then
40369      # It's still not found. Now this is an unrecoverable error.
40370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40371$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40372      has_space=`$ECHO "$complete" | $GREP " "`
40373      if test "x$has_space" != x; then
40374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40376      fi
40377      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40378    fi
40379  fi
40380
40381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40384  # "foo.exe" is OK but "foo" is an error.
40385  #
40386  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40387  # It is also a way to make sure we got the proper file name for the real test later on.
40388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40389  if test "x$test_shortpath" = x; then
40390    # Short path failed, file does not exist as specified.
40391    # Try adding .exe or .cmd
40392    if test -f "${new_path}.exe"; then
40393      input_to_shortpath="${new_path}.exe"
40394    elif test -f "${new_path}.cmd"; then
40395      input_to_shortpath="${new_path}.cmd"
40396    else
40397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40398$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40399      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40400$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40401      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40402    fi
40403  else
40404    input_to_shortpath="$new_path"
40405  fi
40406
40407  # Call helper function which possibly converts this using DOS-style short mode.
40408  # If so, the updated path is stored in $new_path.
40409  new_path="$input_to_shortpath"
40410
40411  input_path="$input_to_shortpath"
40412  # Check if we need to convert this using DOS-style short mode. If the path
40413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40414  # take no chances and rewrite it.
40415  # Note: m4 eats our [], so we need to use [ and ] instead.
40416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40417  if test "x$has_forbidden_chars" != x; then
40418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40422      # Going to short mode and back again did indeed matter. Since short mode is
40423      # case insensitive, let's make it lowercase to improve readability.
40424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40425      # Now convert it back to Unix-style (cygpath)
40426      input_path=`$CYGPATH -u "$shortmode_path"`
40427      new_path="$input_path"
40428    fi
40429  fi
40430
40431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40432  if test "x$test_cygdrive_prefix" = x; then
40433    # As a simple fix, exclude /usr/bin since it's not a real path.
40434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40436      # a path prefixed by /cygdrive for fixpath to work.
40437      new_path="$CYGWIN_ROOT_PATH$input_path"
40438    fi
40439  fi
40440
40441  # remove trailing .exe if any
40442  new_path="${new_path/%.exe/}"
40443
40444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40445
40446  # First separate the path from the arguments. This will split at the first
40447  # space.
40448  complete="$NM"
40449  path="${complete%% *}"
40450  tmp="$complete EOL"
40451  arguments="${tmp#* }"
40452
40453  # Input might be given as Windows format, start by converting to
40454  # unix format.
40455  new_path="$path"
40456
40457  windows_path="$new_path"
40458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40459    unix_path=`$CYGPATH -u "$windows_path"`
40460    new_path="$unix_path"
40461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40463    new_path="$unix_path"
40464  fi
40465
40466
40467  # Now try to locate executable using which
40468  new_path=`$WHICH "$new_path" 2> /dev/null`
40469
40470  if test "x$new_path" = x; then
40471    # Oops. Which didn't find the executable.
40472    # The splitting of arguments from the executable at a space might have been incorrect,
40473    # since paths with space are more likely in Windows. Give it another try with the whole
40474    # argument.
40475    path="$complete"
40476    arguments="EOL"
40477    new_path="$path"
40478
40479  windows_path="$new_path"
40480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40481    unix_path=`$CYGPATH -u "$windows_path"`
40482    new_path="$unix_path"
40483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40485    new_path="$unix_path"
40486  fi
40487
40488
40489    new_path=`$WHICH "$new_path" 2> /dev/null`
40490    # bat and cmd files are not always considered executable in MSYS causing which
40491    # to not find them
40492    if test "x$new_path" = x \
40493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40495      new_path="$path"
40496
40497  windows_path="$new_path"
40498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40499    unix_path=`$CYGPATH -u "$windows_path"`
40500    new_path="$unix_path"
40501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40503    new_path="$unix_path"
40504  fi
40505
40506    fi
40507
40508    if test "x$new_path" = x; then
40509      # It's still not found. Now this is an unrecoverable error.
40510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40511$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40512      has_space=`$ECHO "$complete" | $GREP " "`
40513      if test "x$has_space" != x; then
40514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40516      fi
40517      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40518    fi
40519  fi
40520
40521  # Now new_path has a complete unix path to the binary
40522  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40523    # Keep paths in /bin as-is, but remove trailing .exe if any
40524    new_path="${new_path/%.exe/}"
40525    # Do not save /bin paths to all_fixpath_prefixes!
40526  else
40527    # Not in mixed or Windows style, start by that.
40528    new_path=`cmd //c echo $new_path`
40529
40530  input_path="$new_path"
40531  # Check if we need to convert this using DOS-style short mode. If the path
40532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40533  # take no chances and rewrite it.
40534  # Note: m4 eats our [], so we need to use [ and ] instead.
40535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40536  if test "x$has_forbidden_chars" != x; then
40537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40539  fi
40540
40541    # Output is in $new_path
40542
40543  windows_path="$new_path"
40544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40545    unix_path=`$CYGPATH -u "$windows_path"`
40546    new_path="$unix_path"
40547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40549    new_path="$unix_path"
40550  fi
40551
40552    # remove trailing .exe if any
40553    new_path="${new_path/%.exe/}"
40554
40555    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40556    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40557  fi
40558
40559    else
40560      # We're on a unix platform. Hooray! :)
40561      # First separate the path from the arguments. This will split at the first
40562      # space.
40563      complete="$NM"
40564      path="${complete%% *}"
40565      tmp="$complete EOL"
40566      arguments="${tmp#* }"
40567
40568      # Cannot rely on the command "which" here since it doesn't always work.
40569      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40570      if test -z "$is_absolute_path"; then
40571        # Path to executable is not absolute. Find it.
40572        IFS_save="$IFS"
40573        IFS=:
40574        for p in $PATH; do
40575          if test -f "$p/$path" && test -x "$p/$path"; then
40576            new_path="$p/$path"
40577            break
40578          fi
40579        done
40580        IFS="$IFS_save"
40581      else
40582        # This is an absolute path, we can use it without further modifications.
40583        new_path="$path"
40584      fi
40585
40586      if test "x$new_path" = x; then
40587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40588$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40589        has_space=`$ECHO "$complete" | $GREP " "`
40590        if test "x$has_space" != x; then
40591          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40592$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40593        fi
40594        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40595      fi
40596    fi
40597
40598    # Now join together the path and the arguments once again
40599    if test "x$arguments" != xEOL; then
40600      new_complete="$new_path ${arguments% *}"
40601    else
40602      new_complete="$new_path"
40603    fi
40604
40605    if test "x$complete" != "x$new_complete"; then
40606      NM="$new_complete"
40607      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40608$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40609    fi
40610  fi
40611
40612
40613
40614  # Publish this variable in the help.
40615
40616
40617  if [ -z "${GNM+x}" ]; then
40618    # The variable is not set by user, try to locate tool using the code snippet
40619    for ac_prog in gnm
40620do
40621  # Extract the first word of "$ac_prog", so it can be a program name with args.
40622set dummy $ac_prog; ac_word=$2
40623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40624$as_echo_n "checking for $ac_word... " >&6; }
40625if ${ac_cv_path_GNM+:} false; then :
40626  $as_echo_n "(cached) " >&6
40627else
40628  case $GNM in
40629  [\\/]* | ?:[\\/]*)
40630  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40631  ;;
40632  *)
40633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40634for as_dir in $PATH
40635do
40636  IFS=$as_save_IFS
40637  test -z "$as_dir" && as_dir=.
40638    for ac_exec_ext in '' $ac_executable_extensions; do
40639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40640    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40642    break 2
40643  fi
40644done
40645  done
40646IFS=$as_save_IFS
40647
40648  ;;
40649esac
40650fi
40651GNM=$ac_cv_path_GNM
40652if test -n "$GNM"; then
40653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40654$as_echo "$GNM" >&6; }
40655else
40656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40657$as_echo "no" >&6; }
40658fi
40659
40660
40661  test -n "$GNM" && break
40662done
40663
40664  else
40665    # The variable is set, but is it from the command line or the environment?
40666
40667    # Try to remove the string !GNM! from our list.
40668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40670      # If it failed, the variable was not from the command line. Ignore it,
40671      # but warn the user (except for BASH, which is always set by the calling BASH).
40672      if test "xGNM" != xBASH; then
40673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40674$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40675      fi
40676      # Try to locate tool using the code snippet
40677      for ac_prog in gnm
40678do
40679  # Extract the first word of "$ac_prog", so it can be a program name with args.
40680set dummy $ac_prog; ac_word=$2
40681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40682$as_echo_n "checking for $ac_word... " >&6; }
40683if ${ac_cv_path_GNM+:} false; then :
40684  $as_echo_n "(cached) " >&6
40685else
40686  case $GNM in
40687  [\\/]* | ?:[\\/]*)
40688  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40689  ;;
40690  *)
40691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40692for as_dir in $PATH
40693do
40694  IFS=$as_save_IFS
40695  test -z "$as_dir" && as_dir=.
40696    for ac_exec_ext in '' $ac_executable_extensions; do
40697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40698    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40700    break 2
40701  fi
40702done
40703  done
40704IFS=$as_save_IFS
40705
40706  ;;
40707esac
40708fi
40709GNM=$ac_cv_path_GNM
40710if test -n "$GNM"; then
40711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40712$as_echo "$GNM" >&6; }
40713else
40714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40715$as_echo "no" >&6; }
40716fi
40717
40718
40719  test -n "$GNM" && break
40720done
40721
40722    else
40723      # If it succeeded, then it was overridden by the user. We will use it
40724      # for the tool.
40725
40726      # First remove it from the list of overridden variables, so we can test
40727      # for unknown variables in the end.
40728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40729
40730      # Check if we try to supply an empty value
40731      if test "x$GNM" = x; then
40732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40733$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40735$as_echo_n "checking for GNM... " >&6; }
40736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40737$as_echo "disabled" >&6; }
40738      else
40739        # Check if the provided tool contains a complete path.
40740        tool_specified="$GNM"
40741        tool_basename="${tool_specified##*/}"
40742        if test "x$tool_basename" = "x$tool_specified"; then
40743          # A command without a complete path is provided, search $PATH.
40744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40745$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40746          # Extract the first word of "$tool_basename", so it can be a program name with args.
40747set dummy $tool_basename; ac_word=$2
40748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40749$as_echo_n "checking for $ac_word... " >&6; }
40750if ${ac_cv_path_GNM+:} false; then :
40751  $as_echo_n "(cached) " >&6
40752else
40753  case $GNM in
40754  [\\/]* | ?:[\\/]*)
40755  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40756  ;;
40757  *)
40758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40759for as_dir in $PATH
40760do
40761  IFS=$as_save_IFS
40762  test -z "$as_dir" && as_dir=.
40763    for ac_exec_ext in '' $ac_executable_extensions; do
40764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40765    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40767    break 2
40768  fi
40769done
40770  done
40771IFS=$as_save_IFS
40772
40773  ;;
40774esac
40775fi
40776GNM=$ac_cv_path_GNM
40777if test -n "$GNM"; then
40778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40779$as_echo "$GNM" >&6; }
40780else
40781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40782$as_echo "no" >&6; }
40783fi
40784
40785
40786          if test "x$GNM" = x; then
40787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40788          fi
40789        else
40790          # Otherwise we believe it is a complete path. Use it as it is.
40791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40792$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40794$as_echo_n "checking for GNM... " >&6; }
40795          if test ! -x "$tool_specified"; then
40796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40797$as_echo "not found" >&6; }
40798            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40799          fi
40800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40801$as_echo "$tool_specified" >&6; }
40802        fi
40803      fi
40804    fi
40805
40806  fi
40807
40808
40809
40810  # Only process if variable expands to non-empty
40811
40812  if test "x$GNM" != x; then
40813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40814
40815  # First separate the path from the arguments. This will split at the first
40816  # space.
40817  complete="$GNM"
40818  path="${complete%% *}"
40819  tmp="$complete EOL"
40820  arguments="${tmp#* }"
40821
40822  # Input might be given as Windows format, start by converting to
40823  # unix format.
40824  new_path=`$CYGPATH -u "$path"`
40825
40826  # Now try to locate executable using which
40827  new_path=`$WHICH "$new_path" 2> /dev/null`
40828  # bat and cmd files are not always considered executable in cygwin causing which
40829  # to not find them
40830  if test "x$new_path" = x \
40831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40833    new_path=`$CYGPATH -u "$path"`
40834  fi
40835  if test "x$new_path" = x; then
40836    # Oops. Which didn't find the executable.
40837    # The splitting of arguments from the executable at a space might have been incorrect,
40838    # since paths with space are more likely in Windows. Give it another try with the whole
40839    # argument.
40840    path="$complete"
40841    arguments="EOL"
40842    new_path=`$CYGPATH -u "$path"`
40843    new_path=`$WHICH "$new_path" 2> /dev/null`
40844    # bat and cmd files are not always considered executable in cygwin causing which
40845    # to not find them
40846    if test "x$new_path" = x \
40847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40849      new_path=`$CYGPATH -u "$path"`
40850    fi
40851    if test "x$new_path" = x; then
40852      # It's still not found. Now this is an unrecoverable error.
40853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40854$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40855      has_space=`$ECHO "$complete" | $GREP " "`
40856      if test "x$has_space" != x; then
40857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40859      fi
40860      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40861    fi
40862  fi
40863
40864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40867  # "foo.exe" is OK but "foo" is an error.
40868  #
40869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40870  # It is also a way to make sure we got the proper file name for the real test later on.
40871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40872  if test "x$test_shortpath" = x; then
40873    # Short path failed, file does not exist as specified.
40874    # Try adding .exe or .cmd
40875    if test -f "${new_path}.exe"; then
40876      input_to_shortpath="${new_path}.exe"
40877    elif test -f "${new_path}.cmd"; then
40878      input_to_shortpath="${new_path}.cmd"
40879    else
40880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40881$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40884      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40885    fi
40886  else
40887    input_to_shortpath="$new_path"
40888  fi
40889
40890  # Call helper function which possibly converts this using DOS-style short mode.
40891  # If so, the updated path is stored in $new_path.
40892  new_path="$input_to_shortpath"
40893
40894  input_path="$input_to_shortpath"
40895  # Check if we need to convert this using DOS-style short mode. If the path
40896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40897  # take no chances and rewrite it.
40898  # Note: m4 eats our [], so we need to use [ and ] instead.
40899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40900  if test "x$has_forbidden_chars" != x; then
40901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40905      # Going to short mode and back again did indeed matter. Since short mode is
40906      # case insensitive, let's make it lowercase to improve readability.
40907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40908      # Now convert it back to Unix-style (cygpath)
40909      input_path=`$CYGPATH -u "$shortmode_path"`
40910      new_path="$input_path"
40911    fi
40912  fi
40913
40914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40915  if test "x$test_cygdrive_prefix" = x; then
40916    # As a simple fix, exclude /usr/bin since it's not a real path.
40917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40919      # a path prefixed by /cygdrive for fixpath to work.
40920      new_path="$CYGWIN_ROOT_PATH$input_path"
40921    fi
40922  fi
40923
40924  # remove trailing .exe if any
40925  new_path="${new_path/%.exe/}"
40926
40927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40928
40929  # First separate the path from the arguments. This will split at the first
40930  # space.
40931  complete="$GNM"
40932  path="${complete%% *}"
40933  tmp="$complete EOL"
40934  arguments="${tmp#* }"
40935
40936  # Input might be given as Windows format, start by converting to
40937  # unix format.
40938  new_path="$path"
40939
40940  windows_path="$new_path"
40941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40942    unix_path=`$CYGPATH -u "$windows_path"`
40943    new_path="$unix_path"
40944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40946    new_path="$unix_path"
40947  fi
40948
40949
40950  # Now try to locate executable using which
40951  new_path=`$WHICH "$new_path" 2> /dev/null`
40952
40953  if test "x$new_path" = x; then
40954    # Oops. Which didn't find the executable.
40955    # The splitting of arguments from the executable at a space might have been incorrect,
40956    # since paths with space are more likely in Windows. Give it another try with the whole
40957    # argument.
40958    path="$complete"
40959    arguments="EOL"
40960    new_path="$path"
40961
40962  windows_path="$new_path"
40963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40964    unix_path=`$CYGPATH -u "$windows_path"`
40965    new_path="$unix_path"
40966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40968    new_path="$unix_path"
40969  fi
40970
40971
40972    new_path=`$WHICH "$new_path" 2> /dev/null`
40973    # bat and cmd files are not always considered executable in MSYS causing which
40974    # to not find them
40975    if test "x$new_path" = x \
40976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40978      new_path="$path"
40979
40980  windows_path="$new_path"
40981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40982    unix_path=`$CYGPATH -u "$windows_path"`
40983    new_path="$unix_path"
40984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40986    new_path="$unix_path"
40987  fi
40988
40989    fi
40990
40991    if test "x$new_path" = x; then
40992      # It's still not found. Now this is an unrecoverable error.
40993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40994$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40995      has_space=`$ECHO "$complete" | $GREP " "`
40996      if test "x$has_space" != x; then
40997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40999      fi
41000      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41001    fi
41002  fi
41003
41004  # Now new_path has a complete unix path to the binary
41005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41006    # Keep paths in /bin as-is, but remove trailing .exe if any
41007    new_path="${new_path/%.exe/}"
41008    # Do not save /bin paths to all_fixpath_prefixes!
41009  else
41010    # Not in mixed or Windows style, start by that.
41011    new_path=`cmd //c echo $new_path`
41012
41013  input_path="$new_path"
41014  # Check if we need to convert this using DOS-style short mode. If the path
41015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41016  # take no chances and rewrite it.
41017  # Note: m4 eats our [], so we need to use [ and ] instead.
41018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41019  if test "x$has_forbidden_chars" != x; then
41020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41022  fi
41023
41024    # Output is in $new_path
41025
41026  windows_path="$new_path"
41027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41028    unix_path=`$CYGPATH -u "$windows_path"`
41029    new_path="$unix_path"
41030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41032    new_path="$unix_path"
41033  fi
41034
41035    # remove trailing .exe if any
41036    new_path="${new_path/%.exe/}"
41037
41038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41040  fi
41041
41042    else
41043      # We're on a unix platform. Hooray! :)
41044      # First separate the path from the arguments. This will split at the first
41045      # space.
41046      complete="$GNM"
41047      path="${complete%% *}"
41048      tmp="$complete EOL"
41049      arguments="${tmp#* }"
41050
41051      # Cannot rely on the command "which" here since it doesn't always work.
41052      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41053      if test -z "$is_absolute_path"; then
41054        # Path to executable is not absolute. Find it.
41055        IFS_save="$IFS"
41056        IFS=:
41057        for p in $PATH; do
41058          if test -f "$p/$path" && test -x "$p/$path"; then
41059            new_path="$p/$path"
41060            break
41061          fi
41062        done
41063        IFS="$IFS_save"
41064      else
41065        # This is an absolute path, we can use it without further modifications.
41066        new_path="$path"
41067      fi
41068
41069      if test "x$new_path" = x; then
41070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41071$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41072        has_space=`$ECHO "$complete" | $GREP " "`
41073        if test "x$has_space" != x; then
41074          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41076        fi
41077        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41078      fi
41079    fi
41080
41081    # Now join together the path and the arguments once again
41082    if test "x$arguments" != xEOL; then
41083      new_complete="$new_path ${arguments% *}"
41084    else
41085      new_complete="$new_path"
41086    fi
41087
41088    if test "x$complete" != "x$new_complete"; then
41089      GNM="$new_complete"
41090      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41091$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41092    fi
41093  fi
41094
41095  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41096    # FIXME: we should unify this with the solaris case above.
41097
41098
41099  # Publish this variable in the help.
41100
41101
41102  if [ -z "${STRIP+x}" ]; then
41103    # The variable is not set by user, try to locate tool using the code snippet
41104    if test -n "$ac_tool_prefix"; then
41105  for ac_prog in strip
41106  do
41107    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41110$as_echo_n "checking for $ac_word... " >&6; }
41111if ${ac_cv_prog_STRIP+:} false; then :
41112  $as_echo_n "(cached) " >&6
41113else
41114  if test -n "$STRIP"; then
41115  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41116else
41117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41118for as_dir in $PATH
41119do
41120  IFS=$as_save_IFS
41121  test -z "$as_dir" && as_dir=.
41122    for ac_exec_ext in '' $ac_executable_extensions; do
41123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41124    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41126    break 2
41127  fi
41128done
41129  done
41130IFS=$as_save_IFS
41131
41132fi
41133fi
41134STRIP=$ac_cv_prog_STRIP
41135if test -n "$STRIP"; then
41136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41137$as_echo "$STRIP" >&6; }
41138else
41139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41140$as_echo "no" >&6; }
41141fi
41142
41143
41144    test -n "$STRIP" && break
41145  done
41146fi
41147if test -z "$STRIP"; then
41148  ac_ct_STRIP=$STRIP
41149  for ac_prog in strip
41150do
41151  # Extract the first word of "$ac_prog", so it can be a program name with args.
41152set dummy $ac_prog; ac_word=$2
41153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41154$as_echo_n "checking for $ac_word... " >&6; }
41155if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41156  $as_echo_n "(cached) " >&6
41157else
41158  if test -n "$ac_ct_STRIP"; then
41159  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41160else
41161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162for as_dir in $PATH
41163do
41164  IFS=$as_save_IFS
41165  test -z "$as_dir" && as_dir=.
41166    for ac_exec_ext in '' $ac_executable_extensions; do
41167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170    break 2
41171  fi
41172done
41173  done
41174IFS=$as_save_IFS
41175
41176fi
41177fi
41178ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41179if test -n "$ac_ct_STRIP"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41181$as_echo "$ac_ct_STRIP" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188  test -n "$ac_ct_STRIP" && break
41189done
41190
41191  if test "x$ac_ct_STRIP" = x; then
41192    STRIP=""
41193  else
41194    case $cross_compiling:$ac_tool_warned in
41195yes:)
41196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41198ac_tool_warned=yes ;;
41199esac
41200    STRIP=$ac_ct_STRIP
41201  fi
41202fi
41203
41204  else
41205    # The variable is set, but is it from the command line or the environment?
41206
41207    # Try to remove the string !STRIP! from our list.
41208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41210      # If it failed, the variable was not from the command line. Ignore it,
41211      # but warn the user (except for BASH, which is always set by the calling BASH).
41212      if test "xSTRIP" != xBASH; then
41213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41214$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41215      fi
41216      # Try to locate tool using the code snippet
41217      if test -n "$ac_tool_prefix"; then
41218  for ac_prog in strip
41219  do
41220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41223$as_echo_n "checking for $ac_word... " >&6; }
41224if ${ac_cv_prog_STRIP+:} false; then :
41225  $as_echo_n "(cached) " >&6
41226else
41227  if test -n "$STRIP"; then
41228  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41229else
41230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41231for as_dir in $PATH
41232do
41233  IFS=$as_save_IFS
41234  test -z "$as_dir" && as_dir=.
41235    for ac_exec_ext in '' $ac_executable_extensions; do
41236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41237    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41239    break 2
41240  fi
41241done
41242  done
41243IFS=$as_save_IFS
41244
41245fi
41246fi
41247STRIP=$ac_cv_prog_STRIP
41248if test -n "$STRIP"; then
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41250$as_echo "$STRIP" >&6; }
41251else
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41253$as_echo "no" >&6; }
41254fi
41255
41256
41257    test -n "$STRIP" && break
41258  done
41259fi
41260if test -z "$STRIP"; then
41261  ac_ct_STRIP=$STRIP
41262  for ac_prog in strip
41263do
41264  # Extract the first word of "$ac_prog", so it can be a program name with args.
41265set dummy $ac_prog; ac_word=$2
41266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267$as_echo_n "checking for $ac_word... " >&6; }
41268if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41269  $as_echo_n "(cached) " >&6
41270else
41271  if test -n "$ac_ct_STRIP"; then
41272  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41273else
41274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275for as_dir in $PATH
41276do
41277  IFS=$as_save_IFS
41278  test -z "$as_dir" && as_dir=.
41279    for ac_exec_ext in '' $ac_executable_extensions; do
41280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283    break 2
41284  fi
41285done
41286  done
41287IFS=$as_save_IFS
41288
41289fi
41290fi
41291ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41292if test -n "$ac_ct_STRIP"; then
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41294$as_echo "$ac_ct_STRIP" >&6; }
41295else
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298fi
41299
41300
41301  test -n "$ac_ct_STRIP" && break
41302done
41303
41304  if test "x$ac_ct_STRIP" = x; then
41305    STRIP=""
41306  else
41307    case $cross_compiling:$ac_tool_warned in
41308yes:)
41309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41311ac_tool_warned=yes ;;
41312esac
41313    STRIP=$ac_ct_STRIP
41314  fi
41315fi
41316
41317    else
41318      # If it succeeded, then it was overridden by the user. We will use it
41319      # for the tool.
41320
41321      # First remove it from the list of overridden variables, so we can test
41322      # for unknown variables in the end.
41323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41324
41325      # Check if we try to supply an empty value
41326      if test "x$STRIP" = x; then
41327        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41328$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41330$as_echo_n "checking for STRIP... " >&6; }
41331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41332$as_echo "disabled" >&6; }
41333      else
41334        # Check if the provided tool contains a complete path.
41335        tool_specified="$STRIP"
41336        tool_basename="${tool_specified##*/}"
41337        if test "x$tool_basename" = "x$tool_specified"; then
41338          # A command without a complete path is provided, search $PATH.
41339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41340$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41341          # Extract the first word of "$tool_basename", so it can be a program name with args.
41342set dummy $tool_basename; ac_word=$2
41343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41344$as_echo_n "checking for $ac_word... " >&6; }
41345if ${ac_cv_path_STRIP+:} false; then :
41346  $as_echo_n "(cached) " >&6
41347else
41348  case $STRIP in
41349  [\\/]* | ?:[\\/]*)
41350  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41351  ;;
41352  *)
41353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41354for as_dir in $PATH
41355do
41356  IFS=$as_save_IFS
41357  test -z "$as_dir" && as_dir=.
41358    for ac_exec_ext in '' $ac_executable_extensions; do
41359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41360    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41362    break 2
41363  fi
41364done
41365  done
41366IFS=$as_save_IFS
41367
41368  ;;
41369esac
41370fi
41371STRIP=$ac_cv_path_STRIP
41372if test -n "$STRIP"; then
41373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41374$as_echo "$STRIP" >&6; }
41375else
41376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41377$as_echo "no" >&6; }
41378fi
41379
41380
41381          if test "x$STRIP" = x; then
41382            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41383          fi
41384        else
41385          # Otherwise we believe it is a complete path. Use it as it is.
41386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41387$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41388          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41389$as_echo_n "checking for STRIP... " >&6; }
41390          if test ! -x "$tool_specified"; then
41391            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41392$as_echo "not found" >&6; }
41393            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41394          fi
41395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41396$as_echo "$tool_specified" >&6; }
41397        fi
41398      fi
41399    fi
41400
41401  fi
41402
41403
41404
41405  # Only process if variable expands to non-empty
41406
41407  if test "x$STRIP" != x; then
41408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41409
41410  # First separate the path from the arguments. This will split at the first
41411  # space.
41412  complete="$STRIP"
41413  path="${complete%% *}"
41414  tmp="$complete EOL"
41415  arguments="${tmp#* }"
41416
41417  # Input might be given as Windows format, start by converting to
41418  # unix format.
41419  new_path=`$CYGPATH -u "$path"`
41420
41421  # Now try to locate executable using which
41422  new_path=`$WHICH "$new_path" 2> /dev/null`
41423  # bat and cmd files are not always considered executable in cygwin causing which
41424  # to not find them
41425  if test "x$new_path" = x \
41426      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41427      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41428    new_path=`$CYGPATH -u "$path"`
41429  fi
41430  if test "x$new_path" = x; then
41431    # Oops. Which didn't find the executable.
41432    # The splitting of arguments from the executable at a space might have been incorrect,
41433    # since paths with space are more likely in Windows. Give it another try with the whole
41434    # argument.
41435    path="$complete"
41436    arguments="EOL"
41437    new_path=`$CYGPATH -u "$path"`
41438    new_path=`$WHICH "$new_path" 2> /dev/null`
41439    # bat and cmd files are not always considered executable in cygwin causing which
41440    # to not find them
41441    if test "x$new_path" = x \
41442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41444      new_path=`$CYGPATH -u "$path"`
41445    fi
41446    if test "x$new_path" = x; then
41447      # It's still not found. Now this is an unrecoverable error.
41448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41449$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41450      has_space=`$ECHO "$complete" | $GREP " "`
41451      if test "x$has_space" != x; then
41452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41454      fi
41455      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41456    fi
41457  fi
41458
41459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41462  # "foo.exe" is OK but "foo" is an error.
41463  #
41464  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41465  # It is also a way to make sure we got the proper file name for the real test later on.
41466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41467  if test "x$test_shortpath" = x; then
41468    # Short path failed, file does not exist as specified.
41469    # Try adding .exe or .cmd
41470    if test -f "${new_path}.exe"; then
41471      input_to_shortpath="${new_path}.exe"
41472    elif test -f "${new_path}.cmd"; then
41473      input_to_shortpath="${new_path}.cmd"
41474    else
41475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41476$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41479      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41480    fi
41481  else
41482    input_to_shortpath="$new_path"
41483  fi
41484
41485  # Call helper function which possibly converts this using DOS-style short mode.
41486  # If so, the updated path is stored in $new_path.
41487  new_path="$input_to_shortpath"
41488
41489  input_path="$input_to_shortpath"
41490  # Check if we need to convert this using DOS-style short mode. If the path
41491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41492  # take no chances and rewrite it.
41493  # Note: m4 eats our [], so we need to use [ and ] instead.
41494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41495  if test "x$has_forbidden_chars" != x; then
41496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41500      # Going to short mode and back again did indeed matter. Since short mode is
41501      # case insensitive, let's make it lowercase to improve readability.
41502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41503      # Now convert it back to Unix-style (cygpath)
41504      input_path=`$CYGPATH -u "$shortmode_path"`
41505      new_path="$input_path"
41506    fi
41507  fi
41508
41509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41510  if test "x$test_cygdrive_prefix" = x; then
41511    # As a simple fix, exclude /usr/bin since it's not a real path.
41512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41514      # a path prefixed by /cygdrive for fixpath to work.
41515      new_path="$CYGWIN_ROOT_PATH$input_path"
41516    fi
41517  fi
41518
41519  # remove trailing .exe if any
41520  new_path="${new_path/%.exe/}"
41521
41522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41523
41524  # First separate the path from the arguments. This will split at the first
41525  # space.
41526  complete="$STRIP"
41527  path="${complete%% *}"
41528  tmp="$complete EOL"
41529  arguments="${tmp#* }"
41530
41531  # Input might be given as Windows format, start by converting to
41532  # unix format.
41533  new_path="$path"
41534
41535  windows_path="$new_path"
41536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41537    unix_path=`$CYGPATH -u "$windows_path"`
41538    new_path="$unix_path"
41539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41541    new_path="$unix_path"
41542  fi
41543
41544
41545  # Now try to locate executable using which
41546  new_path=`$WHICH "$new_path" 2> /dev/null`
41547
41548  if test "x$new_path" = x; then
41549    # Oops. Which didn't find the executable.
41550    # The splitting of arguments from the executable at a space might have been incorrect,
41551    # since paths with space are more likely in Windows. Give it another try with the whole
41552    # argument.
41553    path="$complete"
41554    arguments="EOL"
41555    new_path="$path"
41556
41557  windows_path="$new_path"
41558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41559    unix_path=`$CYGPATH -u "$windows_path"`
41560    new_path="$unix_path"
41561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41563    new_path="$unix_path"
41564  fi
41565
41566
41567    new_path=`$WHICH "$new_path" 2> /dev/null`
41568    # bat and cmd files are not always considered executable in MSYS causing which
41569    # to not find them
41570    if test "x$new_path" = x \
41571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41573      new_path="$path"
41574
41575  windows_path="$new_path"
41576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41577    unix_path=`$CYGPATH -u "$windows_path"`
41578    new_path="$unix_path"
41579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41581    new_path="$unix_path"
41582  fi
41583
41584    fi
41585
41586    if test "x$new_path" = x; then
41587      # It's still not found. Now this is an unrecoverable error.
41588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41589$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41590      has_space=`$ECHO "$complete" | $GREP " "`
41591      if test "x$has_space" != x; then
41592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41594      fi
41595      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41596    fi
41597  fi
41598
41599  # Now new_path has a complete unix path to the binary
41600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41601    # Keep paths in /bin as-is, but remove trailing .exe if any
41602    new_path="${new_path/%.exe/}"
41603    # Do not save /bin paths to all_fixpath_prefixes!
41604  else
41605    # Not in mixed or Windows style, start by that.
41606    new_path=`cmd //c echo $new_path`
41607
41608  input_path="$new_path"
41609  # Check if we need to convert this using DOS-style short mode. If the path
41610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41611  # take no chances and rewrite it.
41612  # Note: m4 eats our [], so we need to use [ and ] instead.
41613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41614  if test "x$has_forbidden_chars" != x; then
41615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41617  fi
41618
41619    # Output is in $new_path
41620
41621  windows_path="$new_path"
41622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41623    unix_path=`$CYGPATH -u "$windows_path"`
41624    new_path="$unix_path"
41625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41627    new_path="$unix_path"
41628  fi
41629
41630    # remove trailing .exe if any
41631    new_path="${new_path/%.exe/}"
41632
41633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41635  fi
41636
41637    else
41638      # We're on a unix platform. Hooray! :)
41639      # First separate the path from the arguments. This will split at the first
41640      # space.
41641      complete="$STRIP"
41642      path="${complete%% *}"
41643      tmp="$complete EOL"
41644      arguments="${tmp#* }"
41645
41646      # Cannot rely on the command "which" here since it doesn't always work.
41647      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41648      if test -z "$is_absolute_path"; then
41649        # Path to executable is not absolute. Find it.
41650        IFS_save="$IFS"
41651        IFS=:
41652        for p in $PATH; do
41653          if test -f "$p/$path" && test -x "$p/$path"; then
41654            new_path="$p/$path"
41655            break
41656          fi
41657        done
41658        IFS="$IFS_save"
41659      else
41660        # This is an absolute path, we can use it without further modifications.
41661        new_path="$path"
41662      fi
41663
41664      if test "x$new_path" = x; then
41665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41666$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41667        has_space=`$ECHO "$complete" | $GREP " "`
41668        if test "x$has_space" != x; then
41669          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41671        fi
41672        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41673      fi
41674    fi
41675
41676    # Now join together the path and the arguments once again
41677    if test "x$arguments" != xEOL; then
41678      new_complete="$new_path ${arguments% *}"
41679    else
41680      new_complete="$new_path"
41681    fi
41682
41683    if test "x$complete" != "x$new_complete"; then
41684      STRIP="$new_complete"
41685      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41686$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41687    fi
41688  fi
41689
41690    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41691
41692
41693  # Publish this variable in the help.
41694
41695
41696  if [ -z "${NM+x}" ]; then
41697    # The variable is not set by user, try to locate tool using the code snippet
41698    if test -n "$ac_tool_prefix"; then
41699  for ac_prog in nm gcc-nm
41700  do
41701    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41702set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41704$as_echo_n "checking for $ac_word... " >&6; }
41705if ${ac_cv_prog_NM+:} false; then :
41706  $as_echo_n "(cached) " >&6
41707else
41708  if test -n "$NM"; then
41709  ac_cv_prog_NM="$NM" # Let the user override the test.
41710else
41711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41712for as_dir in $PATH
41713do
41714  IFS=$as_save_IFS
41715  test -z "$as_dir" && as_dir=.
41716    for ac_exec_ext in '' $ac_executable_extensions; do
41717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41718    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41720    break 2
41721  fi
41722done
41723  done
41724IFS=$as_save_IFS
41725
41726fi
41727fi
41728NM=$ac_cv_prog_NM
41729if test -n "$NM"; then
41730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41731$as_echo "$NM" >&6; }
41732else
41733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41734$as_echo "no" >&6; }
41735fi
41736
41737
41738    test -n "$NM" && break
41739  done
41740fi
41741if test -z "$NM"; then
41742  ac_ct_NM=$NM
41743  for ac_prog in nm gcc-nm
41744do
41745  # Extract the first word of "$ac_prog", so it can be a program name with args.
41746set dummy $ac_prog; ac_word=$2
41747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41748$as_echo_n "checking for $ac_word... " >&6; }
41749if ${ac_cv_prog_ac_ct_NM+:} false; then :
41750  $as_echo_n "(cached) " >&6
41751else
41752  if test -n "$ac_ct_NM"; then
41753  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41754else
41755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41756for as_dir in $PATH
41757do
41758  IFS=$as_save_IFS
41759  test -z "$as_dir" && as_dir=.
41760    for ac_exec_ext in '' $ac_executable_extensions; do
41761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41762    ac_cv_prog_ac_ct_NM="$ac_prog"
41763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41764    break 2
41765  fi
41766done
41767  done
41768IFS=$as_save_IFS
41769
41770fi
41771fi
41772ac_ct_NM=$ac_cv_prog_ac_ct_NM
41773if test -n "$ac_ct_NM"; then
41774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41775$as_echo "$ac_ct_NM" >&6; }
41776else
41777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41778$as_echo "no" >&6; }
41779fi
41780
41781
41782  test -n "$ac_ct_NM" && break
41783done
41784
41785  if test "x$ac_ct_NM" = x; then
41786    NM=""
41787  else
41788    case $cross_compiling:$ac_tool_warned in
41789yes:)
41790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41792ac_tool_warned=yes ;;
41793esac
41794    NM=$ac_ct_NM
41795  fi
41796fi
41797
41798  else
41799    # The variable is set, but is it from the command line or the environment?
41800
41801    # Try to remove the string !NM! from our list.
41802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41804      # If it failed, the variable was not from the command line. Ignore it,
41805      # but warn the user (except for BASH, which is always set by the calling BASH).
41806      if test "xNM" != xBASH; then
41807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41808$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41809      fi
41810      # Try to locate tool using the code snippet
41811      if test -n "$ac_tool_prefix"; then
41812  for ac_prog in nm gcc-nm
41813  do
41814    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41815set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41817$as_echo_n "checking for $ac_word... " >&6; }
41818if ${ac_cv_prog_NM+:} false; then :
41819  $as_echo_n "(cached) " >&6
41820else
41821  if test -n "$NM"; then
41822  ac_cv_prog_NM="$NM" # Let the user override the test.
41823else
41824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41825for as_dir in $PATH
41826do
41827  IFS=$as_save_IFS
41828  test -z "$as_dir" && as_dir=.
41829    for ac_exec_ext in '' $ac_executable_extensions; do
41830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41831    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41833    break 2
41834  fi
41835done
41836  done
41837IFS=$as_save_IFS
41838
41839fi
41840fi
41841NM=$ac_cv_prog_NM
41842if test -n "$NM"; then
41843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41844$as_echo "$NM" >&6; }
41845else
41846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41847$as_echo "no" >&6; }
41848fi
41849
41850
41851    test -n "$NM" && break
41852  done
41853fi
41854if test -z "$NM"; then
41855  ac_ct_NM=$NM
41856  for ac_prog in nm gcc-nm
41857do
41858  # Extract the first word of "$ac_prog", so it can be a program name with args.
41859set dummy $ac_prog; ac_word=$2
41860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41861$as_echo_n "checking for $ac_word... " >&6; }
41862if ${ac_cv_prog_ac_ct_NM+:} false; then :
41863  $as_echo_n "(cached) " >&6
41864else
41865  if test -n "$ac_ct_NM"; then
41866  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41867else
41868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41869for as_dir in $PATH
41870do
41871  IFS=$as_save_IFS
41872  test -z "$as_dir" && as_dir=.
41873    for ac_exec_ext in '' $ac_executable_extensions; do
41874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41875    ac_cv_prog_ac_ct_NM="$ac_prog"
41876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41877    break 2
41878  fi
41879done
41880  done
41881IFS=$as_save_IFS
41882
41883fi
41884fi
41885ac_ct_NM=$ac_cv_prog_ac_ct_NM
41886if test -n "$ac_ct_NM"; then
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41888$as_echo "$ac_ct_NM" >&6; }
41889else
41890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41891$as_echo "no" >&6; }
41892fi
41893
41894
41895  test -n "$ac_ct_NM" && break
41896done
41897
41898  if test "x$ac_ct_NM" = x; then
41899    NM=""
41900  else
41901    case $cross_compiling:$ac_tool_warned in
41902yes:)
41903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41905ac_tool_warned=yes ;;
41906esac
41907    NM=$ac_ct_NM
41908  fi
41909fi
41910
41911    else
41912      # If it succeeded, then it was overridden by the user. We will use it
41913      # for the tool.
41914
41915      # First remove it from the list of overridden variables, so we can test
41916      # for unknown variables in the end.
41917      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41918
41919      # Check if we try to supply an empty value
41920      if test "x$NM" = x; then
41921        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41922$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41924$as_echo_n "checking for NM... " >&6; }
41925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41926$as_echo "disabled" >&6; }
41927      else
41928        # Check if the provided tool contains a complete path.
41929        tool_specified="$NM"
41930        tool_basename="${tool_specified##*/}"
41931        if test "x$tool_basename" = "x$tool_specified"; then
41932          # A command without a complete path is provided, search $PATH.
41933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41934$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41935          # Extract the first word of "$tool_basename", so it can be a program name with args.
41936set dummy $tool_basename; ac_word=$2
41937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41938$as_echo_n "checking for $ac_word... " >&6; }
41939if ${ac_cv_path_NM+:} false; then :
41940  $as_echo_n "(cached) " >&6
41941else
41942  case $NM in
41943  [\\/]* | ?:[\\/]*)
41944  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41945  ;;
41946  *)
41947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41948for as_dir in $PATH
41949do
41950  IFS=$as_save_IFS
41951  test -z "$as_dir" && as_dir=.
41952    for ac_exec_ext in '' $ac_executable_extensions; do
41953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41954    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41956    break 2
41957  fi
41958done
41959  done
41960IFS=$as_save_IFS
41961
41962  ;;
41963esac
41964fi
41965NM=$ac_cv_path_NM
41966if test -n "$NM"; then
41967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41968$as_echo "$NM" >&6; }
41969else
41970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41971$as_echo "no" >&6; }
41972fi
41973
41974
41975          if test "x$NM" = x; then
41976            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41977          fi
41978        else
41979          # Otherwise we believe it is a complete path. Use it as it is.
41980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41981$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41982          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41983$as_echo_n "checking for NM... " >&6; }
41984          if test ! -x "$tool_specified"; then
41985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41986$as_echo "not found" >&6; }
41987            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41988          fi
41989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41990$as_echo "$tool_specified" >&6; }
41991        fi
41992      fi
41993    fi
41994
41995  fi
41996
41997
41998    else
41999
42000
42001  # Publish this variable in the help.
42002
42003
42004  if [ -z "${NM+x}" ]; then
42005    # The variable is not set by user, try to locate tool using the code snippet
42006    if test -n "$ac_tool_prefix"; then
42007  for ac_prog in nm
42008  do
42009    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42010set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42012$as_echo_n "checking for $ac_word... " >&6; }
42013if ${ac_cv_prog_NM+:} false; then :
42014  $as_echo_n "(cached) " >&6
42015else
42016  if test -n "$NM"; then
42017  ac_cv_prog_NM="$NM" # Let the user override the test.
42018else
42019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42020for as_dir in $PATH
42021do
42022  IFS=$as_save_IFS
42023  test -z "$as_dir" && as_dir=.
42024    for ac_exec_ext in '' $ac_executable_extensions; do
42025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42026    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42028    break 2
42029  fi
42030done
42031  done
42032IFS=$as_save_IFS
42033
42034fi
42035fi
42036NM=$ac_cv_prog_NM
42037if test -n "$NM"; then
42038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42039$as_echo "$NM" >&6; }
42040else
42041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42042$as_echo "no" >&6; }
42043fi
42044
42045
42046    test -n "$NM" && break
42047  done
42048fi
42049if test -z "$NM"; then
42050  ac_ct_NM=$NM
42051  for ac_prog in nm
42052do
42053  # Extract the first word of "$ac_prog", so it can be a program name with args.
42054set dummy $ac_prog; ac_word=$2
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056$as_echo_n "checking for $ac_word... " >&6; }
42057if ${ac_cv_prog_ac_ct_NM+:} false; then :
42058  $as_echo_n "(cached) " >&6
42059else
42060  if test -n "$ac_ct_NM"; then
42061  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42062else
42063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42064for as_dir in $PATH
42065do
42066  IFS=$as_save_IFS
42067  test -z "$as_dir" && as_dir=.
42068    for ac_exec_ext in '' $ac_executable_extensions; do
42069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42070    ac_cv_prog_ac_ct_NM="$ac_prog"
42071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42072    break 2
42073  fi
42074done
42075  done
42076IFS=$as_save_IFS
42077
42078fi
42079fi
42080ac_ct_NM=$ac_cv_prog_ac_ct_NM
42081if test -n "$ac_ct_NM"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42083$as_echo "$ac_ct_NM" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090  test -n "$ac_ct_NM" && break
42091done
42092
42093  if test "x$ac_ct_NM" = x; then
42094    NM=""
42095  else
42096    case $cross_compiling:$ac_tool_warned in
42097yes:)
42098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42100ac_tool_warned=yes ;;
42101esac
42102    NM=$ac_ct_NM
42103  fi
42104fi
42105
42106  else
42107    # The variable is set, but is it from the command line or the environment?
42108
42109    # Try to remove the string !NM! from our list.
42110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42112      # If it failed, the variable was not from the command line. Ignore it,
42113      # but warn the user (except for BASH, which is always set by the calling BASH).
42114      if test "xNM" != xBASH; then
42115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42116$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42117      fi
42118      # Try to locate tool using the code snippet
42119      if test -n "$ac_tool_prefix"; then
42120  for ac_prog in nm
42121  do
42122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42125$as_echo_n "checking for $ac_word... " >&6; }
42126if ${ac_cv_prog_NM+:} false; then :
42127  $as_echo_n "(cached) " >&6
42128else
42129  if test -n "$NM"; then
42130  ac_cv_prog_NM="$NM" # Let the user override the test.
42131else
42132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42133for as_dir in $PATH
42134do
42135  IFS=$as_save_IFS
42136  test -z "$as_dir" && as_dir=.
42137    for ac_exec_ext in '' $ac_executable_extensions; do
42138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42139    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42141    break 2
42142  fi
42143done
42144  done
42145IFS=$as_save_IFS
42146
42147fi
42148fi
42149NM=$ac_cv_prog_NM
42150if test -n "$NM"; then
42151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42152$as_echo "$NM" >&6; }
42153else
42154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42155$as_echo "no" >&6; }
42156fi
42157
42158
42159    test -n "$NM" && break
42160  done
42161fi
42162if test -z "$NM"; then
42163  ac_ct_NM=$NM
42164  for ac_prog in nm
42165do
42166  # Extract the first word of "$ac_prog", so it can be a program name with args.
42167set dummy $ac_prog; ac_word=$2
42168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42169$as_echo_n "checking for $ac_word... " >&6; }
42170if ${ac_cv_prog_ac_ct_NM+:} false; then :
42171  $as_echo_n "(cached) " >&6
42172else
42173  if test -n "$ac_ct_NM"; then
42174  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42175else
42176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42177for as_dir in $PATH
42178do
42179  IFS=$as_save_IFS
42180  test -z "$as_dir" && as_dir=.
42181    for ac_exec_ext in '' $ac_executable_extensions; do
42182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42183    ac_cv_prog_ac_ct_NM="$ac_prog"
42184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42185    break 2
42186  fi
42187done
42188  done
42189IFS=$as_save_IFS
42190
42191fi
42192fi
42193ac_ct_NM=$ac_cv_prog_ac_ct_NM
42194if test -n "$ac_ct_NM"; then
42195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42196$as_echo "$ac_ct_NM" >&6; }
42197else
42198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42199$as_echo "no" >&6; }
42200fi
42201
42202
42203  test -n "$ac_ct_NM" && break
42204done
42205
42206  if test "x$ac_ct_NM" = x; then
42207    NM=""
42208  else
42209    case $cross_compiling:$ac_tool_warned in
42210yes:)
42211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42213ac_tool_warned=yes ;;
42214esac
42215    NM=$ac_ct_NM
42216  fi
42217fi
42218
42219    else
42220      # If it succeeded, then it was overridden by the user. We will use it
42221      # for the tool.
42222
42223      # First remove it from the list of overridden variables, so we can test
42224      # for unknown variables in the end.
42225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42226
42227      # Check if we try to supply an empty value
42228      if test "x$NM" = x; then
42229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42230$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42232$as_echo_n "checking for NM... " >&6; }
42233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42234$as_echo "disabled" >&6; }
42235      else
42236        # Check if the provided tool contains a complete path.
42237        tool_specified="$NM"
42238        tool_basename="${tool_specified##*/}"
42239        if test "x$tool_basename" = "x$tool_specified"; then
42240          # A command without a complete path is provided, search $PATH.
42241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42242$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42243          # Extract the first word of "$tool_basename", so it can be a program name with args.
42244set dummy $tool_basename; ac_word=$2
42245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42246$as_echo_n "checking for $ac_word... " >&6; }
42247if ${ac_cv_path_NM+:} false; then :
42248  $as_echo_n "(cached) " >&6
42249else
42250  case $NM in
42251  [\\/]* | ?:[\\/]*)
42252  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42253  ;;
42254  *)
42255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42256for as_dir in $PATH
42257do
42258  IFS=$as_save_IFS
42259  test -z "$as_dir" && as_dir=.
42260    for ac_exec_ext in '' $ac_executable_extensions; do
42261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42262    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42264    break 2
42265  fi
42266done
42267  done
42268IFS=$as_save_IFS
42269
42270  ;;
42271esac
42272fi
42273NM=$ac_cv_path_NM
42274if test -n "$NM"; then
42275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42276$as_echo "$NM" >&6; }
42277else
42278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42279$as_echo "no" >&6; }
42280fi
42281
42282
42283          if test "x$NM" = x; then
42284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42285          fi
42286        else
42287          # Otherwise we believe it is a complete path. Use it as it is.
42288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42289$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42291$as_echo_n "checking for NM... " >&6; }
42292          if test ! -x "$tool_specified"; then
42293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42294$as_echo "not found" >&6; }
42295            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42296          fi
42297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42298$as_echo "$tool_specified" >&6; }
42299        fi
42300      fi
42301    fi
42302
42303  fi
42304
42305
42306    fi
42307
42308  # Only process if variable expands to non-empty
42309
42310  if test "x$NM" != x; then
42311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42312
42313  # First separate the path from the arguments. This will split at the first
42314  # space.
42315  complete="$NM"
42316  path="${complete%% *}"
42317  tmp="$complete EOL"
42318  arguments="${tmp#* }"
42319
42320  # Input might be given as Windows format, start by converting to
42321  # unix format.
42322  new_path=`$CYGPATH -u "$path"`
42323
42324  # Now try to locate executable using which
42325  new_path=`$WHICH "$new_path" 2> /dev/null`
42326  # bat and cmd files are not always considered executable in cygwin causing which
42327  # to not find them
42328  if test "x$new_path" = x \
42329      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42330      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42331    new_path=`$CYGPATH -u "$path"`
42332  fi
42333  if test "x$new_path" = x; then
42334    # Oops. Which didn't find the executable.
42335    # The splitting of arguments from the executable at a space might have been incorrect,
42336    # since paths with space are more likely in Windows. Give it another try with the whole
42337    # argument.
42338    path="$complete"
42339    arguments="EOL"
42340    new_path=`$CYGPATH -u "$path"`
42341    new_path=`$WHICH "$new_path" 2> /dev/null`
42342    # bat and cmd files are not always considered executable in cygwin causing which
42343    # to not find them
42344    if test "x$new_path" = x \
42345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42347      new_path=`$CYGPATH -u "$path"`
42348    fi
42349    if test "x$new_path" = x; then
42350      # It's still not found. Now this is an unrecoverable error.
42351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42352$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42353      has_space=`$ECHO "$complete" | $GREP " "`
42354      if test "x$has_space" != x; then
42355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42357      fi
42358      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42359    fi
42360  fi
42361
42362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42365  # "foo.exe" is OK but "foo" is an error.
42366  #
42367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42368  # It is also a way to make sure we got the proper file name for the real test later on.
42369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42370  if test "x$test_shortpath" = x; then
42371    # Short path failed, file does not exist as specified.
42372    # Try adding .exe or .cmd
42373    if test -f "${new_path}.exe"; then
42374      input_to_shortpath="${new_path}.exe"
42375    elif test -f "${new_path}.cmd"; then
42376      input_to_shortpath="${new_path}.cmd"
42377    else
42378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42379$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42382      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42383    fi
42384  else
42385    input_to_shortpath="$new_path"
42386  fi
42387
42388  # Call helper function which possibly converts this using DOS-style short mode.
42389  # If so, the updated path is stored in $new_path.
42390  new_path="$input_to_shortpath"
42391
42392  input_path="$input_to_shortpath"
42393  # Check if we need to convert this using DOS-style short mode. If the path
42394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42395  # take no chances and rewrite it.
42396  # Note: m4 eats our [], so we need to use [ and ] instead.
42397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42398  if test "x$has_forbidden_chars" != x; then
42399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42403      # Going to short mode and back again did indeed matter. Since short mode is
42404      # case insensitive, let's make it lowercase to improve readability.
42405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42406      # Now convert it back to Unix-style (cygpath)
42407      input_path=`$CYGPATH -u "$shortmode_path"`
42408      new_path="$input_path"
42409    fi
42410  fi
42411
42412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42413  if test "x$test_cygdrive_prefix" = x; then
42414    # As a simple fix, exclude /usr/bin since it's not a real path.
42415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42417      # a path prefixed by /cygdrive for fixpath to work.
42418      new_path="$CYGWIN_ROOT_PATH$input_path"
42419    fi
42420  fi
42421
42422  # remove trailing .exe if any
42423  new_path="${new_path/%.exe/}"
42424
42425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42426
42427  # First separate the path from the arguments. This will split at the first
42428  # space.
42429  complete="$NM"
42430  path="${complete%% *}"
42431  tmp="$complete EOL"
42432  arguments="${tmp#* }"
42433
42434  # Input might be given as Windows format, start by converting to
42435  # unix format.
42436  new_path="$path"
42437
42438  windows_path="$new_path"
42439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42440    unix_path=`$CYGPATH -u "$windows_path"`
42441    new_path="$unix_path"
42442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42444    new_path="$unix_path"
42445  fi
42446
42447
42448  # Now try to locate executable using which
42449  new_path=`$WHICH "$new_path" 2> /dev/null`
42450
42451  if test "x$new_path" = x; then
42452    # Oops. Which didn't find the executable.
42453    # The splitting of arguments from the executable at a space might have been incorrect,
42454    # since paths with space are more likely in Windows. Give it another try with the whole
42455    # argument.
42456    path="$complete"
42457    arguments="EOL"
42458    new_path="$path"
42459
42460  windows_path="$new_path"
42461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42462    unix_path=`$CYGPATH -u "$windows_path"`
42463    new_path="$unix_path"
42464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42466    new_path="$unix_path"
42467  fi
42468
42469
42470    new_path=`$WHICH "$new_path" 2> /dev/null`
42471    # bat and cmd files are not always considered executable in MSYS causing which
42472    # to not find them
42473    if test "x$new_path" = x \
42474        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42475        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42476      new_path="$path"
42477
42478  windows_path="$new_path"
42479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42480    unix_path=`$CYGPATH -u "$windows_path"`
42481    new_path="$unix_path"
42482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42484    new_path="$unix_path"
42485  fi
42486
42487    fi
42488
42489    if test "x$new_path" = x; then
42490      # It's still not found. Now this is an unrecoverable error.
42491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42492$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42493      has_space=`$ECHO "$complete" | $GREP " "`
42494      if test "x$has_space" != x; then
42495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42497      fi
42498      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42499    fi
42500  fi
42501
42502  # Now new_path has a complete unix path to the binary
42503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42504    # Keep paths in /bin as-is, but remove trailing .exe if any
42505    new_path="${new_path/%.exe/}"
42506    # Do not save /bin paths to all_fixpath_prefixes!
42507  else
42508    # Not in mixed or Windows style, start by that.
42509    new_path=`cmd //c echo $new_path`
42510
42511  input_path="$new_path"
42512  # Check if we need to convert this using DOS-style short mode. If the path
42513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42514  # take no chances and rewrite it.
42515  # Note: m4 eats our [], so we need to use [ and ] instead.
42516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42517  if test "x$has_forbidden_chars" != x; then
42518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42520  fi
42521
42522    # Output is in $new_path
42523
42524  windows_path="$new_path"
42525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42526    unix_path=`$CYGPATH -u "$windows_path"`
42527    new_path="$unix_path"
42528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42530    new_path="$unix_path"
42531  fi
42532
42533    # remove trailing .exe if any
42534    new_path="${new_path/%.exe/}"
42535
42536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42538  fi
42539
42540    else
42541      # We're on a unix platform. Hooray! :)
42542      # First separate the path from the arguments. This will split at the first
42543      # space.
42544      complete="$NM"
42545      path="${complete%% *}"
42546      tmp="$complete EOL"
42547      arguments="${tmp#* }"
42548
42549      # Cannot rely on the command "which" here since it doesn't always work.
42550      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42551      if test -z "$is_absolute_path"; then
42552        # Path to executable is not absolute. Find it.
42553        IFS_save="$IFS"
42554        IFS=:
42555        for p in $PATH; do
42556          if test -f "$p/$path" && test -x "$p/$path"; then
42557            new_path="$p/$path"
42558            break
42559          fi
42560        done
42561        IFS="$IFS_save"
42562      else
42563        # This is an absolute path, we can use it without further modifications.
42564        new_path="$path"
42565      fi
42566
42567      if test "x$new_path" = x; then
42568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42569$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42570        has_space=`$ECHO "$complete" | $GREP " "`
42571        if test "x$has_space" != x; then
42572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42574        fi
42575        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42576      fi
42577    fi
42578
42579    # Now join together the path and the arguments once again
42580    if test "x$arguments" != xEOL; then
42581      new_complete="$new_path ${arguments% *}"
42582    else
42583      new_complete="$new_path"
42584    fi
42585
42586    if test "x$complete" != "x$new_complete"; then
42587      NM="$new_complete"
42588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42589$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42590    fi
42591  fi
42592
42593    GNM="$NM"
42594
42595  fi
42596
42597  # objcopy is used for moving debug symbols to separate files when
42598  # full debug symbols are enabled.
42599  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42600
42601
42602  # Publish this variable in the help.
42603
42604
42605  if [ -z "${OBJCOPY+x}" ]; then
42606    # The variable is not set by user, try to locate tool using the code snippet
42607    if test -n "$ac_tool_prefix"; then
42608  for ac_prog in gobjcopy objcopy
42609  do
42610    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42611set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42613$as_echo_n "checking for $ac_word... " >&6; }
42614if ${ac_cv_prog_OBJCOPY+:} false; then :
42615  $as_echo_n "(cached) " >&6
42616else
42617  if test -n "$OBJCOPY"; then
42618  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42619else
42620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42621for as_dir in $PATH
42622do
42623  IFS=$as_save_IFS
42624  test -z "$as_dir" && as_dir=.
42625    for ac_exec_ext in '' $ac_executable_extensions; do
42626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42627    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42629    break 2
42630  fi
42631done
42632  done
42633IFS=$as_save_IFS
42634
42635fi
42636fi
42637OBJCOPY=$ac_cv_prog_OBJCOPY
42638if test -n "$OBJCOPY"; then
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42640$as_echo "$OBJCOPY" >&6; }
42641else
42642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42643$as_echo "no" >&6; }
42644fi
42645
42646
42647    test -n "$OBJCOPY" && break
42648  done
42649fi
42650if test -z "$OBJCOPY"; then
42651  ac_ct_OBJCOPY=$OBJCOPY
42652  for ac_prog in gobjcopy objcopy
42653do
42654  # Extract the first word of "$ac_prog", so it can be a program name with args.
42655set dummy $ac_prog; ac_word=$2
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657$as_echo_n "checking for $ac_word... " >&6; }
42658if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42659  $as_echo_n "(cached) " >&6
42660else
42661  if test -n "$ac_ct_OBJCOPY"; then
42662  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42663else
42664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665for as_dir in $PATH
42666do
42667  IFS=$as_save_IFS
42668  test -z "$as_dir" && as_dir=.
42669    for ac_exec_ext in '' $ac_executable_extensions; do
42670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673    break 2
42674  fi
42675done
42676  done
42677IFS=$as_save_IFS
42678
42679fi
42680fi
42681ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42682if test -n "$ac_ct_OBJCOPY"; then
42683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42684$as_echo "$ac_ct_OBJCOPY" >&6; }
42685else
42686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42687$as_echo "no" >&6; }
42688fi
42689
42690
42691  test -n "$ac_ct_OBJCOPY" && break
42692done
42693
42694  if test "x$ac_ct_OBJCOPY" = x; then
42695    OBJCOPY=""
42696  else
42697    case $cross_compiling:$ac_tool_warned in
42698yes:)
42699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42701ac_tool_warned=yes ;;
42702esac
42703    OBJCOPY=$ac_ct_OBJCOPY
42704  fi
42705fi
42706
42707  else
42708    # The variable is set, but is it from the command line or the environment?
42709
42710    # Try to remove the string !OBJCOPY! from our list.
42711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42713      # If it failed, the variable was not from the command line. Ignore it,
42714      # but warn the user (except for BASH, which is always set by the calling BASH).
42715      if test "xOBJCOPY" != xBASH; then
42716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42717$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42718      fi
42719      # Try to locate tool using the code snippet
42720      if test -n "$ac_tool_prefix"; then
42721  for ac_prog in gobjcopy objcopy
42722  do
42723    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42724set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42726$as_echo_n "checking for $ac_word... " >&6; }
42727if ${ac_cv_prog_OBJCOPY+:} false; then :
42728  $as_echo_n "(cached) " >&6
42729else
42730  if test -n "$OBJCOPY"; then
42731  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42732else
42733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42734for as_dir in $PATH
42735do
42736  IFS=$as_save_IFS
42737  test -z "$as_dir" && as_dir=.
42738    for ac_exec_ext in '' $ac_executable_extensions; do
42739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42740    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42742    break 2
42743  fi
42744done
42745  done
42746IFS=$as_save_IFS
42747
42748fi
42749fi
42750OBJCOPY=$ac_cv_prog_OBJCOPY
42751if test -n "$OBJCOPY"; then
42752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42753$as_echo "$OBJCOPY" >&6; }
42754else
42755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42756$as_echo "no" >&6; }
42757fi
42758
42759
42760    test -n "$OBJCOPY" && break
42761  done
42762fi
42763if test -z "$OBJCOPY"; then
42764  ac_ct_OBJCOPY=$OBJCOPY
42765  for ac_prog in gobjcopy objcopy
42766do
42767  # Extract the first word of "$ac_prog", so it can be a program name with args.
42768set dummy $ac_prog; ac_word=$2
42769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42770$as_echo_n "checking for $ac_word... " >&6; }
42771if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42772  $as_echo_n "(cached) " >&6
42773else
42774  if test -n "$ac_ct_OBJCOPY"; then
42775  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42776else
42777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42778for as_dir in $PATH
42779do
42780  IFS=$as_save_IFS
42781  test -z "$as_dir" && as_dir=.
42782    for ac_exec_ext in '' $ac_executable_extensions; do
42783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42784    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42786    break 2
42787  fi
42788done
42789  done
42790IFS=$as_save_IFS
42791
42792fi
42793fi
42794ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42795if test -n "$ac_ct_OBJCOPY"; then
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42797$as_echo "$ac_ct_OBJCOPY" >&6; }
42798else
42799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42800$as_echo "no" >&6; }
42801fi
42802
42803
42804  test -n "$ac_ct_OBJCOPY" && break
42805done
42806
42807  if test "x$ac_ct_OBJCOPY" = x; then
42808    OBJCOPY=""
42809  else
42810    case $cross_compiling:$ac_tool_warned in
42811yes:)
42812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42814ac_tool_warned=yes ;;
42815esac
42816    OBJCOPY=$ac_ct_OBJCOPY
42817  fi
42818fi
42819
42820    else
42821      # If it succeeded, then it was overridden by the user. We will use it
42822      # for the tool.
42823
42824      # First remove it from the list of overridden variables, so we can test
42825      # for unknown variables in the end.
42826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42827
42828      # Check if we try to supply an empty value
42829      if test "x$OBJCOPY" = x; then
42830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42831$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42833$as_echo_n "checking for OBJCOPY... " >&6; }
42834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42835$as_echo "disabled" >&6; }
42836      else
42837        # Check if the provided tool contains a complete path.
42838        tool_specified="$OBJCOPY"
42839        tool_basename="${tool_specified##*/}"
42840        if test "x$tool_basename" = "x$tool_specified"; then
42841          # A command without a complete path is provided, search $PATH.
42842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42843$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42844          # Extract the first word of "$tool_basename", so it can be a program name with args.
42845set dummy $tool_basename; ac_word=$2
42846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42847$as_echo_n "checking for $ac_word... " >&6; }
42848if ${ac_cv_path_OBJCOPY+:} false; then :
42849  $as_echo_n "(cached) " >&6
42850else
42851  case $OBJCOPY in
42852  [\\/]* | ?:[\\/]*)
42853  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42854  ;;
42855  *)
42856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42857for as_dir in $PATH
42858do
42859  IFS=$as_save_IFS
42860  test -z "$as_dir" && as_dir=.
42861    for ac_exec_ext in '' $ac_executable_extensions; do
42862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42863    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42865    break 2
42866  fi
42867done
42868  done
42869IFS=$as_save_IFS
42870
42871  ;;
42872esac
42873fi
42874OBJCOPY=$ac_cv_path_OBJCOPY
42875if test -n "$OBJCOPY"; then
42876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42877$as_echo "$OBJCOPY" >&6; }
42878else
42879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42880$as_echo "no" >&6; }
42881fi
42882
42883
42884          if test "x$OBJCOPY" = x; then
42885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42886          fi
42887        else
42888          # Otherwise we believe it is a complete path. Use it as it is.
42889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42890$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42892$as_echo_n "checking for OBJCOPY... " >&6; }
42893          if test ! -x "$tool_specified"; then
42894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42895$as_echo "not found" >&6; }
42896            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42897          fi
42898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42899$as_echo "$tool_specified" >&6; }
42900        fi
42901      fi
42902    fi
42903
42904  fi
42905
42906
42907    # Only call fixup if objcopy was found.
42908    if test -n "$OBJCOPY"; then
42909
42910  # Only process if variable expands to non-empty
42911
42912  if test "x$OBJCOPY" != x; then
42913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42914
42915  # First separate the path from the arguments. This will split at the first
42916  # space.
42917  complete="$OBJCOPY"
42918  path="${complete%% *}"
42919  tmp="$complete EOL"
42920  arguments="${tmp#* }"
42921
42922  # Input might be given as Windows format, start by converting to
42923  # unix format.
42924  new_path=`$CYGPATH -u "$path"`
42925
42926  # Now try to locate executable using which
42927  new_path=`$WHICH "$new_path" 2> /dev/null`
42928  # bat and cmd files are not always considered executable in cygwin causing which
42929  # to not find them
42930  if test "x$new_path" = x \
42931      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42932      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42933    new_path=`$CYGPATH -u "$path"`
42934  fi
42935  if test "x$new_path" = x; then
42936    # Oops. Which didn't find the executable.
42937    # The splitting of arguments from the executable at a space might have been incorrect,
42938    # since paths with space are more likely in Windows. Give it another try with the whole
42939    # argument.
42940    path="$complete"
42941    arguments="EOL"
42942    new_path=`$CYGPATH -u "$path"`
42943    new_path=`$WHICH "$new_path" 2> /dev/null`
42944    # bat and cmd files are not always considered executable in cygwin causing which
42945    # to not find them
42946    if test "x$new_path" = x \
42947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42949      new_path=`$CYGPATH -u "$path"`
42950    fi
42951    if test "x$new_path" = x; then
42952      # It's still not found. Now this is an unrecoverable error.
42953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42954$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42955      has_space=`$ECHO "$complete" | $GREP " "`
42956      if test "x$has_space" != x; then
42957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42959      fi
42960      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42961    fi
42962  fi
42963
42964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42967  # "foo.exe" is OK but "foo" is an error.
42968  #
42969  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42970  # It is also a way to make sure we got the proper file name for the real test later on.
42971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42972  if test "x$test_shortpath" = x; then
42973    # Short path failed, file does not exist as specified.
42974    # Try adding .exe or .cmd
42975    if test -f "${new_path}.exe"; then
42976      input_to_shortpath="${new_path}.exe"
42977    elif test -f "${new_path}.cmd"; then
42978      input_to_shortpath="${new_path}.cmd"
42979    else
42980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42981$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42984      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42985    fi
42986  else
42987    input_to_shortpath="$new_path"
42988  fi
42989
42990  # Call helper function which possibly converts this using DOS-style short mode.
42991  # If so, the updated path is stored in $new_path.
42992  new_path="$input_to_shortpath"
42993
42994  input_path="$input_to_shortpath"
42995  # Check if we need to convert this using DOS-style short mode. If the path
42996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42997  # take no chances and rewrite it.
42998  # Note: m4 eats our [], so we need to use [ and ] instead.
42999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43000  if test "x$has_forbidden_chars" != x; then
43001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43005      # Going to short mode and back again did indeed matter. Since short mode is
43006      # case insensitive, let's make it lowercase to improve readability.
43007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43008      # Now convert it back to Unix-style (cygpath)
43009      input_path=`$CYGPATH -u "$shortmode_path"`
43010      new_path="$input_path"
43011    fi
43012  fi
43013
43014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43015  if test "x$test_cygdrive_prefix" = x; then
43016    # As a simple fix, exclude /usr/bin since it's not a real path.
43017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43019      # a path prefixed by /cygdrive for fixpath to work.
43020      new_path="$CYGWIN_ROOT_PATH$input_path"
43021    fi
43022  fi
43023
43024  # remove trailing .exe if any
43025  new_path="${new_path/%.exe/}"
43026
43027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43028
43029  # First separate the path from the arguments. This will split at the first
43030  # space.
43031  complete="$OBJCOPY"
43032  path="${complete%% *}"
43033  tmp="$complete EOL"
43034  arguments="${tmp#* }"
43035
43036  # Input might be given as Windows format, start by converting to
43037  # unix format.
43038  new_path="$path"
43039
43040  windows_path="$new_path"
43041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43042    unix_path=`$CYGPATH -u "$windows_path"`
43043    new_path="$unix_path"
43044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43046    new_path="$unix_path"
43047  fi
43048
43049
43050  # Now try to locate executable using which
43051  new_path=`$WHICH "$new_path" 2> /dev/null`
43052
43053  if test "x$new_path" = x; then
43054    # Oops. Which didn't find the executable.
43055    # The splitting of arguments from the executable at a space might have been incorrect,
43056    # since paths with space are more likely in Windows. Give it another try with the whole
43057    # argument.
43058    path="$complete"
43059    arguments="EOL"
43060    new_path="$path"
43061
43062  windows_path="$new_path"
43063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43064    unix_path=`$CYGPATH -u "$windows_path"`
43065    new_path="$unix_path"
43066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43068    new_path="$unix_path"
43069  fi
43070
43071
43072    new_path=`$WHICH "$new_path" 2> /dev/null`
43073    # bat and cmd files are not always considered executable in MSYS causing which
43074    # to not find them
43075    if test "x$new_path" = x \
43076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43078      new_path="$path"
43079
43080  windows_path="$new_path"
43081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43082    unix_path=`$CYGPATH -u "$windows_path"`
43083    new_path="$unix_path"
43084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43086    new_path="$unix_path"
43087  fi
43088
43089    fi
43090
43091    if test "x$new_path" = x; then
43092      # It's still not found. Now this is an unrecoverable error.
43093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43094$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43095      has_space=`$ECHO "$complete" | $GREP " "`
43096      if test "x$has_space" != x; then
43097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43099      fi
43100      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43101    fi
43102  fi
43103
43104  # Now new_path has a complete unix path to the binary
43105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43106    # Keep paths in /bin as-is, but remove trailing .exe if any
43107    new_path="${new_path/%.exe/}"
43108    # Do not save /bin paths to all_fixpath_prefixes!
43109  else
43110    # Not in mixed or Windows style, start by that.
43111    new_path=`cmd //c echo $new_path`
43112
43113  input_path="$new_path"
43114  # Check if we need to convert this using DOS-style short mode. If the path
43115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43116  # take no chances and rewrite it.
43117  # Note: m4 eats our [], so we need to use [ and ] instead.
43118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43119  if test "x$has_forbidden_chars" != x; then
43120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43122  fi
43123
43124    # Output is in $new_path
43125
43126  windows_path="$new_path"
43127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43128    unix_path=`$CYGPATH -u "$windows_path"`
43129    new_path="$unix_path"
43130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43132    new_path="$unix_path"
43133  fi
43134
43135    # remove trailing .exe if any
43136    new_path="${new_path/%.exe/}"
43137
43138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43140  fi
43141
43142    else
43143      # We're on a unix platform. Hooray! :)
43144      # First separate the path from the arguments. This will split at the first
43145      # space.
43146      complete="$OBJCOPY"
43147      path="${complete%% *}"
43148      tmp="$complete EOL"
43149      arguments="${tmp#* }"
43150
43151      # Cannot rely on the command "which" here since it doesn't always work.
43152      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43153      if test -z "$is_absolute_path"; then
43154        # Path to executable is not absolute. Find it.
43155        IFS_save="$IFS"
43156        IFS=:
43157        for p in $PATH; do
43158          if test -f "$p/$path" && test -x "$p/$path"; then
43159            new_path="$p/$path"
43160            break
43161          fi
43162        done
43163        IFS="$IFS_save"
43164      else
43165        # This is an absolute path, we can use it without further modifications.
43166        new_path="$path"
43167      fi
43168
43169      if test "x$new_path" = x; then
43170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43171$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43172        has_space=`$ECHO "$complete" | $GREP " "`
43173        if test "x$has_space" != x; then
43174          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43176        fi
43177        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43178      fi
43179    fi
43180
43181    # Now join together the path and the arguments once again
43182    if test "x$arguments" != xEOL; then
43183      new_complete="$new_path ${arguments% *}"
43184    else
43185      new_complete="$new_path"
43186    fi
43187
43188    if test "x$complete" != "x$new_complete"; then
43189      OBJCOPY="$new_complete"
43190      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43191$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43192    fi
43193  fi
43194
43195      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43196        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43197        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43198        # - version number is last blank separate word on first line
43199        # - version number formats that have been seen:
43200        #   - <major>.<minor>
43201        #   - <major>.<minor>.<micro>
43202        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43203        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43204         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43205              -e 's/.* //' \
43206              -e '/^[01]\./b bad' \
43207              -e '/^2\./{' \
43208              -e '  s/^2\.//' \
43209              -e '  /^[0-9]$/b bad' \
43210              -e '  /^[0-9]\./b bad' \
43211              -e '  /^1[0-9]$/b bad' \
43212              -e '  /^1[0-9]\./b bad' \
43213              -e '  /^20\./b bad' \
43214              -e '  /^21\.0$/b bad' \
43215              -e '  /^21\.0\./b bad' \
43216              -e '}' \
43217              -e ':good' \
43218              -e 's/.*/VALID_VERSION/p' \
43219              -e 'q' \
43220              -e ':bad' \
43221              -e 's/.*/BAD_VERSION/p' \
43222              -e 'q'`
43223        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43224          OBJCOPY=
43225          { $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
43226$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43227          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43228$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43229          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43230$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43231          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43232$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43233          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43234$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43235        fi
43236      fi
43237    fi
43238  fi
43239
43240
43241
43242  # Publish this variable in the help.
43243
43244
43245  if [ -z "${OBJDUMP+x}" ]; then
43246    # The variable is not set by user, try to locate tool using the code snippet
43247    if test -n "$ac_tool_prefix"; then
43248  for ac_prog in gobjdump objdump
43249  do
43250    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43251set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43253$as_echo_n "checking for $ac_word... " >&6; }
43254if ${ac_cv_prog_OBJDUMP+:} false; then :
43255  $as_echo_n "(cached) " >&6
43256else
43257  if test -n "$OBJDUMP"; then
43258  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43259else
43260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43261for as_dir in $PATH
43262do
43263  IFS=$as_save_IFS
43264  test -z "$as_dir" && as_dir=.
43265    for ac_exec_ext in '' $ac_executable_extensions; do
43266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43267    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43269    break 2
43270  fi
43271done
43272  done
43273IFS=$as_save_IFS
43274
43275fi
43276fi
43277OBJDUMP=$ac_cv_prog_OBJDUMP
43278if test -n "$OBJDUMP"; then
43279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43280$as_echo "$OBJDUMP" >&6; }
43281else
43282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43283$as_echo "no" >&6; }
43284fi
43285
43286
43287    test -n "$OBJDUMP" && break
43288  done
43289fi
43290if test -z "$OBJDUMP"; then
43291  ac_ct_OBJDUMP=$OBJDUMP
43292  for ac_prog in gobjdump objdump
43293do
43294  # Extract the first word of "$ac_prog", so it can be a program name with args.
43295set dummy $ac_prog; ac_word=$2
43296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43297$as_echo_n "checking for $ac_word... " >&6; }
43298if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43299  $as_echo_n "(cached) " >&6
43300else
43301  if test -n "$ac_ct_OBJDUMP"; then
43302  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43303else
43304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43305for as_dir in $PATH
43306do
43307  IFS=$as_save_IFS
43308  test -z "$as_dir" && as_dir=.
43309    for ac_exec_ext in '' $ac_executable_extensions; do
43310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43311    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43313    break 2
43314  fi
43315done
43316  done
43317IFS=$as_save_IFS
43318
43319fi
43320fi
43321ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43322if test -n "$ac_ct_OBJDUMP"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43324$as_echo "$ac_ct_OBJDUMP" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331  test -n "$ac_ct_OBJDUMP" && break
43332done
43333
43334  if test "x$ac_ct_OBJDUMP" = x; then
43335    OBJDUMP=""
43336  else
43337    case $cross_compiling:$ac_tool_warned in
43338yes:)
43339{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43340$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43341ac_tool_warned=yes ;;
43342esac
43343    OBJDUMP=$ac_ct_OBJDUMP
43344  fi
43345fi
43346
43347  else
43348    # The variable is set, but is it from the command line or the environment?
43349
43350    # Try to remove the string !OBJDUMP! from our list.
43351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43353      # If it failed, the variable was not from the command line. Ignore it,
43354      # but warn the user (except for BASH, which is always set by the calling BASH).
43355      if test "xOBJDUMP" != xBASH; then
43356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43357$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43358      fi
43359      # Try to locate tool using the code snippet
43360      if test -n "$ac_tool_prefix"; then
43361  for ac_prog in gobjdump objdump
43362  do
43363    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43364set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43366$as_echo_n "checking for $ac_word... " >&6; }
43367if ${ac_cv_prog_OBJDUMP+:} false; then :
43368  $as_echo_n "(cached) " >&6
43369else
43370  if test -n "$OBJDUMP"; then
43371  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43372else
43373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43374for as_dir in $PATH
43375do
43376  IFS=$as_save_IFS
43377  test -z "$as_dir" && as_dir=.
43378    for ac_exec_ext in '' $ac_executable_extensions; do
43379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43380    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43382    break 2
43383  fi
43384done
43385  done
43386IFS=$as_save_IFS
43387
43388fi
43389fi
43390OBJDUMP=$ac_cv_prog_OBJDUMP
43391if test -n "$OBJDUMP"; then
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43393$as_echo "$OBJDUMP" >&6; }
43394else
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43396$as_echo "no" >&6; }
43397fi
43398
43399
43400    test -n "$OBJDUMP" && break
43401  done
43402fi
43403if test -z "$OBJDUMP"; then
43404  ac_ct_OBJDUMP=$OBJDUMP
43405  for ac_prog in gobjdump objdump
43406do
43407  # Extract the first word of "$ac_prog", so it can be a program name with args.
43408set dummy $ac_prog; ac_word=$2
43409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43410$as_echo_n "checking for $ac_word... " >&6; }
43411if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43412  $as_echo_n "(cached) " >&6
43413else
43414  if test -n "$ac_ct_OBJDUMP"; then
43415  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43416else
43417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43418for as_dir in $PATH
43419do
43420  IFS=$as_save_IFS
43421  test -z "$as_dir" && as_dir=.
43422    for ac_exec_ext in '' $ac_executable_extensions; do
43423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43424    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43426    break 2
43427  fi
43428done
43429  done
43430IFS=$as_save_IFS
43431
43432fi
43433fi
43434ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43435if test -n "$ac_ct_OBJDUMP"; then
43436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43437$as_echo "$ac_ct_OBJDUMP" >&6; }
43438else
43439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43440$as_echo "no" >&6; }
43441fi
43442
43443
43444  test -n "$ac_ct_OBJDUMP" && break
43445done
43446
43447  if test "x$ac_ct_OBJDUMP" = x; then
43448    OBJDUMP=""
43449  else
43450    case $cross_compiling:$ac_tool_warned in
43451yes:)
43452{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43453$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43454ac_tool_warned=yes ;;
43455esac
43456    OBJDUMP=$ac_ct_OBJDUMP
43457  fi
43458fi
43459
43460    else
43461      # If it succeeded, then it was overridden by the user. We will use it
43462      # for the tool.
43463
43464      # First remove it from the list of overridden variables, so we can test
43465      # for unknown variables in the end.
43466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43467
43468      # Check if we try to supply an empty value
43469      if test "x$OBJDUMP" = x; then
43470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43471$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43473$as_echo_n "checking for OBJDUMP... " >&6; }
43474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43475$as_echo "disabled" >&6; }
43476      else
43477        # Check if the provided tool contains a complete path.
43478        tool_specified="$OBJDUMP"
43479        tool_basename="${tool_specified##*/}"
43480        if test "x$tool_basename" = "x$tool_specified"; then
43481          # A command without a complete path is provided, search $PATH.
43482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43483$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43484          # Extract the first word of "$tool_basename", so it can be a program name with args.
43485set dummy $tool_basename; ac_word=$2
43486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43487$as_echo_n "checking for $ac_word... " >&6; }
43488if ${ac_cv_path_OBJDUMP+:} false; then :
43489  $as_echo_n "(cached) " >&6
43490else
43491  case $OBJDUMP in
43492  [\\/]* | ?:[\\/]*)
43493  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43494  ;;
43495  *)
43496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43497for as_dir in $PATH
43498do
43499  IFS=$as_save_IFS
43500  test -z "$as_dir" && as_dir=.
43501    for ac_exec_ext in '' $ac_executable_extensions; do
43502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43503    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43505    break 2
43506  fi
43507done
43508  done
43509IFS=$as_save_IFS
43510
43511  ;;
43512esac
43513fi
43514OBJDUMP=$ac_cv_path_OBJDUMP
43515if test -n "$OBJDUMP"; then
43516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43517$as_echo "$OBJDUMP" >&6; }
43518else
43519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43520$as_echo "no" >&6; }
43521fi
43522
43523
43524          if test "x$OBJDUMP" = x; then
43525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43526          fi
43527        else
43528          # Otherwise we believe it is a complete path. Use it as it is.
43529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43530$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43532$as_echo_n "checking for OBJDUMP... " >&6; }
43533          if test ! -x "$tool_specified"; then
43534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43535$as_echo "not found" >&6; }
43536            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43537          fi
43538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43539$as_echo "$tool_specified" >&6; }
43540        fi
43541      fi
43542    fi
43543
43544  fi
43545
43546
43547  if test "x$OBJDUMP" != x; then
43548    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43549    # bails if argument is missing.
43550
43551  # Only process if variable expands to non-empty
43552
43553  if test "x$OBJDUMP" != x; then
43554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43555
43556  # First separate the path from the arguments. This will split at the first
43557  # space.
43558  complete="$OBJDUMP"
43559  path="${complete%% *}"
43560  tmp="$complete EOL"
43561  arguments="${tmp#* }"
43562
43563  # Input might be given as Windows format, start by converting to
43564  # unix format.
43565  new_path=`$CYGPATH -u "$path"`
43566
43567  # Now try to locate executable using which
43568  new_path=`$WHICH "$new_path" 2> /dev/null`
43569  # bat and cmd files are not always considered executable in cygwin causing which
43570  # to not find them
43571  if test "x$new_path" = x \
43572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43574    new_path=`$CYGPATH -u "$path"`
43575  fi
43576  if test "x$new_path" = x; then
43577    # Oops. Which didn't find the executable.
43578    # The splitting of arguments from the executable at a space might have been incorrect,
43579    # since paths with space are more likely in Windows. Give it another try with the whole
43580    # argument.
43581    path="$complete"
43582    arguments="EOL"
43583    new_path=`$CYGPATH -u "$path"`
43584    new_path=`$WHICH "$new_path" 2> /dev/null`
43585    # bat and cmd files are not always considered executable in cygwin causing which
43586    # to not find them
43587    if test "x$new_path" = x \
43588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43590      new_path=`$CYGPATH -u "$path"`
43591    fi
43592    if test "x$new_path" = x; then
43593      # It's still not found. Now this is an unrecoverable error.
43594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43595$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43596      has_space=`$ECHO "$complete" | $GREP " "`
43597      if test "x$has_space" != x; then
43598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43600      fi
43601      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43602    fi
43603  fi
43604
43605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43608  # "foo.exe" is OK but "foo" is an error.
43609  #
43610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43611  # It is also a way to make sure we got the proper file name for the real test later on.
43612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43613  if test "x$test_shortpath" = x; then
43614    # Short path failed, file does not exist as specified.
43615    # Try adding .exe or .cmd
43616    if test -f "${new_path}.exe"; then
43617      input_to_shortpath="${new_path}.exe"
43618    elif test -f "${new_path}.cmd"; then
43619      input_to_shortpath="${new_path}.cmd"
43620    else
43621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43622$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43625      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43626    fi
43627  else
43628    input_to_shortpath="$new_path"
43629  fi
43630
43631  # Call helper function which possibly converts this using DOS-style short mode.
43632  # If so, the updated path is stored in $new_path.
43633  new_path="$input_to_shortpath"
43634
43635  input_path="$input_to_shortpath"
43636  # Check if we need to convert this using DOS-style short mode. If the path
43637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43638  # take no chances and rewrite it.
43639  # Note: m4 eats our [], so we need to use [ and ] instead.
43640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43641  if test "x$has_forbidden_chars" != x; then
43642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43646      # Going to short mode and back again did indeed matter. Since short mode is
43647      # case insensitive, let's make it lowercase to improve readability.
43648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43649      # Now convert it back to Unix-style (cygpath)
43650      input_path=`$CYGPATH -u "$shortmode_path"`
43651      new_path="$input_path"
43652    fi
43653  fi
43654
43655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43656  if test "x$test_cygdrive_prefix" = x; then
43657    # As a simple fix, exclude /usr/bin since it's not a real path.
43658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43660      # a path prefixed by /cygdrive for fixpath to work.
43661      new_path="$CYGWIN_ROOT_PATH$input_path"
43662    fi
43663  fi
43664
43665  # remove trailing .exe if any
43666  new_path="${new_path/%.exe/}"
43667
43668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43669
43670  # First separate the path from the arguments. This will split at the first
43671  # space.
43672  complete="$OBJDUMP"
43673  path="${complete%% *}"
43674  tmp="$complete EOL"
43675  arguments="${tmp#* }"
43676
43677  # Input might be given as Windows format, start by converting to
43678  # unix format.
43679  new_path="$path"
43680
43681  windows_path="$new_path"
43682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43683    unix_path=`$CYGPATH -u "$windows_path"`
43684    new_path="$unix_path"
43685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43687    new_path="$unix_path"
43688  fi
43689
43690
43691  # Now try to locate executable using which
43692  new_path=`$WHICH "$new_path" 2> /dev/null`
43693
43694  if test "x$new_path" = x; then
43695    # Oops. Which didn't find the executable.
43696    # The splitting of arguments from the executable at a space might have been incorrect,
43697    # since paths with space are more likely in Windows. Give it another try with the whole
43698    # argument.
43699    path="$complete"
43700    arguments="EOL"
43701    new_path="$path"
43702
43703  windows_path="$new_path"
43704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43705    unix_path=`$CYGPATH -u "$windows_path"`
43706    new_path="$unix_path"
43707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43709    new_path="$unix_path"
43710  fi
43711
43712
43713    new_path=`$WHICH "$new_path" 2> /dev/null`
43714    # bat and cmd files are not always considered executable in MSYS causing which
43715    # to not find them
43716    if test "x$new_path" = x \
43717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43719      new_path="$path"
43720
43721  windows_path="$new_path"
43722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43723    unix_path=`$CYGPATH -u "$windows_path"`
43724    new_path="$unix_path"
43725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43727    new_path="$unix_path"
43728  fi
43729
43730    fi
43731
43732    if test "x$new_path" = x; then
43733      # It's still not found. Now this is an unrecoverable error.
43734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43735$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43736      has_space=`$ECHO "$complete" | $GREP " "`
43737      if test "x$has_space" != x; then
43738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43740      fi
43741      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43742    fi
43743  fi
43744
43745  # Now new_path has a complete unix path to the binary
43746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43747    # Keep paths in /bin as-is, but remove trailing .exe if any
43748    new_path="${new_path/%.exe/}"
43749    # Do not save /bin paths to all_fixpath_prefixes!
43750  else
43751    # Not in mixed or Windows style, start by that.
43752    new_path=`cmd //c echo $new_path`
43753
43754  input_path="$new_path"
43755  # Check if we need to convert this using DOS-style short mode. If the path
43756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43757  # take no chances and rewrite it.
43758  # Note: m4 eats our [], so we need to use [ and ] instead.
43759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43760  if test "x$has_forbidden_chars" != x; then
43761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43763  fi
43764
43765    # Output is in $new_path
43766
43767  windows_path="$new_path"
43768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43769    unix_path=`$CYGPATH -u "$windows_path"`
43770    new_path="$unix_path"
43771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43773    new_path="$unix_path"
43774  fi
43775
43776    # remove trailing .exe if any
43777    new_path="${new_path/%.exe/}"
43778
43779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43781  fi
43782
43783    else
43784      # We're on a unix platform. Hooray! :)
43785      # First separate the path from the arguments. This will split at the first
43786      # space.
43787      complete="$OBJDUMP"
43788      path="${complete%% *}"
43789      tmp="$complete EOL"
43790      arguments="${tmp#* }"
43791
43792      # Cannot rely on the command "which" here since it doesn't always work.
43793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43794      if test -z "$is_absolute_path"; then
43795        # Path to executable is not absolute. Find it.
43796        IFS_save="$IFS"
43797        IFS=:
43798        for p in $PATH; do
43799          if test -f "$p/$path" && test -x "$p/$path"; then
43800            new_path="$p/$path"
43801            break
43802          fi
43803        done
43804        IFS="$IFS_save"
43805      else
43806        # This is an absolute path, we can use it without further modifications.
43807        new_path="$path"
43808      fi
43809
43810      if test "x$new_path" = x; then
43811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43812$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43813        has_space=`$ECHO "$complete" | $GREP " "`
43814        if test "x$has_space" != x; then
43815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43817        fi
43818        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43819      fi
43820    fi
43821
43822    # Now join together the path and the arguments once again
43823    if test "x$arguments" != xEOL; then
43824      new_complete="$new_path ${arguments% *}"
43825    else
43826      new_complete="$new_path"
43827    fi
43828
43829    if test "x$complete" != "x$new_complete"; then
43830      OBJDUMP="$new_complete"
43831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43832$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43833    fi
43834  fi
43835
43836  fi
43837
43838
43839  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43840  # to remain in place. Otherwise the compiler will not work in some siutations
43841  # in later configure checks.
43842  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43843    PATH="$OLD_PATH"
43844  fi
43845
43846  # Restore the flags to the user specified values.
43847  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43848  CFLAGS="$ORG_CFLAGS"
43849  CXXFLAGS="$ORG_CXXFLAGS"
43850
43851
43852# Finally do some processing after the detection phase
43853
43854  if test "x$COMPILE_TYPE" = "xcross"; then
43855    # Now we need to find a C/C++ compiler that can build executables for the
43856    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43857    # used once. Also, we need to do this without adding a tools dir to the
43858    # path, otherwise we might pick up cross-compilers which don't use standard
43859    # naming.
43860
43861    OLDPATH="$PATH"
43862
43863
43864# Check whether --with-build-devkit was given.
43865if test "${with_build_devkit+set}" = set; then :
43866  withval=$with_build_devkit;
43867fi
43868
43869    if test "x$with_build_devkit" = "xyes"; then
43870      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43871    elif test -n "$with_build_devkit"; then
43872      if test ! -d "$with_build_devkit"; then
43873        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43874      else
43875
43876  # Only process if variable expands to non-empty
43877
43878  if test "x$with_build_devkit" != x; then
43879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43880
43881  # Input might be given as Windows format, start by converting to
43882  # unix format.
43883  path="$with_build_devkit"
43884  new_path=`$CYGPATH -u "$path"`
43885
43886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43889  # "foo.exe" is OK but "foo" is an error.
43890  #
43891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43892  # It is also a way to make sure we got the proper file name for the real test later on.
43893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43894  if test "x$test_shortpath" = x; then
43895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43896$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43897    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43898  fi
43899
43900  # Call helper function which possibly converts this using DOS-style short mode.
43901  # If so, the updated path is stored in $new_path.
43902
43903  input_path="$new_path"
43904  # Check if we need to convert this using DOS-style short mode. If the path
43905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43906  # take no chances and rewrite it.
43907  # Note: m4 eats our [], so we need to use [ and ] instead.
43908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43909  if test "x$has_forbidden_chars" != x; then
43910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43914      # Going to short mode and back again did indeed matter. Since short mode is
43915      # case insensitive, let's make it lowercase to improve readability.
43916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43917      # Now convert it back to Unix-style (cygpath)
43918      input_path=`$CYGPATH -u "$shortmode_path"`
43919      new_path="$input_path"
43920    fi
43921  fi
43922
43923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43924  if test "x$test_cygdrive_prefix" = x; then
43925    # As a simple fix, exclude /usr/bin since it's not a real path.
43926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43928      # a path prefixed by /cygdrive for fixpath to work.
43929      new_path="$CYGWIN_ROOT_PATH$input_path"
43930    fi
43931  fi
43932
43933
43934  if test "x$path" != "x$new_path"; then
43935    with_build_devkit="$new_path"
43936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43937$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43938  fi
43939
43940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43941
43942  path="$with_build_devkit"
43943  has_colon=`$ECHO $path | $GREP ^.:`
43944  new_path="$path"
43945  if test "x$has_colon" = x; then
43946    # Not in mixed or Windows style, start by that.
43947    new_path=`cmd //c echo $path`
43948  fi
43949
43950
43951  input_path="$new_path"
43952  # Check if we need to convert this using DOS-style short mode. If the path
43953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43954  # take no chances and rewrite it.
43955  # Note: m4 eats our [], so we need to use [ and ] instead.
43956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43957  if test "x$has_forbidden_chars" != x; then
43958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43960  fi
43961
43962
43963  windows_path="$new_path"
43964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43965    unix_path=`$CYGPATH -u "$windows_path"`
43966    new_path="$unix_path"
43967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43969    new_path="$unix_path"
43970  fi
43971
43972  if test "x$path" != "x$new_path"; then
43973    with_build_devkit="$new_path"
43974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43975$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43976  fi
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
43981    else
43982      # We're on a unix platform. Hooray! :)
43983      path="$with_build_devkit"
43984      has_space=`$ECHO "$path" | $GREP " "`
43985      if test "x$has_space" != x; then
43986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43987$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43989      fi
43990
43991      # Use eval to expand a potential ~
43992      eval path="$path"
43993      if test ! -f "$path" && test ! -d "$path"; then
43994        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43995      fi
43996
43997      if test -d "$path"; then
43998        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43999      else
44000        dir="`$DIRNAME "$path"`"
44001        base="`$BASENAME "$path"`"
44002        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44003      fi
44004    fi
44005  fi
44006
44007        BUILD_DEVKIT_ROOT="$with_build_devkit"
44008        # Check for a meta data info file in the root of the devkit
44009        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44010          # Process devkit.info so that existing devkit variables are not
44011          # modified by this
44012          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44013              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44014              -e "s/\$host/\$build/g" \
44015              $BUILD_DEVKIT_ROOT/devkit.info \
44016              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44017          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44018          # This potentially sets the following:
44019          # A descriptive name of the devkit
44020
44021  if test "x$BUILD_DEVKIT_NAME" = x; then
44022    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44023  fi
44024
44025          # Corresponds to --with-extra-path
44026
44027  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44028    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44029  fi
44030
44031          # Corresponds to --with-toolchain-path
44032
44033  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44034    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44035  fi
44036
44037          # Corresponds to --with-sysroot
44038
44039  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44040    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44041  fi
44042
44043          # Skip the Window specific parts
44044        fi
44045
44046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44047$as_echo_n "checking for build platform devkit... " >&6; }
44048        if test "x$BUILD_DEVKIT_NAME" != x; then
44049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44050$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44051        else
44052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44053$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44054        fi
44055
44056        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44057
44058  if test "x$BUILD_SYSROOT" != "x"; then
44059    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44060      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44061        # Solaris Studio does not have a concept of sysroot. Instead we must
44062        # make sure the default include and lib dirs are appended to each
44063        # compile and link command line. Must also add -I-xbuiltin to enable
44064        # inlining of system functions and intrinsics.
44065        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44066        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44067            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44068      fi
44069    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44070      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44071      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44072    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44073      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44074      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44075    fi
44076    # The global CFLAGS and LDFLAGS variables need these for configure to function
44077    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44078    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44079    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44080    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44081  fi
44082
44083  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44084    # We also need -iframework<path>/System/Library/Frameworks
44085    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44086    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44087    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44088    # set this here so it doesn't have to be peppered throughout the forest
44089    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44090    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44091  fi
44092
44093
44094
44095
44096
44097         # Fallback default of just /bin if DEVKIT_PATH is not defined
44098        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44099          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44100        fi
44101        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44102      fi
44103    fi
44104
44105    # FIXME: we should list the discovered compilers as an exclude pattern!
44106    # If we do that, we can do this detection before POST_DETECTION, and still
44107    # find the build compilers in the tools dir, if needed.
44108
44109
44110
44111  # Publish this variable in the help.
44112
44113
44114  if [ -z "${BUILD_CC+x}" ]; then
44115    # The variable is not set by user, try to locate tool using the code snippet
44116    for ac_prog in cl cc gcc
44117do
44118  # Extract the first word of "$ac_prog", so it can be a program name with args.
44119set dummy $ac_prog; ac_word=$2
44120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44121$as_echo_n "checking for $ac_word... " >&6; }
44122if ${ac_cv_path_BUILD_CC+:} false; then :
44123  $as_echo_n "(cached) " >&6
44124else
44125  case $BUILD_CC in
44126  [\\/]* | ?:[\\/]*)
44127  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44128  ;;
44129  *)
44130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44131for as_dir in $PATH
44132do
44133  IFS=$as_save_IFS
44134  test -z "$as_dir" && as_dir=.
44135    for ac_exec_ext in '' $ac_executable_extensions; do
44136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44137    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44139    break 2
44140  fi
44141done
44142  done
44143IFS=$as_save_IFS
44144
44145  ;;
44146esac
44147fi
44148BUILD_CC=$ac_cv_path_BUILD_CC
44149if test -n "$BUILD_CC"; then
44150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44151$as_echo "$BUILD_CC" >&6; }
44152else
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44154$as_echo "no" >&6; }
44155fi
44156
44157
44158  test -n "$BUILD_CC" && break
44159done
44160
44161  else
44162    # The variable is set, but is it from the command line or the environment?
44163
44164    # Try to remove the string !BUILD_CC! from our list.
44165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44167      # If it failed, the variable was not from the command line. Ignore it,
44168      # but warn the user (except for BASH, which is always set by the calling BASH).
44169      if test "xBUILD_CC" != xBASH; then
44170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44171$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44172      fi
44173      # Try to locate tool using the code snippet
44174      for ac_prog in cl cc gcc
44175do
44176  # Extract the first word of "$ac_prog", so it can be a program name with args.
44177set dummy $ac_prog; ac_word=$2
44178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44179$as_echo_n "checking for $ac_word... " >&6; }
44180if ${ac_cv_path_BUILD_CC+:} false; then :
44181  $as_echo_n "(cached) " >&6
44182else
44183  case $BUILD_CC in
44184  [\\/]* | ?:[\\/]*)
44185  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44186  ;;
44187  *)
44188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44189for as_dir in $PATH
44190do
44191  IFS=$as_save_IFS
44192  test -z "$as_dir" && as_dir=.
44193    for ac_exec_ext in '' $ac_executable_extensions; do
44194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44195    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44197    break 2
44198  fi
44199done
44200  done
44201IFS=$as_save_IFS
44202
44203  ;;
44204esac
44205fi
44206BUILD_CC=$ac_cv_path_BUILD_CC
44207if test -n "$BUILD_CC"; then
44208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44209$as_echo "$BUILD_CC" >&6; }
44210else
44211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44212$as_echo "no" >&6; }
44213fi
44214
44215
44216  test -n "$BUILD_CC" && break
44217done
44218
44219    else
44220      # If it succeeded, then it was overridden by the user. We will use it
44221      # for the tool.
44222
44223      # First remove it from the list of overridden variables, so we can test
44224      # for unknown variables in the end.
44225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44226
44227      # Check if we try to supply an empty value
44228      if test "x$BUILD_CC" = x; then
44229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44230$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44232$as_echo_n "checking for BUILD_CC... " >&6; }
44233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44234$as_echo "disabled" >&6; }
44235      else
44236        # Check if the provided tool contains a complete path.
44237        tool_specified="$BUILD_CC"
44238        tool_basename="${tool_specified##*/}"
44239        if test "x$tool_basename" = "x$tool_specified"; then
44240          # A command without a complete path is provided, search $PATH.
44241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44242$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44243          # Extract the first word of "$tool_basename", so it can be a program name with args.
44244set dummy $tool_basename; ac_word=$2
44245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44246$as_echo_n "checking for $ac_word... " >&6; }
44247if ${ac_cv_path_BUILD_CC+:} false; then :
44248  $as_echo_n "(cached) " >&6
44249else
44250  case $BUILD_CC in
44251  [\\/]* | ?:[\\/]*)
44252  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44253  ;;
44254  *)
44255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44256for as_dir in $PATH
44257do
44258  IFS=$as_save_IFS
44259  test -z "$as_dir" && as_dir=.
44260    for ac_exec_ext in '' $ac_executable_extensions; do
44261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44262    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44264    break 2
44265  fi
44266done
44267  done
44268IFS=$as_save_IFS
44269
44270  ;;
44271esac
44272fi
44273BUILD_CC=$ac_cv_path_BUILD_CC
44274if test -n "$BUILD_CC"; then
44275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44276$as_echo "$BUILD_CC" >&6; }
44277else
44278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44279$as_echo "no" >&6; }
44280fi
44281
44282
44283          if test "x$BUILD_CC" = x; then
44284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44285          fi
44286        else
44287          # Otherwise we believe it is a complete path. Use it as it is.
44288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44289$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44291$as_echo_n "checking for BUILD_CC... " >&6; }
44292          if test ! -x "$tool_specified"; then
44293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44294$as_echo "not found" >&6; }
44295            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44296          fi
44297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44298$as_echo "$tool_specified" >&6; }
44299        fi
44300      fi
44301    fi
44302
44303  fi
44304
44305
44306
44307  if test "x$BUILD_CC" = x; then
44308    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44309  fi
44310
44311
44312
44313  # Only process if variable expands to non-empty
44314
44315  if test "x$BUILD_CC" != x; then
44316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44317
44318  # First separate the path from the arguments. This will split at the first
44319  # space.
44320  complete="$BUILD_CC"
44321  path="${complete%% *}"
44322  tmp="$complete EOL"
44323  arguments="${tmp#* }"
44324
44325  # Input might be given as Windows format, start by converting to
44326  # unix format.
44327  new_path=`$CYGPATH -u "$path"`
44328
44329  # Now try to locate executable using which
44330  new_path=`$WHICH "$new_path" 2> /dev/null`
44331  # bat and cmd files are not always considered executable in cygwin causing which
44332  # to not find them
44333  if test "x$new_path" = x \
44334      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44335      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44336    new_path=`$CYGPATH -u "$path"`
44337  fi
44338  if test "x$new_path" = x; then
44339    # Oops. Which didn't find the executable.
44340    # The splitting of arguments from the executable at a space might have been incorrect,
44341    # since paths with space are more likely in Windows. Give it another try with the whole
44342    # argument.
44343    path="$complete"
44344    arguments="EOL"
44345    new_path=`$CYGPATH -u "$path"`
44346    new_path=`$WHICH "$new_path" 2> /dev/null`
44347    # bat and cmd files are not always considered executable in cygwin causing which
44348    # to not find them
44349    if test "x$new_path" = x \
44350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44352      new_path=`$CYGPATH -u "$path"`
44353    fi
44354    if test "x$new_path" = x; then
44355      # It's still not found. Now this is an unrecoverable error.
44356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44357$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44358      has_space=`$ECHO "$complete" | $GREP " "`
44359      if test "x$has_space" != x; then
44360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44362      fi
44363      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44364    fi
44365  fi
44366
44367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44370  # "foo.exe" is OK but "foo" is an error.
44371  #
44372  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44373  # It is also a way to make sure we got the proper file name for the real test later on.
44374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44375  if test "x$test_shortpath" = x; then
44376    # Short path failed, file does not exist as specified.
44377    # Try adding .exe or .cmd
44378    if test -f "${new_path}.exe"; then
44379      input_to_shortpath="${new_path}.exe"
44380    elif test -f "${new_path}.cmd"; then
44381      input_to_shortpath="${new_path}.cmd"
44382    else
44383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44384$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44387      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44388    fi
44389  else
44390    input_to_shortpath="$new_path"
44391  fi
44392
44393  # Call helper function which possibly converts this using DOS-style short mode.
44394  # If so, the updated path is stored in $new_path.
44395  new_path="$input_to_shortpath"
44396
44397  input_path="$input_to_shortpath"
44398  # Check if we need to convert this using DOS-style short mode. If the path
44399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44400  # take no chances and rewrite it.
44401  # Note: m4 eats our [], so we need to use [ and ] instead.
44402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44403  if test "x$has_forbidden_chars" != x; then
44404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44408      # Going to short mode and back again did indeed matter. Since short mode is
44409      # case insensitive, let's make it lowercase to improve readability.
44410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44411      # Now convert it back to Unix-style (cygpath)
44412      input_path=`$CYGPATH -u "$shortmode_path"`
44413      new_path="$input_path"
44414    fi
44415  fi
44416
44417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44418  if test "x$test_cygdrive_prefix" = x; then
44419    # As a simple fix, exclude /usr/bin since it's not a real path.
44420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44422      # a path prefixed by /cygdrive for fixpath to work.
44423      new_path="$CYGWIN_ROOT_PATH$input_path"
44424    fi
44425  fi
44426
44427  # remove trailing .exe if any
44428  new_path="${new_path/%.exe/}"
44429
44430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44431
44432  # First separate the path from the arguments. This will split at the first
44433  # space.
44434  complete="$BUILD_CC"
44435  path="${complete%% *}"
44436  tmp="$complete EOL"
44437  arguments="${tmp#* }"
44438
44439  # Input might be given as Windows format, start by converting to
44440  # unix format.
44441  new_path="$path"
44442
44443  windows_path="$new_path"
44444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44445    unix_path=`$CYGPATH -u "$windows_path"`
44446    new_path="$unix_path"
44447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44449    new_path="$unix_path"
44450  fi
44451
44452
44453  # Now try to locate executable using which
44454  new_path=`$WHICH "$new_path" 2> /dev/null`
44455
44456  if test "x$new_path" = x; then
44457    # Oops. Which didn't find the executable.
44458    # The splitting of arguments from the executable at a space might have been incorrect,
44459    # since paths with space are more likely in Windows. Give it another try with the whole
44460    # argument.
44461    path="$complete"
44462    arguments="EOL"
44463    new_path="$path"
44464
44465  windows_path="$new_path"
44466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467    unix_path=`$CYGPATH -u "$windows_path"`
44468    new_path="$unix_path"
44469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44471    new_path="$unix_path"
44472  fi
44473
44474
44475    new_path=`$WHICH "$new_path" 2> /dev/null`
44476    # bat and cmd files are not always considered executable in MSYS causing which
44477    # to not find them
44478    if test "x$new_path" = x \
44479        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44480        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44481      new_path="$path"
44482
44483  windows_path="$new_path"
44484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44485    unix_path=`$CYGPATH -u "$windows_path"`
44486    new_path="$unix_path"
44487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44489    new_path="$unix_path"
44490  fi
44491
44492    fi
44493
44494    if test "x$new_path" = x; then
44495      # It's still not found. Now this is an unrecoverable error.
44496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44497$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44498      has_space=`$ECHO "$complete" | $GREP " "`
44499      if test "x$has_space" != x; then
44500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44502      fi
44503      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44504    fi
44505  fi
44506
44507  # Now new_path has a complete unix path to the binary
44508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44509    # Keep paths in /bin as-is, but remove trailing .exe if any
44510    new_path="${new_path/%.exe/}"
44511    # Do not save /bin paths to all_fixpath_prefixes!
44512  else
44513    # Not in mixed or Windows style, start by that.
44514    new_path=`cmd //c echo $new_path`
44515
44516  input_path="$new_path"
44517  # Check if we need to convert this using DOS-style short mode. If the path
44518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44519  # take no chances and rewrite it.
44520  # Note: m4 eats our [], so we need to use [ and ] instead.
44521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44522  if test "x$has_forbidden_chars" != x; then
44523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44525  fi
44526
44527    # Output is in $new_path
44528
44529  windows_path="$new_path"
44530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44531    unix_path=`$CYGPATH -u "$windows_path"`
44532    new_path="$unix_path"
44533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44535    new_path="$unix_path"
44536  fi
44537
44538    # remove trailing .exe if any
44539    new_path="${new_path/%.exe/}"
44540
44541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44543  fi
44544
44545    else
44546      # We're on a unix platform. Hooray! :)
44547      # First separate the path from the arguments. This will split at the first
44548      # space.
44549      complete="$BUILD_CC"
44550      path="${complete%% *}"
44551      tmp="$complete EOL"
44552      arguments="${tmp#* }"
44553
44554      # Cannot rely on the command "which" here since it doesn't always work.
44555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44556      if test -z "$is_absolute_path"; then
44557        # Path to executable is not absolute. Find it.
44558        IFS_save="$IFS"
44559        IFS=:
44560        for p in $PATH; do
44561          if test -f "$p/$path" && test -x "$p/$path"; then
44562            new_path="$p/$path"
44563            break
44564          fi
44565        done
44566        IFS="$IFS_save"
44567      else
44568        # This is an absolute path, we can use it without further modifications.
44569        new_path="$path"
44570      fi
44571
44572      if test "x$new_path" = x; then
44573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44574$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44575        has_space=`$ECHO "$complete" | $GREP " "`
44576        if test "x$has_space" != x; then
44577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44579        fi
44580        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44581      fi
44582    fi
44583
44584    # Now join together the path and the arguments once again
44585    if test "x$arguments" != xEOL; then
44586      new_complete="$new_path ${arguments% *}"
44587    else
44588      new_complete="$new_path"
44589    fi
44590
44591    if test "x$complete" != "x$new_complete"; then
44592      BUILD_CC="$new_complete"
44593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44594$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44595    fi
44596  fi
44597
44598
44599
44600
44601  # Publish this variable in the help.
44602
44603
44604  if [ -z "${BUILD_CXX+x}" ]; then
44605    # The variable is not set by user, try to locate tool using the code snippet
44606    for ac_prog in cl CC g++
44607do
44608  # Extract the first word of "$ac_prog", so it can be a program name with args.
44609set dummy $ac_prog; ac_word=$2
44610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44611$as_echo_n "checking for $ac_word... " >&6; }
44612if ${ac_cv_path_BUILD_CXX+:} false; then :
44613  $as_echo_n "(cached) " >&6
44614else
44615  case $BUILD_CXX in
44616  [\\/]* | ?:[\\/]*)
44617  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44618  ;;
44619  *)
44620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44621for as_dir in $PATH
44622do
44623  IFS=$as_save_IFS
44624  test -z "$as_dir" && as_dir=.
44625    for ac_exec_ext in '' $ac_executable_extensions; do
44626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44627    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44629    break 2
44630  fi
44631done
44632  done
44633IFS=$as_save_IFS
44634
44635  ;;
44636esac
44637fi
44638BUILD_CXX=$ac_cv_path_BUILD_CXX
44639if test -n "$BUILD_CXX"; then
44640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44641$as_echo "$BUILD_CXX" >&6; }
44642else
44643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44644$as_echo "no" >&6; }
44645fi
44646
44647
44648  test -n "$BUILD_CXX" && break
44649done
44650
44651  else
44652    # The variable is set, but is it from the command line or the environment?
44653
44654    # Try to remove the string !BUILD_CXX! from our list.
44655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44657      # If it failed, the variable was not from the command line. Ignore it,
44658      # but warn the user (except for BASH, which is always set by the calling BASH).
44659      if test "xBUILD_CXX" != xBASH; then
44660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44661$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44662      fi
44663      # Try to locate tool using the code snippet
44664      for ac_prog in cl CC g++
44665do
44666  # Extract the first word of "$ac_prog", so it can be a program name with args.
44667set dummy $ac_prog; ac_word=$2
44668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44669$as_echo_n "checking for $ac_word... " >&6; }
44670if ${ac_cv_path_BUILD_CXX+:} false; then :
44671  $as_echo_n "(cached) " >&6
44672else
44673  case $BUILD_CXX in
44674  [\\/]* | ?:[\\/]*)
44675  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44676  ;;
44677  *)
44678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44679for as_dir in $PATH
44680do
44681  IFS=$as_save_IFS
44682  test -z "$as_dir" && as_dir=.
44683    for ac_exec_ext in '' $ac_executable_extensions; do
44684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44685    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44687    break 2
44688  fi
44689done
44690  done
44691IFS=$as_save_IFS
44692
44693  ;;
44694esac
44695fi
44696BUILD_CXX=$ac_cv_path_BUILD_CXX
44697if test -n "$BUILD_CXX"; then
44698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44699$as_echo "$BUILD_CXX" >&6; }
44700else
44701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44702$as_echo "no" >&6; }
44703fi
44704
44705
44706  test -n "$BUILD_CXX" && break
44707done
44708
44709    else
44710      # If it succeeded, then it was overridden by the user. We will use it
44711      # for the tool.
44712
44713      # First remove it from the list of overridden variables, so we can test
44714      # for unknown variables in the end.
44715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44716
44717      # Check if we try to supply an empty value
44718      if test "x$BUILD_CXX" = x; then
44719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44720$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44722$as_echo_n "checking for BUILD_CXX... " >&6; }
44723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44724$as_echo "disabled" >&6; }
44725      else
44726        # Check if the provided tool contains a complete path.
44727        tool_specified="$BUILD_CXX"
44728        tool_basename="${tool_specified##*/}"
44729        if test "x$tool_basename" = "x$tool_specified"; then
44730          # A command without a complete path is provided, search $PATH.
44731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44732$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44733          # Extract the first word of "$tool_basename", so it can be a program name with args.
44734set dummy $tool_basename; ac_word=$2
44735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44736$as_echo_n "checking for $ac_word... " >&6; }
44737if ${ac_cv_path_BUILD_CXX+:} false; then :
44738  $as_echo_n "(cached) " >&6
44739else
44740  case $BUILD_CXX in
44741  [\\/]* | ?:[\\/]*)
44742  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44743  ;;
44744  *)
44745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44746for as_dir in $PATH
44747do
44748  IFS=$as_save_IFS
44749  test -z "$as_dir" && as_dir=.
44750    for ac_exec_ext in '' $ac_executable_extensions; do
44751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44752    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44754    break 2
44755  fi
44756done
44757  done
44758IFS=$as_save_IFS
44759
44760  ;;
44761esac
44762fi
44763BUILD_CXX=$ac_cv_path_BUILD_CXX
44764if test -n "$BUILD_CXX"; then
44765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44766$as_echo "$BUILD_CXX" >&6; }
44767else
44768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44769$as_echo "no" >&6; }
44770fi
44771
44772
44773          if test "x$BUILD_CXX" = x; then
44774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44775          fi
44776        else
44777          # Otherwise we believe it is a complete path. Use it as it is.
44778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44779$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44781$as_echo_n "checking for BUILD_CXX... " >&6; }
44782          if test ! -x "$tool_specified"; then
44783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44784$as_echo "not found" >&6; }
44785            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44786          fi
44787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44788$as_echo "$tool_specified" >&6; }
44789        fi
44790      fi
44791    fi
44792
44793  fi
44794
44795
44796
44797  if test "x$BUILD_CXX" = x; then
44798    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44799  fi
44800
44801
44802
44803  # Only process if variable expands to non-empty
44804
44805  if test "x$BUILD_CXX" != x; then
44806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44807
44808  # First separate the path from the arguments. This will split at the first
44809  # space.
44810  complete="$BUILD_CXX"
44811  path="${complete%% *}"
44812  tmp="$complete EOL"
44813  arguments="${tmp#* }"
44814
44815  # Input might be given as Windows format, start by converting to
44816  # unix format.
44817  new_path=`$CYGPATH -u "$path"`
44818
44819  # Now try to locate executable using which
44820  new_path=`$WHICH "$new_path" 2> /dev/null`
44821  # bat and cmd files are not always considered executable in cygwin causing which
44822  # to not find them
44823  if test "x$new_path" = x \
44824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44826    new_path=`$CYGPATH -u "$path"`
44827  fi
44828  if test "x$new_path" = x; then
44829    # Oops. Which didn't find the executable.
44830    # The splitting of arguments from the executable at a space might have been incorrect,
44831    # since paths with space are more likely in Windows. Give it another try with the whole
44832    # argument.
44833    path="$complete"
44834    arguments="EOL"
44835    new_path=`$CYGPATH -u "$path"`
44836    new_path=`$WHICH "$new_path" 2> /dev/null`
44837    # bat and cmd files are not always considered executable in cygwin causing which
44838    # to not find them
44839    if test "x$new_path" = x \
44840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44842      new_path=`$CYGPATH -u "$path"`
44843    fi
44844    if test "x$new_path" = x; then
44845      # It's still not found. Now this is an unrecoverable error.
44846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44847$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44848      has_space=`$ECHO "$complete" | $GREP " "`
44849      if test "x$has_space" != x; then
44850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44852      fi
44853      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44854    fi
44855  fi
44856
44857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44860  # "foo.exe" is OK but "foo" is an error.
44861  #
44862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44863  # It is also a way to make sure we got the proper file name for the real test later on.
44864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44865  if test "x$test_shortpath" = x; then
44866    # Short path failed, file does not exist as specified.
44867    # Try adding .exe or .cmd
44868    if test -f "${new_path}.exe"; then
44869      input_to_shortpath="${new_path}.exe"
44870    elif test -f "${new_path}.cmd"; then
44871      input_to_shortpath="${new_path}.cmd"
44872    else
44873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44874$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44877      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44878    fi
44879  else
44880    input_to_shortpath="$new_path"
44881  fi
44882
44883  # Call helper function which possibly converts this using DOS-style short mode.
44884  # If so, the updated path is stored in $new_path.
44885  new_path="$input_to_shortpath"
44886
44887  input_path="$input_to_shortpath"
44888  # Check if we need to convert this using DOS-style short mode. If the path
44889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44890  # take no chances and rewrite it.
44891  # Note: m4 eats our [], so we need to use [ and ] instead.
44892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44893  if test "x$has_forbidden_chars" != x; then
44894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44898      # Going to short mode and back again did indeed matter. Since short mode is
44899      # case insensitive, let's make it lowercase to improve readability.
44900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44901      # Now convert it back to Unix-style (cygpath)
44902      input_path=`$CYGPATH -u "$shortmode_path"`
44903      new_path="$input_path"
44904    fi
44905  fi
44906
44907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44908  if test "x$test_cygdrive_prefix" = x; then
44909    # As a simple fix, exclude /usr/bin since it's not a real path.
44910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44912      # a path prefixed by /cygdrive for fixpath to work.
44913      new_path="$CYGWIN_ROOT_PATH$input_path"
44914    fi
44915  fi
44916
44917  # remove trailing .exe if any
44918  new_path="${new_path/%.exe/}"
44919
44920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921
44922  # First separate the path from the arguments. This will split at the first
44923  # space.
44924  complete="$BUILD_CXX"
44925  path="${complete%% *}"
44926  tmp="$complete EOL"
44927  arguments="${tmp#* }"
44928
44929  # Input might be given as Windows format, start by converting to
44930  # unix format.
44931  new_path="$path"
44932
44933  windows_path="$new_path"
44934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44935    unix_path=`$CYGPATH -u "$windows_path"`
44936    new_path="$unix_path"
44937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44939    new_path="$unix_path"
44940  fi
44941
44942
44943  # Now try to locate executable using which
44944  new_path=`$WHICH "$new_path" 2> /dev/null`
44945
44946  if test "x$new_path" = x; then
44947    # Oops. Which didn't find the executable.
44948    # The splitting of arguments from the executable at a space might have been incorrect,
44949    # since paths with space are more likely in Windows. Give it another try with the whole
44950    # argument.
44951    path="$complete"
44952    arguments="EOL"
44953    new_path="$path"
44954
44955  windows_path="$new_path"
44956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44957    unix_path=`$CYGPATH -u "$windows_path"`
44958    new_path="$unix_path"
44959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44961    new_path="$unix_path"
44962  fi
44963
44964
44965    new_path=`$WHICH "$new_path" 2> /dev/null`
44966    # bat and cmd files are not always considered executable in MSYS causing which
44967    # to not find them
44968    if test "x$new_path" = x \
44969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44971      new_path="$path"
44972
44973  windows_path="$new_path"
44974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44975    unix_path=`$CYGPATH -u "$windows_path"`
44976    new_path="$unix_path"
44977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44979    new_path="$unix_path"
44980  fi
44981
44982    fi
44983
44984    if test "x$new_path" = x; then
44985      # It's still not found. Now this is an unrecoverable error.
44986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44987$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44988      has_space=`$ECHO "$complete" | $GREP " "`
44989      if test "x$has_space" != x; then
44990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44992      fi
44993      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44994    fi
44995  fi
44996
44997  # Now new_path has a complete unix path to the binary
44998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44999    # Keep paths in /bin as-is, but remove trailing .exe if any
45000    new_path="${new_path/%.exe/}"
45001    # Do not save /bin paths to all_fixpath_prefixes!
45002  else
45003    # Not in mixed or Windows style, start by that.
45004    new_path=`cmd //c echo $new_path`
45005
45006  input_path="$new_path"
45007  # Check if we need to convert this using DOS-style short mode. If the path
45008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45009  # take no chances and rewrite it.
45010  # Note: m4 eats our [], so we need to use [ and ] instead.
45011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45012  if test "x$has_forbidden_chars" != x; then
45013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45015  fi
45016
45017    # Output is in $new_path
45018
45019  windows_path="$new_path"
45020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45021    unix_path=`$CYGPATH -u "$windows_path"`
45022    new_path="$unix_path"
45023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45025    new_path="$unix_path"
45026  fi
45027
45028    # remove trailing .exe if any
45029    new_path="${new_path/%.exe/}"
45030
45031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45033  fi
45034
45035    else
45036      # We're on a unix platform. Hooray! :)
45037      # First separate the path from the arguments. This will split at the first
45038      # space.
45039      complete="$BUILD_CXX"
45040      path="${complete%% *}"
45041      tmp="$complete EOL"
45042      arguments="${tmp#* }"
45043
45044      # Cannot rely on the command "which" here since it doesn't always work.
45045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45046      if test -z "$is_absolute_path"; then
45047        # Path to executable is not absolute. Find it.
45048        IFS_save="$IFS"
45049        IFS=:
45050        for p in $PATH; do
45051          if test -f "$p/$path" && test -x "$p/$path"; then
45052            new_path="$p/$path"
45053            break
45054          fi
45055        done
45056        IFS="$IFS_save"
45057      else
45058        # This is an absolute path, we can use it without further modifications.
45059        new_path="$path"
45060      fi
45061
45062      if test "x$new_path" = x; then
45063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45064$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45065        has_space=`$ECHO "$complete" | $GREP " "`
45066        if test "x$has_space" != x; then
45067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45069        fi
45070        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45071      fi
45072    fi
45073
45074    # Now join together the path and the arguments once again
45075    if test "x$arguments" != xEOL; then
45076      new_complete="$new_path ${arguments% *}"
45077    else
45078      new_complete="$new_path"
45079    fi
45080
45081    if test "x$complete" != "x$new_complete"; then
45082      BUILD_CXX="$new_complete"
45083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45084$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45085    fi
45086  fi
45087
45088
45089
45090  # Publish this variable in the help.
45091
45092
45093  if [ -z "${BUILD_NM+x}" ]; then
45094    # The variable is not set by user, try to locate tool using the code snippet
45095    for ac_prog in nm gcc-nm
45096do
45097  # Extract the first word of "$ac_prog", so it can be a program name with args.
45098set dummy $ac_prog; ac_word=$2
45099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45100$as_echo_n "checking for $ac_word... " >&6; }
45101if ${ac_cv_path_BUILD_NM+:} false; then :
45102  $as_echo_n "(cached) " >&6
45103else
45104  case $BUILD_NM in
45105  [\\/]* | ?:[\\/]*)
45106  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45107  ;;
45108  *)
45109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45110for as_dir in $PATH
45111do
45112  IFS=$as_save_IFS
45113  test -z "$as_dir" && as_dir=.
45114    for ac_exec_ext in '' $ac_executable_extensions; do
45115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45116    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45118    break 2
45119  fi
45120done
45121  done
45122IFS=$as_save_IFS
45123
45124  ;;
45125esac
45126fi
45127BUILD_NM=$ac_cv_path_BUILD_NM
45128if test -n "$BUILD_NM"; then
45129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45130$as_echo "$BUILD_NM" >&6; }
45131else
45132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45133$as_echo "no" >&6; }
45134fi
45135
45136
45137  test -n "$BUILD_NM" && break
45138done
45139
45140  else
45141    # The variable is set, but is it from the command line or the environment?
45142
45143    # Try to remove the string !BUILD_NM! from our list.
45144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45146      # If it failed, the variable was not from the command line. Ignore it,
45147      # but warn the user (except for BASH, which is always set by the calling BASH).
45148      if test "xBUILD_NM" != xBASH; then
45149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45150$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45151      fi
45152      # Try to locate tool using the code snippet
45153      for ac_prog in nm gcc-nm
45154do
45155  # Extract the first word of "$ac_prog", so it can be a program name with args.
45156set dummy $ac_prog; ac_word=$2
45157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45158$as_echo_n "checking for $ac_word... " >&6; }
45159if ${ac_cv_path_BUILD_NM+:} false; then :
45160  $as_echo_n "(cached) " >&6
45161else
45162  case $BUILD_NM in
45163  [\\/]* | ?:[\\/]*)
45164  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45165  ;;
45166  *)
45167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45168for as_dir in $PATH
45169do
45170  IFS=$as_save_IFS
45171  test -z "$as_dir" && as_dir=.
45172    for ac_exec_ext in '' $ac_executable_extensions; do
45173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45174    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45176    break 2
45177  fi
45178done
45179  done
45180IFS=$as_save_IFS
45181
45182  ;;
45183esac
45184fi
45185BUILD_NM=$ac_cv_path_BUILD_NM
45186if test -n "$BUILD_NM"; then
45187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45188$as_echo "$BUILD_NM" >&6; }
45189else
45190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45191$as_echo "no" >&6; }
45192fi
45193
45194
45195  test -n "$BUILD_NM" && break
45196done
45197
45198    else
45199      # If it succeeded, then it was overridden by the user. We will use it
45200      # for the tool.
45201
45202      # First remove it from the list of overridden variables, so we can test
45203      # for unknown variables in the end.
45204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45205
45206      # Check if we try to supply an empty value
45207      if test "x$BUILD_NM" = x; then
45208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45209$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45211$as_echo_n "checking for BUILD_NM... " >&6; }
45212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45213$as_echo "disabled" >&6; }
45214      else
45215        # Check if the provided tool contains a complete path.
45216        tool_specified="$BUILD_NM"
45217        tool_basename="${tool_specified##*/}"
45218        if test "x$tool_basename" = "x$tool_specified"; then
45219          # A command without a complete path is provided, search $PATH.
45220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45221$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45222          # Extract the first word of "$tool_basename", so it can be a program name with args.
45223set dummy $tool_basename; ac_word=$2
45224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45225$as_echo_n "checking for $ac_word... " >&6; }
45226if ${ac_cv_path_BUILD_NM+:} false; then :
45227  $as_echo_n "(cached) " >&6
45228else
45229  case $BUILD_NM in
45230  [\\/]* | ?:[\\/]*)
45231  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45232  ;;
45233  *)
45234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45235for as_dir in $PATH
45236do
45237  IFS=$as_save_IFS
45238  test -z "$as_dir" && as_dir=.
45239    for ac_exec_ext in '' $ac_executable_extensions; do
45240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45241    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45243    break 2
45244  fi
45245done
45246  done
45247IFS=$as_save_IFS
45248
45249  ;;
45250esac
45251fi
45252BUILD_NM=$ac_cv_path_BUILD_NM
45253if test -n "$BUILD_NM"; then
45254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45255$as_echo "$BUILD_NM" >&6; }
45256else
45257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45258$as_echo "no" >&6; }
45259fi
45260
45261
45262          if test "x$BUILD_NM" = x; then
45263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45264          fi
45265        else
45266          # Otherwise we believe it is a complete path. Use it as it is.
45267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45268$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45270$as_echo_n "checking for BUILD_NM... " >&6; }
45271          if test ! -x "$tool_specified"; then
45272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45273$as_echo "not found" >&6; }
45274            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45275          fi
45276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45277$as_echo "$tool_specified" >&6; }
45278        fi
45279      fi
45280    fi
45281
45282  fi
45283
45284
45285
45286  # Only process if variable expands to non-empty
45287
45288  if test "x$BUILD_NM" != x; then
45289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45290
45291  # First separate the path from the arguments. This will split at the first
45292  # space.
45293  complete="$BUILD_NM"
45294  path="${complete%% *}"
45295  tmp="$complete EOL"
45296  arguments="${tmp#* }"
45297
45298  # Input might be given as Windows format, start by converting to
45299  # unix format.
45300  new_path=`$CYGPATH -u "$path"`
45301
45302  # Now try to locate executable using which
45303  new_path=`$WHICH "$new_path" 2> /dev/null`
45304  # bat and cmd files are not always considered executable in cygwin causing which
45305  # to not find them
45306  if test "x$new_path" = x \
45307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45309    new_path=`$CYGPATH -u "$path"`
45310  fi
45311  if test "x$new_path" = x; then
45312    # Oops. Which didn't find the executable.
45313    # The splitting of arguments from the executable at a space might have been incorrect,
45314    # since paths with space are more likely in Windows. Give it another try with the whole
45315    # argument.
45316    path="$complete"
45317    arguments="EOL"
45318    new_path=`$CYGPATH -u "$path"`
45319    new_path=`$WHICH "$new_path" 2> /dev/null`
45320    # bat and cmd files are not always considered executable in cygwin causing which
45321    # to not find them
45322    if test "x$new_path" = x \
45323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45325      new_path=`$CYGPATH -u "$path"`
45326    fi
45327    if test "x$new_path" = x; then
45328      # It's still not found. Now this is an unrecoverable error.
45329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45330$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45331      has_space=`$ECHO "$complete" | $GREP " "`
45332      if test "x$has_space" != x; then
45333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45335      fi
45336      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45337    fi
45338  fi
45339
45340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45343  # "foo.exe" is OK but "foo" is an error.
45344  #
45345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45346  # It is also a way to make sure we got the proper file name for the real test later on.
45347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45348  if test "x$test_shortpath" = x; then
45349    # Short path failed, file does not exist as specified.
45350    # Try adding .exe or .cmd
45351    if test -f "${new_path}.exe"; then
45352      input_to_shortpath="${new_path}.exe"
45353    elif test -f "${new_path}.cmd"; then
45354      input_to_shortpath="${new_path}.cmd"
45355    else
45356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45357$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45360      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45361    fi
45362  else
45363    input_to_shortpath="$new_path"
45364  fi
45365
45366  # Call helper function which possibly converts this using DOS-style short mode.
45367  # If so, the updated path is stored in $new_path.
45368  new_path="$input_to_shortpath"
45369
45370  input_path="$input_to_shortpath"
45371  # Check if we need to convert this using DOS-style short mode. If the path
45372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45373  # take no chances and rewrite it.
45374  # Note: m4 eats our [], so we need to use [ and ] instead.
45375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45376  if test "x$has_forbidden_chars" != x; then
45377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45381      # Going to short mode and back again did indeed matter. Since short mode is
45382      # case insensitive, let's make it lowercase to improve readability.
45383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45384      # Now convert it back to Unix-style (cygpath)
45385      input_path=`$CYGPATH -u "$shortmode_path"`
45386      new_path="$input_path"
45387    fi
45388  fi
45389
45390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45391  if test "x$test_cygdrive_prefix" = x; then
45392    # As a simple fix, exclude /usr/bin since it's not a real path.
45393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45395      # a path prefixed by /cygdrive for fixpath to work.
45396      new_path="$CYGWIN_ROOT_PATH$input_path"
45397    fi
45398  fi
45399
45400  # remove trailing .exe if any
45401  new_path="${new_path/%.exe/}"
45402
45403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45404
45405  # First separate the path from the arguments. This will split at the first
45406  # space.
45407  complete="$BUILD_NM"
45408  path="${complete%% *}"
45409  tmp="$complete EOL"
45410  arguments="${tmp#* }"
45411
45412  # Input might be given as Windows format, start by converting to
45413  # unix format.
45414  new_path="$path"
45415
45416  windows_path="$new_path"
45417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45418    unix_path=`$CYGPATH -u "$windows_path"`
45419    new_path="$unix_path"
45420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45422    new_path="$unix_path"
45423  fi
45424
45425
45426  # Now try to locate executable using which
45427  new_path=`$WHICH "$new_path" 2> /dev/null`
45428
45429  if test "x$new_path" = x; then
45430    # Oops. Which didn't find the executable.
45431    # The splitting of arguments from the executable at a space might have been incorrect,
45432    # since paths with space are more likely in Windows. Give it another try with the whole
45433    # argument.
45434    path="$complete"
45435    arguments="EOL"
45436    new_path="$path"
45437
45438  windows_path="$new_path"
45439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45440    unix_path=`$CYGPATH -u "$windows_path"`
45441    new_path="$unix_path"
45442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45444    new_path="$unix_path"
45445  fi
45446
45447
45448    new_path=`$WHICH "$new_path" 2> /dev/null`
45449    # bat and cmd files are not always considered executable in MSYS causing which
45450    # to not find them
45451    if test "x$new_path" = x \
45452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45454      new_path="$path"
45455
45456  windows_path="$new_path"
45457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458    unix_path=`$CYGPATH -u "$windows_path"`
45459    new_path="$unix_path"
45460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45462    new_path="$unix_path"
45463  fi
45464
45465    fi
45466
45467    if test "x$new_path" = x; then
45468      # It's still not found. Now this is an unrecoverable error.
45469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45470$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45471      has_space=`$ECHO "$complete" | $GREP " "`
45472      if test "x$has_space" != x; then
45473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45475      fi
45476      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45477    fi
45478  fi
45479
45480  # Now new_path has a complete unix path to the binary
45481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45482    # Keep paths in /bin as-is, but remove trailing .exe if any
45483    new_path="${new_path/%.exe/}"
45484    # Do not save /bin paths to all_fixpath_prefixes!
45485  else
45486    # Not in mixed or Windows style, start by that.
45487    new_path=`cmd //c echo $new_path`
45488
45489  input_path="$new_path"
45490  # Check if we need to convert this using DOS-style short mode. If the path
45491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45492  # take no chances and rewrite it.
45493  # Note: m4 eats our [], so we need to use [ and ] instead.
45494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45495  if test "x$has_forbidden_chars" != x; then
45496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45498  fi
45499
45500    # Output is in $new_path
45501
45502  windows_path="$new_path"
45503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45504    unix_path=`$CYGPATH -u "$windows_path"`
45505    new_path="$unix_path"
45506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45508    new_path="$unix_path"
45509  fi
45510
45511    # remove trailing .exe if any
45512    new_path="${new_path/%.exe/}"
45513
45514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45516  fi
45517
45518    else
45519      # We're on a unix platform. Hooray! :)
45520      # First separate the path from the arguments. This will split at the first
45521      # space.
45522      complete="$BUILD_NM"
45523      path="${complete%% *}"
45524      tmp="$complete EOL"
45525      arguments="${tmp#* }"
45526
45527      # Cannot rely on the command "which" here since it doesn't always work.
45528      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45529      if test -z "$is_absolute_path"; then
45530        # Path to executable is not absolute. Find it.
45531        IFS_save="$IFS"
45532        IFS=:
45533        for p in $PATH; do
45534          if test -f "$p/$path" && test -x "$p/$path"; then
45535            new_path="$p/$path"
45536            break
45537          fi
45538        done
45539        IFS="$IFS_save"
45540      else
45541        # This is an absolute path, we can use it without further modifications.
45542        new_path="$path"
45543      fi
45544
45545      if test "x$new_path" = x; then
45546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45547$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45548        has_space=`$ECHO "$complete" | $GREP " "`
45549        if test "x$has_space" != x; then
45550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45552        fi
45553        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45554      fi
45555    fi
45556
45557    # Now join together the path and the arguments once again
45558    if test "x$arguments" != xEOL; then
45559      new_complete="$new_path ${arguments% *}"
45560    else
45561      new_complete="$new_path"
45562    fi
45563
45564    if test "x$complete" != "x$new_complete"; then
45565      BUILD_NM="$new_complete"
45566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45567$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45568    fi
45569  fi
45570
45571
45572
45573  # Publish this variable in the help.
45574
45575
45576  if [ -z "${BUILD_AR+x}" ]; then
45577    # The variable is not set by user, try to locate tool using the code snippet
45578    for ac_prog in ar gcc-ar
45579do
45580  # Extract the first word of "$ac_prog", so it can be a program name with args.
45581set dummy $ac_prog; ac_word=$2
45582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45583$as_echo_n "checking for $ac_word... " >&6; }
45584if ${ac_cv_path_BUILD_AR+:} false; then :
45585  $as_echo_n "(cached) " >&6
45586else
45587  case $BUILD_AR in
45588  [\\/]* | ?:[\\/]*)
45589  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45590  ;;
45591  *)
45592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45593for as_dir in $PATH
45594do
45595  IFS=$as_save_IFS
45596  test -z "$as_dir" && as_dir=.
45597    for ac_exec_ext in '' $ac_executable_extensions; do
45598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45599    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45601    break 2
45602  fi
45603done
45604  done
45605IFS=$as_save_IFS
45606
45607  ;;
45608esac
45609fi
45610BUILD_AR=$ac_cv_path_BUILD_AR
45611if test -n "$BUILD_AR"; then
45612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45613$as_echo "$BUILD_AR" >&6; }
45614else
45615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45616$as_echo "no" >&6; }
45617fi
45618
45619
45620  test -n "$BUILD_AR" && break
45621done
45622
45623  else
45624    # The variable is set, but is it from the command line or the environment?
45625
45626    # Try to remove the string !BUILD_AR! from our list.
45627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45629      # If it failed, the variable was not from the command line. Ignore it,
45630      # but warn the user (except for BASH, which is always set by the calling BASH).
45631      if test "xBUILD_AR" != xBASH; then
45632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45633$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45634      fi
45635      # Try to locate tool using the code snippet
45636      for ac_prog in ar gcc-ar
45637do
45638  # Extract the first word of "$ac_prog", so it can be a program name with args.
45639set dummy $ac_prog; ac_word=$2
45640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45641$as_echo_n "checking for $ac_word... " >&6; }
45642if ${ac_cv_path_BUILD_AR+:} false; then :
45643  $as_echo_n "(cached) " >&6
45644else
45645  case $BUILD_AR in
45646  [\\/]* | ?:[\\/]*)
45647  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45648  ;;
45649  *)
45650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45651for as_dir in $PATH
45652do
45653  IFS=$as_save_IFS
45654  test -z "$as_dir" && as_dir=.
45655    for ac_exec_ext in '' $ac_executable_extensions; do
45656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45657    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45659    break 2
45660  fi
45661done
45662  done
45663IFS=$as_save_IFS
45664
45665  ;;
45666esac
45667fi
45668BUILD_AR=$ac_cv_path_BUILD_AR
45669if test -n "$BUILD_AR"; then
45670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45671$as_echo "$BUILD_AR" >&6; }
45672else
45673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45674$as_echo "no" >&6; }
45675fi
45676
45677
45678  test -n "$BUILD_AR" && break
45679done
45680
45681    else
45682      # If it succeeded, then it was overridden by the user. We will use it
45683      # for the tool.
45684
45685      # First remove it from the list of overridden variables, so we can test
45686      # for unknown variables in the end.
45687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45688
45689      # Check if we try to supply an empty value
45690      if test "x$BUILD_AR" = x; then
45691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45692$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45694$as_echo_n "checking for BUILD_AR... " >&6; }
45695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45696$as_echo "disabled" >&6; }
45697      else
45698        # Check if the provided tool contains a complete path.
45699        tool_specified="$BUILD_AR"
45700        tool_basename="${tool_specified##*/}"
45701        if test "x$tool_basename" = "x$tool_specified"; then
45702          # A command without a complete path is provided, search $PATH.
45703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45704$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45705          # Extract the first word of "$tool_basename", so it can be a program name with args.
45706set dummy $tool_basename; ac_word=$2
45707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45708$as_echo_n "checking for $ac_word... " >&6; }
45709if ${ac_cv_path_BUILD_AR+:} false; then :
45710  $as_echo_n "(cached) " >&6
45711else
45712  case $BUILD_AR in
45713  [\\/]* | ?:[\\/]*)
45714  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45715  ;;
45716  *)
45717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45718for as_dir in $PATH
45719do
45720  IFS=$as_save_IFS
45721  test -z "$as_dir" && as_dir=.
45722    for ac_exec_ext in '' $ac_executable_extensions; do
45723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45724    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45726    break 2
45727  fi
45728done
45729  done
45730IFS=$as_save_IFS
45731
45732  ;;
45733esac
45734fi
45735BUILD_AR=$ac_cv_path_BUILD_AR
45736if test -n "$BUILD_AR"; then
45737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45738$as_echo "$BUILD_AR" >&6; }
45739else
45740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45741$as_echo "no" >&6; }
45742fi
45743
45744
45745          if test "x$BUILD_AR" = x; then
45746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45747          fi
45748        else
45749          # Otherwise we believe it is a complete path. Use it as it is.
45750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45751$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45753$as_echo_n "checking for BUILD_AR... " >&6; }
45754          if test ! -x "$tool_specified"; then
45755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45756$as_echo "not found" >&6; }
45757            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45758          fi
45759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45760$as_echo "$tool_specified" >&6; }
45761        fi
45762      fi
45763    fi
45764
45765  fi
45766
45767
45768
45769  # Only process if variable expands to non-empty
45770
45771  if test "x$BUILD_AR" != x; then
45772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45773
45774  # First separate the path from the arguments. This will split at the first
45775  # space.
45776  complete="$BUILD_AR"
45777  path="${complete%% *}"
45778  tmp="$complete EOL"
45779  arguments="${tmp#* }"
45780
45781  # Input might be given as Windows format, start by converting to
45782  # unix format.
45783  new_path=`$CYGPATH -u "$path"`
45784
45785  # Now try to locate executable using which
45786  new_path=`$WHICH "$new_path" 2> /dev/null`
45787  # bat and cmd files are not always considered executable in cygwin causing which
45788  # to not find them
45789  if test "x$new_path" = x \
45790      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45791      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45792    new_path=`$CYGPATH -u "$path"`
45793  fi
45794  if test "x$new_path" = x; then
45795    # Oops. Which didn't find the executable.
45796    # The splitting of arguments from the executable at a space might have been incorrect,
45797    # since paths with space are more likely in Windows. Give it another try with the whole
45798    # argument.
45799    path="$complete"
45800    arguments="EOL"
45801    new_path=`$CYGPATH -u "$path"`
45802    new_path=`$WHICH "$new_path" 2> /dev/null`
45803    # bat and cmd files are not always considered executable in cygwin causing which
45804    # to not find them
45805    if test "x$new_path" = x \
45806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45808      new_path=`$CYGPATH -u "$path"`
45809    fi
45810    if test "x$new_path" = x; then
45811      # It's still not found. Now this is an unrecoverable error.
45812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45813$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45814      has_space=`$ECHO "$complete" | $GREP " "`
45815      if test "x$has_space" != x; then
45816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45818      fi
45819      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45820    fi
45821  fi
45822
45823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45826  # "foo.exe" is OK but "foo" is an error.
45827  #
45828  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45829  # It is also a way to make sure we got the proper file name for the real test later on.
45830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45831  if test "x$test_shortpath" = x; then
45832    # Short path failed, file does not exist as specified.
45833    # Try adding .exe or .cmd
45834    if test -f "${new_path}.exe"; then
45835      input_to_shortpath="${new_path}.exe"
45836    elif test -f "${new_path}.cmd"; then
45837      input_to_shortpath="${new_path}.cmd"
45838    else
45839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45840$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45841      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45842$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45843      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45844    fi
45845  else
45846    input_to_shortpath="$new_path"
45847  fi
45848
45849  # Call helper function which possibly converts this using DOS-style short mode.
45850  # If so, the updated path is stored in $new_path.
45851  new_path="$input_to_shortpath"
45852
45853  input_path="$input_to_shortpath"
45854  # Check if we need to convert this using DOS-style short mode. If the path
45855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45856  # take no chances and rewrite it.
45857  # Note: m4 eats our [], so we need to use [ and ] instead.
45858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45859  if test "x$has_forbidden_chars" != x; then
45860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45864      # Going to short mode and back again did indeed matter. Since short mode is
45865      # case insensitive, let's make it lowercase to improve readability.
45866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45867      # Now convert it back to Unix-style (cygpath)
45868      input_path=`$CYGPATH -u "$shortmode_path"`
45869      new_path="$input_path"
45870    fi
45871  fi
45872
45873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45874  if test "x$test_cygdrive_prefix" = x; then
45875    # As a simple fix, exclude /usr/bin since it's not a real path.
45876    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45878      # a path prefixed by /cygdrive for fixpath to work.
45879      new_path="$CYGWIN_ROOT_PATH$input_path"
45880    fi
45881  fi
45882
45883  # remove trailing .exe if any
45884  new_path="${new_path/%.exe/}"
45885
45886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887
45888  # First separate the path from the arguments. This will split at the first
45889  # space.
45890  complete="$BUILD_AR"
45891  path="${complete%% *}"
45892  tmp="$complete EOL"
45893  arguments="${tmp#* }"
45894
45895  # Input might be given as Windows format, start by converting to
45896  # unix format.
45897  new_path="$path"
45898
45899  windows_path="$new_path"
45900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45901    unix_path=`$CYGPATH -u "$windows_path"`
45902    new_path="$unix_path"
45903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45905    new_path="$unix_path"
45906  fi
45907
45908
45909  # Now try to locate executable using which
45910  new_path=`$WHICH "$new_path" 2> /dev/null`
45911
45912  if test "x$new_path" = x; then
45913    # Oops. Which didn't find the executable.
45914    # The splitting of arguments from the executable at a space might have been incorrect,
45915    # since paths with space are more likely in Windows. Give it another try with the whole
45916    # argument.
45917    path="$complete"
45918    arguments="EOL"
45919    new_path="$path"
45920
45921  windows_path="$new_path"
45922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45923    unix_path=`$CYGPATH -u "$windows_path"`
45924    new_path="$unix_path"
45925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45927    new_path="$unix_path"
45928  fi
45929
45930
45931    new_path=`$WHICH "$new_path" 2> /dev/null`
45932    # bat and cmd files are not always considered executable in MSYS causing which
45933    # to not find them
45934    if test "x$new_path" = x \
45935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45937      new_path="$path"
45938
45939  windows_path="$new_path"
45940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45941    unix_path=`$CYGPATH -u "$windows_path"`
45942    new_path="$unix_path"
45943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45945    new_path="$unix_path"
45946  fi
45947
45948    fi
45949
45950    if test "x$new_path" = x; then
45951      # It's still not found. Now this is an unrecoverable error.
45952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45953$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45954      has_space=`$ECHO "$complete" | $GREP " "`
45955      if test "x$has_space" != x; then
45956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45958      fi
45959      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45960    fi
45961  fi
45962
45963  # Now new_path has a complete unix path to the binary
45964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45965    # Keep paths in /bin as-is, but remove trailing .exe if any
45966    new_path="${new_path/%.exe/}"
45967    # Do not save /bin paths to all_fixpath_prefixes!
45968  else
45969    # Not in mixed or Windows style, start by that.
45970    new_path=`cmd //c echo $new_path`
45971
45972  input_path="$new_path"
45973  # Check if we need to convert this using DOS-style short mode. If the path
45974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45975  # take no chances and rewrite it.
45976  # Note: m4 eats our [], so we need to use [ and ] instead.
45977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45978  if test "x$has_forbidden_chars" != x; then
45979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45981  fi
45982
45983    # Output is in $new_path
45984
45985  windows_path="$new_path"
45986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45987    unix_path=`$CYGPATH -u "$windows_path"`
45988    new_path="$unix_path"
45989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45991    new_path="$unix_path"
45992  fi
45993
45994    # remove trailing .exe if any
45995    new_path="${new_path/%.exe/}"
45996
45997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45999  fi
46000
46001    else
46002      # We're on a unix platform. Hooray! :)
46003      # First separate the path from the arguments. This will split at the first
46004      # space.
46005      complete="$BUILD_AR"
46006      path="${complete%% *}"
46007      tmp="$complete EOL"
46008      arguments="${tmp#* }"
46009
46010      # Cannot rely on the command "which" here since it doesn't always work.
46011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46012      if test -z "$is_absolute_path"; then
46013        # Path to executable is not absolute. Find it.
46014        IFS_save="$IFS"
46015        IFS=:
46016        for p in $PATH; do
46017          if test -f "$p/$path" && test -x "$p/$path"; then
46018            new_path="$p/$path"
46019            break
46020          fi
46021        done
46022        IFS="$IFS_save"
46023      else
46024        # This is an absolute path, we can use it without further modifications.
46025        new_path="$path"
46026      fi
46027
46028      if test "x$new_path" = x; then
46029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46030$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46031        has_space=`$ECHO "$complete" | $GREP " "`
46032        if test "x$has_space" != x; then
46033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46035        fi
46036        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46037      fi
46038    fi
46039
46040    # Now join together the path and the arguments once again
46041    if test "x$arguments" != xEOL; then
46042      new_complete="$new_path ${arguments% *}"
46043    else
46044      new_complete="$new_path"
46045    fi
46046
46047    if test "x$complete" != "x$new_complete"; then
46048      BUILD_AR="$new_complete"
46049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46050$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46051    fi
46052  fi
46053
46054
46055
46056  # Publish this variable in the help.
46057
46058
46059  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46060    # The variable is not set by user, try to locate tool using the code snippet
46061    for ac_prog in objcopy
46062do
46063  # Extract the first word of "$ac_prog", so it can be a program name with args.
46064set dummy $ac_prog; ac_word=$2
46065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46066$as_echo_n "checking for $ac_word... " >&6; }
46067if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46068  $as_echo_n "(cached) " >&6
46069else
46070  case $BUILD_OBJCOPY in
46071  [\\/]* | ?:[\\/]*)
46072  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46073  ;;
46074  *)
46075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46076for as_dir in $PATH
46077do
46078  IFS=$as_save_IFS
46079  test -z "$as_dir" && as_dir=.
46080    for ac_exec_ext in '' $ac_executable_extensions; do
46081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46082    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46084    break 2
46085  fi
46086done
46087  done
46088IFS=$as_save_IFS
46089
46090  ;;
46091esac
46092fi
46093BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46094if test -n "$BUILD_OBJCOPY"; then
46095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46096$as_echo "$BUILD_OBJCOPY" >&6; }
46097else
46098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46099$as_echo "no" >&6; }
46100fi
46101
46102
46103  test -n "$BUILD_OBJCOPY" && break
46104done
46105
46106  else
46107    # The variable is set, but is it from the command line or the environment?
46108
46109    # Try to remove the string !BUILD_OBJCOPY! from our list.
46110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46112      # If it failed, the variable was not from the command line. Ignore it,
46113      # but warn the user (except for BASH, which is always set by the calling BASH).
46114      if test "xBUILD_OBJCOPY" != xBASH; then
46115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46116$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46117      fi
46118      # Try to locate tool using the code snippet
46119      for ac_prog in objcopy
46120do
46121  # Extract the first word of "$ac_prog", so it can be a program name with args.
46122set dummy $ac_prog; ac_word=$2
46123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46124$as_echo_n "checking for $ac_word... " >&6; }
46125if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46126  $as_echo_n "(cached) " >&6
46127else
46128  case $BUILD_OBJCOPY in
46129  [\\/]* | ?:[\\/]*)
46130  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46131  ;;
46132  *)
46133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46134for as_dir in $PATH
46135do
46136  IFS=$as_save_IFS
46137  test -z "$as_dir" && as_dir=.
46138    for ac_exec_ext in '' $ac_executable_extensions; do
46139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46140    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46142    break 2
46143  fi
46144done
46145  done
46146IFS=$as_save_IFS
46147
46148  ;;
46149esac
46150fi
46151BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46152if test -n "$BUILD_OBJCOPY"; then
46153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46154$as_echo "$BUILD_OBJCOPY" >&6; }
46155else
46156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46157$as_echo "no" >&6; }
46158fi
46159
46160
46161  test -n "$BUILD_OBJCOPY" && break
46162done
46163
46164    else
46165      # If it succeeded, then it was overridden by the user. We will use it
46166      # for the tool.
46167
46168      # First remove it from the list of overridden variables, so we can test
46169      # for unknown variables in the end.
46170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46171
46172      # Check if we try to supply an empty value
46173      if test "x$BUILD_OBJCOPY" = x; then
46174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46175$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46177$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46179$as_echo "disabled" >&6; }
46180      else
46181        # Check if the provided tool contains a complete path.
46182        tool_specified="$BUILD_OBJCOPY"
46183        tool_basename="${tool_specified##*/}"
46184        if test "x$tool_basename" = "x$tool_specified"; then
46185          # A command without a complete path is provided, search $PATH.
46186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46187$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46188          # Extract the first word of "$tool_basename", so it can be a program name with args.
46189set dummy $tool_basename; ac_word=$2
46190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46191$as_echo_n "checking for $ac_word... " >&6; }
46192if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46193  $as_echo_n "(cached) " >&6
46194else
46195  case $BUILD_OBJCOPY in
46196  [\\/]* | ?:[\\/]*)
46197  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46198  ;;
46199  *)
46200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46201for as_dir in $PATH
46202do
46203  IFS=$as_save_IFS
46204  test -z "$as_dir" && as_dir=.
46205    for ac_exec_ext in '' $ac_executable_extensions; do
46206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46207    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46209    break 2
46210  fi
46211done
46212  done
46213IFS=$as_save_IFS
46214
46215  ;;
46216esac
46217fi
46218BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46219if test -n "$BUILD_OBJCOPY"; then
46220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46221$as_echo "$BUILD_OBJCOPY" >&6; }
46222else
46223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46224$as_echo "no" >&6; }
46225fi
46226
46227
46228          if test "x$BUILD_OBJCOPY" = x; then
46229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46230          fi
46231        else
46232          # Otherwise we believe it is a complete path. Use it as it is.
46233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46234$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46236$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46237          if test ! -x "$tool_specified"; then
46238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46239$as_echo "not found" >&6; }
46240            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46241          fi
46242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46243$as_echo "$tool_specified" >&6; }
46244        fi
46245      fi
46246    fi
46247
46248  fi
46249
46250
46251
46252  # Only process if variable expands to non-empty
46253
46254  if test "x$BUILD_OBJCOPY" != x; then
46255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46256
46257  # First separate the path from the arguments. This will split at the first
46258  # space.
46259  complete="$BUILD_OBJCOPY"
46260  path="${complete%% *}"
46261  tmp="$complete EOL"
46262  arguments="${tmp#* }"
46263
46264  # Input might be given as Windows format, start by converting to
46265  # unix format.
46266  new_path=`$CYGPATH -u "$path"`
46267
46268  # Now try to locate executable using which
46269  new_path=`$WHICH "$new_path" 2> /dev/null`
46270  # bat and cmd files are not always considered executable in cygwin causing which
46271  # to not find them
46272  if test "x$new_path" = x \
46273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46275    new_path=`$CYGPATH -u "$path"`
46276  fi
46277  if test "x$new_path" = x; then
46278    # Oops. Which didn't find the executable.
46279    # The splitting of arguments from the executable at a space might have been incorrect,
46280    # since paths with space are more likely in Windows. Give it another try with the whole
46281    # argument.
46282    path="$complete"
46283    arguments="EOL"
46284    new_path=`$CYGPATH -u "$path"`
46285    new_path=`$WHICH "$new_path" 2> /dev/null`
46286    # bat and cmd files are not always considered executable in cygwin causing which
46287    # to not find them
46288    if test "x$new_path" = x \
46289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46291      new_path=`$CYGPATH -u "$path"`
46292    fi
46293    if test "x$new_path" = x; then
46294      # It's still not found. Now this is an unrecoverable error.
46295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46296$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46297      has_space=`$ECHO "$complete" | $GREP " "`
46298      if test "x$has_space" != x; then
46299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46301      fi
46302      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46303    fi
46304  fi
46305
46306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46309  # "foo.exe" is OK but "foo" is an error.
46310  #
46311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46312  # It is also a way to make sure we got the proper file name for the real test later on.
46313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46314  if test "x$test_shortpath" = x; then
46315    # Short path failed, file does not exist as specified.
46316    # Try adding .exe or .cmd
46317    if test -f "${new_path}.exe"; then
46318      input_to_shortpath="${new_path}.exe"
46319    elif test -f "${new_path}.cmd"; then
46320      input_to_shortpath="${new_path}.cmd"
46321    else
46322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46323$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46326      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46327    fi
46328  else
46329    input_to_shortpath="$new_path"
46330  fi
46331
46332  # Call helper function which possibly converts this using DOS-style short mode.
46333  # If so, the updated path is stored in $new_path.
46334  new_path="$input_to_shortpath"
46335
46336  input_path="$input_to_shortpath"
46337  # Check if we need to convert this using DOS-style short mode. If the path
46338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46339  # take no chances and rewrite it.
46340  # Note: m4 eats our [], so we need to use [ and ] instead.
46341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46342  if test "x$has_forbidden_chars" != x; then
46343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46347      # Going to short mode and back again did indeed matter. Since short mode is
46348      # case insensitive, let's make it lowercase to improve readability.
46349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46350      # Now convert it back to Unix-style (cygpath)
46351      input_path=`$CYGPATH -u "$shortmode_path"`
46352      new_path="$input_path"
46353    fi
46354  fi
46355
46356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46357  if test "x$test_cygdrive_prefix" = x; then
46358    # As a simple fix, exclude /usr/bin since it's not a real path.
46359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46361      # a path prefixed by /cygdrive for fixpath to work.
46362      new_path="$CYGWIN_ROOT_PATH$input_path"
46363    fi
46364  fi
46365
46366  # remove trailing .exe if any
46367  new_path="${new_path/%.exe/}"
46368
46369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370
46371  # First separate the path from the arguments. This will split at the first
46372  # space.
46373  complete="$BUILD_OBJCOPY"
46374  path="${complete%% *}"
46375  tmp="$complete EOL"
46376  arguments="${tmp#* }"
46377
46378  # Input might be given as Windows format, start by converting to
46379  # unix format.
46380  new_path="$path"
46381
46382  windows_path="$new_path"
46383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46384    unix_path=`$CYGPATH -u "$windows_path"`
46385    new_path="$unix_path"
46386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46388    new_path="$unix_path"
46389  fi
46390
46391
46392  # Now try to locate executable using which
46393  new_path=`$WHICH "$new_path" 2> /dev/null`
46394
46395  if test "x$new_path" = x; then
46396    # Oops. Which didn't find the executable.
46397    # The splitting of arguments from the executable at a space might have been incorrect,
46398    # since paths with space are more likely in Windows. Give it another try with the whole
46399    # argument.
46400    path="$complete"
46401    arguments="EOL"
46402    new_path="$path"
46403
46404  windows_path="$new_path"
46405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46406    unix_path=`$CYGPATH -u "$windows_path"`
46407    new_path="$unix_path"
46408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46410    new_path="$unix_path"
46411  fi
46412
46413
46414    new_path=`$WHICH "$new_path" 2> /dev/null`
46415    # bat and cmd files are not always considered executable in MSYS causing which
46416    # to not find them
46417    if test "x$new_path" = x \
46418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46420      new_path="$path"
46421
46422  windows_path="$new_path"
46423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46424    unix_path=`$CYGPATH -u "$windows_path"`
46425    new_path="$unix_path"
46426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46428    new_path="$unix_path"
46429  fi
46430
46431    fi
46432
46433    if test "x$new_path" = x; then
46434      # It's still not found. Now this is an unrecoverable error.
46435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46436$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46437      has_space=`$ECHO "$complete" | $GREP " "`
46438      if test "x$has_space" != x; then
46439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46441      fi
46442      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46443    fi
46444  fi
46445
46446  # Now new_path has a complete unix path to the binary
46447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46448    # Keep paths in /bin as-is, but remove trailing .exe if any
46449    new_path="${new_path/%.exe/}"
46450    # Do not save /bin paths to all_fixpath_prefixes!
46451  else
46452    # Not in mixed or Windows style, start by that.
46453    new_path=`cmd //c echo $new_path`
46454
46455  input_path="$new_path"
46456  # Check if we need to convert this using DOS-style short mode. If the path
46457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46458  # take no chances and rewrite it.
46459  # Note: m4 eats our [], so we need to use [ and ] instead.
46460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46461  if test "x$has_forbidden_chars" != x; then
46462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46464  fi
46465
46466    # Output is in $new_path
46467
46468  windows_path="$new_path"
46469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46470    unix_path=`$CYGPATH -u "$windows_path"`
46471    new_path="$unix_path"
46472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46474    new_path="$unix_path"
46475  fi
46476
46477    # remove trailing .exe if any
46478    new_path="${new_path/%.exe/}"
46479
46480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46482  fi
46483
46484    else
46485      # We're on a unix platform. Hooray! :)
46486      # First separate the path from the arguments. This will split at the first
46487      # space.
46488      complete="$BUILD_OBJCOPY"
46489      path="${complete%% *}"
46490      tmp="$complete EOL"
46491      arguments="${tmp#* }"
46492
46493      # Cannot rely on the command "which" here since it doesn't always work.
46494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46495      if test -z "$is_absolute_path"; then
46496        # Path to executable is not absolute. Find it.
46497        IFS_save="$IFS"
46498        IFS=:
46499        for p in $PATH; do
46500          if test -f "$p/$path" && test -x "$p/$path"; then
46501            new_path="$p/$path"
46502            break
46503          fi
46504        done
46505        IFS="$IFS_save"
46506      else
46507        # This is an absolute path, we can use it without further modifications.
46508        new_path="$path"
46509      fi
46510
46511      if test "x$new_path" = x; then
46512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46513$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46514        has_space=`$ECHO "$complete" | $GREP " "`
46515        if test "x$has_space" != x; then
46516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46518        fi
46519        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46520      fi
46521    fi
46522
46523    # Now join together the path and the arguments once again
46524    if test "x$arguments" != xEOL; then
46525      new_complete="$new_path ${arguments% *}"
46526    else
46527      new_complete="$new_path"
46528    fi
46529
46530    if test "x$complete" != "x$new_complete"; then
46531      BUILD_OBJCOPY="$new_complete"
46532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46533$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46534    fi
46535  fi
46536
46537
46538
46539  # Publish this variable in the help.
46540
46541
46542  if [ -z "${BUILD_STRIP+x}" ]; then
46543    # The variable is not set by user, try to locate tool using the code snippet
46544    for ac_prog in strip
46545do
46546  # Extract the first word of "$ac_prog", so it can be a program name with args.
46547set dummy $ac_prog; ac_word=$2
46548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46549$as_echo_n "checking for $ac_word... " >&6; }
46550if ${ac_cv_path_BUILD_STRIP+:} false; then :
46551  $as_echo_n "(cached) " >&6
46552else
46553  case $BUILD_STRIP in
46554  [\\/]* | ?:[\\/]*)
46555  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46556  ;;
46557  *)
46558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46559for as_dir in $PATH
46560do
46561  IFS=$as_save_IFS
46562  test -z "$as_dir" && as_dir=.
46563    for ac_exec_ext in '' $ac_executable_extensions; do
46564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46565    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46567    break 2
46568  fi
46569done
46570  done
46571IFS=$as_save_IFS
46572
46573  ;;
46574esac
46575fi
46576BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46577if test -n "$BUILD_STRIP"; then
46578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46579$as_echo "$BUILD_STRIP" >&6; }
46580else
46581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46582$as_echo "no" >&6; }
46583fi
46584
46585
46586  test -n "$BUILD_STRIP" && break
46587done
46588
46589  else
46590    # The variable is set, but is it from the command line or the environment?
46591
46592    # Try to remove the string !BUILD_STRIP! from our list.
46593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46595      # If it failed, the variable was not from the command line. Ignore it,
46596      # but warn the user (except for BASH, which is always set by the calling BASH).
46597      if test "xBUILD_STRIP" != xBASH; then
46598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46599$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46600      fi
46601      # Try to locate tool using the code snippet
46602      for ac_prog in strip
46603do
46604  # Extract the first word of "$ac_prog", so it can be a program name with args.
46605set dummy $ac_prog; ac_word=$2
46606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46607$as_echo_n "checking for $ac_word... " >&6; }
46608if ${ac_cv_path_BUILD_STRIP+:} false; then :
46609  $as_echo_n "(cached) " >&6
46610else
46611  case $BUILD_STRIP in
46612  [\\/]* | ?:[\\/]*)
46613  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46614  ;;
46615  *)
46616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46617for as_dir in $PATH
46618do
46619  IFS=$as_save_IFS
46620  test -z "$as_dir" && as_dir=.
46621    for ac_exec_ext in '' $ac_executable_extensions; do
46622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46623    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46625    break 2
46626  fi
46627done
46628  done
46629IFS=$as_save_IFS
46630
46631  ;;
46632esac
46633fi
46634BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46635if test -n "$BUILD_STRIP"; then
46636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46637$as_echo "$BUILD_STRIP" >&6; }
46638else
46639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46640$as_echo "no" >&6; }
46641fi
46642
46643
46644  test -n "$BUILD_STRIP" && break
46645done
46646
46647    else
46648      # If it succeeded, then it was overridden by the user. We will use it
46649      # for the tool.
46650
46651      # First remove it from the list of overridden variables, so we can test
46652      # for unknown variables in the end.
46653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46654
46655      # Check if we try to supply an empty value
46656      if test "x$BUILD_STRIP" = x; then
46657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46658$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46660$as_echo_n "checking for BUILD_STRIP... " >&6; }
46661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46662$as_echo "disabled" >&6; }
46663      else
46664        # Check if the provided tool contains a complete path.
46665        tool_specified="$BUILD_STRIP"
46666        tool_basename="${tool_specified##*/}"
46667        if test "x$tool_basename" = "x$tool_specified"; then
46668          # A command without a complete path is provided, search $PATH.
46669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46670$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46671          # Extract the first word of "$tool_basename", so it can be a program name with args.
46672set dummy $tool_basename; ac_word=$2
46673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46674$as_echo_n "checking for $ac_word... " >&6; }
46675if ${ac_cv_path_BUILD_STRIP+:} false; then :
46676  $as_echo_n "(cached) " >&6
46677else
46678  case $BUILD_STRIP in
46679  [\\/]* | ?:[\\/]*)
46680  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46681  ;;
46682  *)
46683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46684for as_dir in $PATH
46685do
46686  IFS=$as_save_IFS
46687  test -z "$as_dir" && as_dir=.
46688    for ac_exec_ext in '' $ac_executable_extensions; do
46689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46690    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46692    break 2
46693  fi
46694done
46695  done
46696IFS=$as_save_IFS
46697
46698  ;;
46699esac
46700fi
46701BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46702if test -n "$BUILD_STRIP"; then
46703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46704$as_echo "$BUILD_STRIP" >&6; }
46705else
46706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46707$as_echo "no" >&6; }
46708fi
46709
46710
46711          if test "x$BUILD_STRIP" = x; then
46712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46713          fi
46714        else
46715          # Otherwise we believe it is a complete path. Use it as it is.
46716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46717$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46719$as_echo_n "checking for BUILD_STRIP... " >&6; }
46720          if test ! -x "$tool_specified"; then
46721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46722$as_echo "not found" >&6; }
46723            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46724          fi
46725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46726$as_echo "$tool_specified" >&6; }
46727        fi
46728      fi
46729    fi
46730
46731  fi
46732
46733
46734
46735  # Only process if variable expands to non-empty
46736
46737  if test "x$BUILD_STRIP" != x; then
46738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46739
46740  # First separate the path from the arguments. This will split at the first
46741  # space.
46742  complete="$BUILD_STRIP"
46743  path="${complete%% *}"
46744  tmp="$complete EOL"
46745  arguments="${tmp#* }"
46746
46747  # Input might be given as Windows format, start by converting to
46748  # unix format.
46749  new_path=`$CYGPATH -u "$path"`
46750
46751  # Now try to locate executable using which
46752  new_path=`$WHICH "$new_path" 2> /dev/null`
46753  # bat and cmd files are not always considered executable in cygwin causing which
46754  # to not find them
46755  if test "x$new_path" = x \
46756      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46757      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46758    new_path=`$CYGPATH -u "$path"`
46759  fi
46760  if test "x$new_path" = x; then
46761    # Oops. Which didn't find the executable.
46762    # The splitting of arguments from the executable at a space might have been incorrect,
46763    # since paths with space are more likely in Windows. Give it another try with the whole
46764    # argument.
46765    path="$complete"
46766    arguments="EOL"
46767    new_path=`$CYGPATH -u "$path"`
46768    new_path=`$WHICH "$new_path" 2> /dev/null`
46769    # bat and cmd files are not always considered executable in cygwin causing which
46770    # to not find them
46771    if test "x$new_path" = x \
46772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46774      new_path=`$CYGPATH -u "$path"`
46775    fi
46776    if test "x$new_path" = x; then
46777      # It's still not found. Now this is an unrecoverable error.
46778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46779$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46780      has_space=`$ECHO "$complete" | $GREP " "`
46781      if test "x$has_space" != x; then
46782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46784      fi
46785      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46786    fi
46787  fi
46788
46789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46792  # "foo.exe" is OK but "foo" is an error.
46793  #
46794  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46795  # It is also a way to make sure we got the proper file name for the real test later on.
46796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46797  if test "x$test_shortpath" = x; then
46798    # Short path failed, file does not exist as specified.
46799    # Try adding .exe or .cmd
46800    if test -f "${new_path}.exe"; then
46801      input_to_shortpath="${new_path}.exe"
46802    elif test -f "${new_path}.cmd"; then
46803      input_to_shortpath="${new_path}.cmd"
46804    else
46805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46806$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46807      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46808$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46809      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46810    fi
46811  else
46812    input_to_shortpath="$new_path"
46813  fi
46814
46815  # Call helper function which possibly converts this using DOS-style short mode.
46816  # If so, the updated path is stored in $new_path.
46817  new_path="$input_to_shortpath"
46818
46819  input_path="$input_to_shortpath"
46820  # Check if we need to convert this using DOS-style short mode. If the path
46821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46822  # take no chances and rewrite it.
46823  # Note: m4 eats our [], so we need to use [ and ] instead.
46824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46825  if test "x$has_forbidden_chars" != x; then
46826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46830      # Going to short mode and back again did indeed matter. Since short mode is
46831      # case insensitive, let's make it lowercase to improve readability.
46832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46833      # Now convert it back to Unix-style (cygpath)
46834      input_path=`$CYGPATH -u "$shortmode_path"`
46835      new_path="$input_path"
46836    fi
46837  fi
46838
46839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46840  if test "x$test_cygdrive_prefix" = x; then
46841    # As a simple fix, exclude /usr/bin since it's not a real path.
46842    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46844      # a path prefixed by /cygdrive for fixpath to work.
46845      new_path="$CYGWIN_ROOT_PATH$input_path"
46846    fi
46847  fi
46848
46849  # remove trailing .exe if any
46850  new_path="${new_path/%.exe/}"
46851
46852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46853
46854  # First separate the path from the arguments. This will split at the first
46855  # space.
46856  complete="$BUILD_STRIP"
46857  path="${complete%% *}"
46858  tmp="$complete EOL"
46859  arguments="${tmp#* }"
46860
46861  # Input might be given as Windows format, start by converting to
46862  # unix format.
46863  new_path="$path"
46864
46865  windows_path="$new_path"
46866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46867    unix_path=`$CYGPATH -u "$windows_path"`
46868    new_path="$unix_path"
46869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46871    new_path="$unix_path"
46872  fi
46873
46874
46875  # Now try to locate executable using which
46876  new_path=`$WHICH "$new_path" 2> /dev/null`
46877
46878  if test "x$new_path" = x; then
46879    # Oops. Which didn't find the executable.
46880    # The splitting of arguments from the executable at a space might have been incorrect,
46881    # since paths with space are more likely in Windows. Give it another try with the whole
46882    # argument.
46883    path="$complete"
46884    arguments="EOL"
46885    new_path="$path"
46886
46887  windows_path="$new_path"
46888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889    unix_path=`$CYGPATH -u "$windows_path"`
46890    new_path="$unix_path"
46891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46893    new_path="$unix_path"
46894  fi
46895
46896
46897    new_path=`$WHICH "$new_path" 2> /dev/null`
46898    # bat and cmd files are not always considered executable in MSYS causing which
46899    # to not find them
46900    if test "x$new_path" = x \
46901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46903      new_path="$path"
46904
46905  windows_path="$new_path"
46906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46907    unix_path=`$CYGPATH -u "$windows_path"`
46908    new_path="$unix_path"
46909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46911    new_path="$unix_path"
46912  fi
46913
46914    fi
46915
46916    if test "x$new_path" = x; then
46917      # It's still not found. Now this is an unrecoverable error.
46918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46919$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46920      has_space=`$ECHO "$complete" | $GREP " "`
46921      if test "x$has_space" != x; then
46922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46924      fi
46925      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46926    fi
46927  fi
46928
46929  # Now new_path has a complete unix path to the binary
46930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46931    # Keep paths in /bin as-is, but remove trailing .exe if any
46932    new_path="${new_path/%.exe/}"
46933    # Do not save /bin paths to all_fixpath_prefixes!
46934  else
46935    # Not in mixed or Windows style, start by that.
46936    new_path=`cmd //c echo $new_path`
46937
46938  input_path="$new_path"
46939  # Check if we need to convert this using DOS-style short mode. If the path
46940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46941  # take no chances and rewrite it.
46942  # Note: m4 eats our [], so we need to use [ and ] instead.
46943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46944  if test "x$has_forbidden_chars" != x; then
46945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46947  fi
46948
46949    # Output is in $new_path
46950
46951  windows_path="$new_path"
46952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46953    unix_path=`$CYGPATH -u "$windows_path"`
46954    new_path="$unix_path"
46955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46957    new_path="$unix_path"
46958  fi
46959
46960    # remove trailing .exe if any
46961    new_path="${new_path/%.exe/}"
46962
46963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46965  fi
46966
46967    else
46968      # We're on a unix platform. Hooray! :)
46969      # First separate the path from the arguments. This will split at the first
46970      # space.
46971      complete="$BUILD_STRIP"
46972      path="${complete%% *}"
46973      tmp="$complete EOL"
46974      arguments="${tmp#* }"
46975
46976      # Cannot rely on the command "which" here since it doesn't always work.
46977      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46978      if test -z "$is_absolute_path"; then
46979        # Path to executable is not absolute. Find it.
46980        IFS_save="$IFS"
46981        IFS=:
46982        for p in $PATH; do
46983          if test -f "$p/$path" && test -x "$p/$path"; then
46984            new_path="$p/$path"
46985            break
46986          fi
46987        done
46988        IFS="$IFS_save"
46989      else
46990        # This is an absolute path, we can use it without further modifications.
46991        new_path="$path"
46992      fi
46993
46994      if test "x$new_path" = x; then
46995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46996$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46997        has_space=`$ECHO "$complete" | $GREP " "`
46998        if test "x$has_space" != x; then
46999          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47000$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47001        fi
47002        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47003      fi
47004    fi
47005
47006    # Now join together the path and the arguments once again
47007    if test "x$arguments" != xEOL; then
47008      new_complete="$new_path ${arguments% *}"
47009    else
47010      new_complete="$new_path"
47011    fi
47012
47013    if test "x$complete" != "x$new_complete"; then
47014      BUILD_STRIP="$new_complete"
47015      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47016$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47017    fi
47018  fi
47019
47020    # Assume the C compiler is the assembler
47021    BUILD_AS="$BUILD_CC -c"
47022    # Just like for the target compiler, use the compiler as linker
47023    BUILD_LD="$BUILD_CC"
47024    BUILD_LDCXX="$BUILD_CXX"
47025
47026    PATH="$OLDPATH"
47027
47028
47029  COMPILER=$BUILD_CC
47030  COMPILER_NAME=BuildC
47031
47032  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47033    # cc -V output typically looks like
47034    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47035    # or
47036    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47037    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47038    # Check that this is likely to be the Solaris Studio cc.
47039    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47040    if test $? -ne 0; then
47041      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47042      { $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
47043$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47044      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47045$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47046      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47047$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47048      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47049    fi
47050    # Remove usage instructions (if present), and
47051    # collapse compiler output into a single line
47052    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47053        $SED -e 's/ *[Uu]sage:.*//'`
47054    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47055        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47056  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47057    # xlc -qversion output typically looks like
47058    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47059    #     Version: 11.01.0000.0015
47060    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47061    # Check that this is likely to be the IBM XL C compiler.
47062    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47063    if test $? -ne 0; then
47064      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47065      { $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
47066$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47067      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47068$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47069      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47070$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47071      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47072    fi
47073    # Collapse compiler output into a single line
47074    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47075    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47076        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47077  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47078    # There is no specific version flag, but all output starts with a version string.
47079    # First line typically looks something like:
47080    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47081    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47082    # Check that this is likely to be Microsoft CL.EXE.
47083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47084    if test $? -ne 0; then
47085      { $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
47086$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47087      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47088$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47089      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47090    fi
47091    # Collapse compiler output into a single line
47092    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47093    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47094        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47095  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47096    # gcc --version output typically looks like
47097    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47098    #     Copyright (C) 2013 Free Software Foundation, Inc.
47099    #     This is free software; see the source for copying conditions.  There is NO
47100    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47101    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47102    # Check that this is likely to be GCC.
47103    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47104    if test $? -ne 0; then
47105      { $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
47106$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47107      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47108$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47109      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47110    fi
47111    # Remove Copyright and legalese from version string, and
47112    # collapse into a single line
47113    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47114        $SED -e 's/ *Copyright .*//'`
47115    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47116        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47117  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47118    # clang --version output typically looks like
47119    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47120    #    clang version 3.3 (tags/RELEASE_33/final)
47121    # or
47122    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47123    #    Target: x86_64-pc-linux-gnu
47124    #    Thread model: posix
47125    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47126    # Check that this is likely to be clang
47127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47128    if test $? -ne 0; then
47129      { $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
47130$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47132$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47134    fi
47135    # Collapse compiler output into a single line
47136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47138        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47139  else
47140      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47141  fi
47142  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47143  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47144  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47145  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47146
47147  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47148$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47149
47150
47151  COMPILER=$BUILD_CXX
47152  COMPILER_NAME=BuildC++
47153
47154  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47155    # cc -V output typically looks like
47156    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47157    # or
47158    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47159    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47160    # Check that this is likely to be the Solaris Studio cc.
47161    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47162    if test $? -ne 0; then
47163      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47164      { $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
47165$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47167$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47168      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47169$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47170      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47171    fi
47172    # Remove usage instructions (if present), and
47173    # collapse compiler output into a single line
47174    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47175        $SED -e 's/ *[Uu]sage:.*//'`
47176    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47177        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47178  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47179    # xlc -qversion output typically looks like
47180    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47181    #     Version: 11.01.0000.0015
47182    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47183    # Check that this is likely to be the IBM XL C compiler.
47184    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47185    if test $? -ne 0; then
47186      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47187      { $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
47188$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47190$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47191      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47192$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47193      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47194    fi
47195    # Collapse compiler output into a single line
47196    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47197    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47198        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47199  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47200    # There is no specific version flag, but all output starts with a version string.
47201    # First line typically looks something like:
47202    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47203    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47204    # Check that this is likely to be Microsoft CL.EXE.
47205    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47206    if test $? -ne 0; then
47207      { $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
47208$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47209      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47210$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47211      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47212    fi
47213    # Collapse compiler output into a single line
47214    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47215    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47216        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47217  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47218    # gcc --version output typically looks like
47219    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47220    #     Copyright (C) 2013 Free Software Foundation, Inc.
47221    #     This is free software; see the source for copying conditions.  There is NO
47222    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47223    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47224    # Check that this is likely to be GCC.
47225    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47226    if test $? -ne 0; then
47227      { $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
47228$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47229      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47230$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47231      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47232    fi
47233    # Remove Copyright and legalese from version string, and
47234    # collapse into a single line
47235    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47236        $SED -e 's/ *Copyright .*//'`
47237    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47238        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47239  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47240    # clang --version output typically looks like
47241    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47242    #    clang version 3.3 (tags/RELEASE_33/final)
47243    # or
47244    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47245    #    Target: x86_64-pc-linux-gnu
47246    #    Thread model: posix
47247    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47248    # Check that this is likely to be clang
47249    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47250    if test $? -ne 0; then
47251      { $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
47252$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47253      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47254$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47255      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47256    fi
47257    # Collapse compiler output into a single line
47258    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47259    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47260        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47261  else
47262      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47263  fi
47264  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47265  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47266  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47267  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47268
47269  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47270$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47271
47272
47273  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47274    { $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
47275$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47277$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47278  fi
47279
47280  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47281  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47282    { $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
47283$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;}
47284  fi
47285
47286  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47287    { $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
47288$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47289  fi
47290
47291  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47292
47293  else
47294    # If we are not cross compiling, use the normal target compilers for
47295    # building the build platform executables.
47296    BUILD_CC="$CC"
47297    BUILD_CXX="$CXX"
47298    BUILD_LD="$LD"
47299    BUILD_LDCXX="$LDCXX"
47300    BUILD_NM="$NM"
47301    BUILD_AS="$AS"
47302    BUILD_OBJCOPY="$OBJCOPY"
47303    BUILD_STRIP="$STRIP"
47304    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47305    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47306    BUILD_AR="$AR"
47307
47308
47309  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47310    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47311$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47312    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47313$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47314  fi
47315
47316  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47317  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47318    { $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
47319$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;}
47320  fi
47321
47322  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47323    { $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
47324$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47325  fi
47326
47327  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47328
47329  fi
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344  # The package path is used only on macosx?
47345  # FIXME: clean this up, and/or move it elsewhere.
47346  PACKAGE_PATH=/opt/local
47347
47348
47349  # Check for extra potential brokenness.
47350  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47351    # On Windows, double-check that we got the right compiler.
47352    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47353    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47354    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47355      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47356        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
47357      fi
47358    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47359      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47360        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47361      fi
47362    fi
47363  fi
47364
47365  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47366    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47367    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47368    # This is later checked when setting flags.
47369
47370    # "-Og" suppported for GCC 4.8 and later
47371    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419    # Execute function body
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468    # Execute function body
47469
47470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47471$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47472  supports=yes
47473
47474  saved_cflags="$CFLAGS"
47475  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47476  ac_ext=c
47477ac_cpp='$CPP $CPPFLAGS'
47478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47480ac_compiler_gnu=$ac_cv_c_compiler_gnu
47481
47482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47483/* end confdefs.h.  */
47484int i;
47485_ACEOF
47486if ac_fn_c_try_compile "$LINENO"; then :
47487
47488else
47489  supports=no
47490fi
47491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47492  ac_ext=cpp
47493ac_cpp='$CXXCPP $CPPFLAGS'
47494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47497
47498  CFLAGS="$saved_cflags"
47499
47500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47501$as_echo "$supports" >&6; }
47502  if test "x$supports" = "xyes" ; then
47503    :
47504    C_COMP_SUPPORTS="yes"
47505  else
47506    :
47507    C_COMP_SUPPORTS="no"
47508  fi
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568    # Execute function body
47569
47570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47571$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47572  supports=yes
47573
47574  saved_cxxflags="$CXXFLAGS"
47575  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47576  ac_ext=cpp
47577ac_cpp='$CXXCPP $CPPFLAGS'
47578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47581
47582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47583/* end confdefs.h.  */
47584int i;
47585_ACEOF
47586if ac_fn_cxx_try_compile "$LINENO"; then :
47587
47588else
47589  supports=no
47590fi
47591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47592  ac_ext=cpp
47593ac_cpp='$CXXCPP $CPPFLAGS'
47594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47597
47598  CXXFLAGS="$saved_cxxflags"
47599
47600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47601$as_echo "$supports" >&6; }
47602  if test "x$supports" = "xyes" ; then
47603    :
47604    CXX_COMP_SUPPORTS="yes"
47605  else
47606    :
47607    CXX_COMP_SUPPORTS="no"
47608  fi
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47623$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47624  supports=no
47625  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47626
47627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47628$as_echo "$supports" >&6; }
47629  if test "x$supports" = "xyes" ; then
47630    :
47631    HAS_CFLAG_OPTIMIZE_DEBUG=true
47632  else
47633    :
47634    HAS_CFLAG_OPTIMIZE_DEBUG=false
47635  fi
47636
47637
47638
47639
47640
47641
47642
47643    # "-z relro" supported in GNU binutils 2.17 and later
47644    LINKER_RELRO_FLAG="-Wl,-z,relro"
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692    # Execute function body
47693
47694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47695$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47696  supports=yes
47697
47698  saved_ldflags="$LDFLAGS"
47699  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47700  ac_ext=c
47701ac_cpp='$CPP $CPPFLAGS'
47702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47704ac_compiler_gnu=$ac_cv_c_compiler_gnu
47705
47706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47707/* end confdefs.h.  */
47708
47709int
47710main ()
47711{
47712
47713  ;
47714  return 0;
47715}
47716_ACEOF
47717if ac_fn_c_try_link "$LINENO"; then :
47718
47719else
47720  supports=no
47721fi
47722rm -f core conftest.err conftest.$ac_objext \
47723    conftest$ac_exeext conftest.$ac_ext
47724  ac_ext=cpp
47725ac_cpp='$CXXCPP $CPPFLAGS'
47726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47729
47730  LDFLAGS="$saved_ldflags"
47731
47732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47733$as_echo "$supports" >&6; }
47734  if test "x$supports" = "xyes" ; then
47735    :
47736    HAS_LINKER_RELRO=true
47737  else
47738    :
47739    HAS_LINKER_RELRO=false
47740  fi
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754    # "-z now" supported in GNU binutils 2.11 and later
47755    LINKER_NOW_FLAG="-Wl,-z,now"
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803    # Execute function body
47804
47805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47806$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47807  supports=yes
47808
47809  saved_ldflags="$LDFLAGS"
47810  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47811  ac_ext=c
47812ac_cpp='$CPP $CPPFLAGS'
47813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47815ac_compiler_gnu=$ac_cv_c_compiler_gnu
47816
47817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47818/* end confdefs.h.  */
47819
47820int
47821main ()
47822{
47823
47824  ;
47825  return 0;
47826}
47827_ACEOF
47828if ac_fn_c_try_link "$LINENO"; then :
47829
47830else
47831  supports=no
47832fi
47833rm -f core conftest.err conftest.$ac_objext \
47834    conftest$ac_exeext conftest.$ac_ext
47835  ac_ext=cpp
47836ac_cpp='$CXXCPP $CPPFLAGS'
47837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47840
47841  LDFLAGS="$saved_ldflags"
47842
47843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47844$as_echo "$supports" >&6; }
47845  if test "x$supports" = "xyes" ; then
47846    :
47847    HAS_LINKER_NOW=true
47848  else
47849    :
47850    HAS_LINKER_NOW=false
47851  fi
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864  fi
47865
47866  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47867  # in executable.'
47868  USING_BROKEN_SUSE_LD=no
47869  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47871$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47872    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47873    $ECHO "int main() { }" > main.c
47874    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47876$as_echo "no" >&6; }
47877      USING_BROKEN_SUSE_LD=no
47878    else
47879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47880$as_echo "yes" >&6; }
47881      USING_BROKEN_SUSE_LD=yes
47882    fi
47883    $RM version-script.map main.c a.out
47884  fi
47885
47886
47887  # Setup hotspot lecagy names for toolchains
47888  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47889  if test "x$TOOLCHAIN_TYPE" = xclang; then
47890    HOTSPOT_TOOLCHAIN_TYPE=gcc
47891  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47892    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47893  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47894    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47895  fi
47896
47897
47898
47899# Setup the JTReg Regression Test Harness.
47900
47901
47902# Check whether --with-jtreg was given.
47903if test "${with_jtreg+set}" = set; then :
47904  withval=$with_jtreg;
47905else
47906  with_jtreg=no
47907fi
47908
47909
47910  if test "x$with_jtreg" = xno; then
47911    # jtreg disabled
47912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47913$as_echo_n "checking for jtreg... " >&6; }
47914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47915$as_echo "no" >&6; }
47916  else
47917    if test "x$with_jtreg" != xyes; then
47918      # with path specified.
47919      JT_HOME="$with_jtreg"
47920    fi
47921
47922    if test "x$JT_HOME" != x; then
47923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47924$as_echo_n "checking for jtreg... " >&6; }
47925
47926      # use JT_HOME enviroment var.
47927
47928  # Only process if variable expands to non-empty
47929
47930  if test "x$JT_HOME" != x; then
47931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47932
47933  # Input might be given as Windows format, start by converting to
47934  # unix format.
47935  path="$JT_HOME"
47936  new_path=`$CYGPATH -u "$path"`
47937
47938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47941  # "foo.exe" is OK but "foo" is an error.
47942  #
47943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47944  # It is also a way to make sure we got the proper file name for the real test later on.
47945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47946  if test "x$test_shortpath" = x; then
47947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47948$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47949    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47950  fi
47951
47952  # Call helper function which possibly converts this using DOS-style short mode.
47953  # If so, the updated path is stored in $new_path.
47954
47955  input_path="$new_path"
47956  # Check if we need to convert this using DOS-style short mode. If the path
47957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47958  # take no chances and rewrite it.
47959  # Note: m4 eats our [], so we need to use [ and ] instead.
47960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47961  if test "x$has_forbidden_chars" != x; then
47962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47966      # Going to short mode and back again did indeed matter. Since short mode is
47967      # case insensitive, let's make it lowercase to improve readability.
47968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47969      # Now convert it back to Unix-style (cygpath)
47970      input_path=`$CYGPATH -u "$shortmode_path"`
47971      new_path="$input_path"
47972    fi
47973  fi
47974
47975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47976  if test "x$test_cygdrive_prefix" = x; then
47977    # As a simple fix, exclude /usr/bin since it's not a real path.
47978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47980      # a path prefixed by /cygdrive for fixpath to work.
47981      new_path="$CYGWIN_ROOT_PATH$input_path"
47982    fi
47983  fi
47984
47985
47986  if test "x$path" != "x$new_path"; then
47987    JT_HOME="$new_path"
47988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47989$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47990  fi
47991
47992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47993
47994  path="$JT_HOME"
47995  has_colon=`$ECHO $path | $GREP ^.:`
47996  new_path="$path"
47997  if test "x$has_colon" = x; then
47998    # Not in mixed or Windows style, start by that.
47999    new_path=`cmd //c echo $path`
48000  fi
48001
48002
48003  input_path="$new_path"
48004  # Check if we need to convert this using DOS-style short mode. If the path
48005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48006  # take no chances and rewrite it.
48007  # Note: m4 eats our [], so we need to use [ and ] instead.
48008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48009  if test "x$has_forbidden_chars" != x; then
48010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48012  fi
48013
48014
48015  windows_path="$new_path"
48016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48017    unix_path=`$CYGPATH -u "$windows_path"`
48018    new_path="$unix_path"
48019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48021    new_path="$unix_path"
48022  fi
48023
48024  if test "x$path" != "x$new_path"; then
48025    JT_HOME="$new_path"
48026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48027$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48028  fi
48029
48030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48032
48033    else
48034      # We're on a unix platform. Hooray! :)
48035      path="$JT_HOME"
48036      has_space=`$ECHO "$path" | $GREP " "`
48037      if test "x$has_space" != x; then
48038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48039$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48041      fi
48042
48043      # Use eval to expand a potential ~
48044      eval path="$path"
48045      if test ! -f "$path" && test ! -d "$path"; then
48046        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48047      fi
48048
48049      if test -d "$path"; then
48050        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48051      else
48052        dir="`$DIRNAME "$path"`"
48053        base="`$BASENAME "$path"`"
48054        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48055      fi
48056    fi
48057  fi
48058
48059
48060      # jtreg win32 script works for everybody
48061      JTREGEXE="$JT_HOME/bin/jtreg"
48062
48063      if test ! -f "$JTREGEXE"; then
48064        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48065      fi
48066
48067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48068$as_echo "$JTREGEXE" >&6; }
48069    else
48070      # try to find jtreg on path
48071
48072
48073
48074  # Publish this variable in the help.
48075
48076
48077  if [ -z "${JTREGEXE+x}" ]; then
48078    # The variable is not set by user, try to locate tool using the code snippet
48079    for ac_prog in jtreg
48080do
48081  # Extract the first word of "$ac_prog", so it can be a program name with args.
48082set dummy $ac_prog; ac_word=$2
48083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48084$as_echo_n "checking for $ac_word... " >&6; }
48085if ${ac_cv_path_JTREGEXE+:} false; then :
48086  $as_echo_n "(cached) " >&6
48087else
48088  case $JTREGEXE in
48089  [\\/]* | ?:[\\/]*)
48090  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48091  ;;
48092  *)
48093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48094for as_dir in $PATH
48095do
48096  IFS=$as_save_IFS
48097  test -z "$as_dir" && as_dir=.
48098    for ac_exec_ext in '' $ac_executable_extensions; do
48099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48100    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48102    break 2
48103  fi
48104done
48105  done
48106IFS=$as_save_IFS
48107
48108  ;;
48109esac
48110fi
48111JTREGEXE=$ac_cv_path_JTREGEXE
48112if test -n "$JTREGEXE"; then
48113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48114$as_echo "$JTREGEXE" >&6; }
48115else
48116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48117$as_echo "no" >&6; }
48118fi
48119
48120
48121  test -n "$JTREGEXE" && break
48122done
48123
48124  else
48125    # The variable is set, but is it from the command line or the environment?
48126
48127    # Try to remove the string !JTREGEXE! from our list.
48128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48130      # If it failed, the variable was not from the command line. Ignore it,
48131      # but warn the user (except for BASH, which is always set by the calling BASH).
48132      if test "xJTREGEXE" != xBASH; then
48133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48134$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48135      fi
48136      # Try to locate tool using the code snippet
48137      for ac_prog in jtreg
48138do
48139  # Extract the first word of "$ac_prog", so it can be a program name with args.
48140set dummy $ac_prog; ac_word=$2
48141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48142$as_echo_n "checking for $ac_word... " >&6; }
48143if ${ac_cv_path_JTREGEXE+:} false; then :
48144  $as_echo_n "(cached) " >&6
48145else
48146  case $JTREGEXE in
48147  [\\/]* | ?:[\\/]*)
48148  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48149  ;;
48150  *)
48151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48152for as_dir in $PATH
48153do
48154  IFS=$as_save_IFS
48155  test -z "$as_dir" && as_dir=.
48156    for ac_exec_ext in '' $ac_executable_extensions; do
48157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48158    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48160    break 2
48161  fi
48162done
48163  done
48164IFS=$as_save_IFS
48165
48166  ;;
48167esac
48168fi
48169JTREGEXE=$ac_cv_path_JTREGEXE
48170if test -n "$JTREGEXE"; then
48171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48172$as_echo "$JTREGEXE" >&6; }
48173else
48174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48175$as_echo "no" >&6; }
48176fi
48177
48178
48179  test -n "$JTREGEXE" && break
48180done
48181
48182    else
48183      # If it succeeded, then it was overridden by the user. We will use it
48184      # for the tool.
48185
48186      # First remove it from the list of overridden variables, so we can test
48187      # for unknown variables in the end.
48188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48189
48190      # Check if we try to supply an empty value
48191      if test "x$JTREGEXE" = x; then
48192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48193$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48195$as_echo_n "checking for JTREGEXE... " >&6; }
48196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48197$as_echo "disabled" >&6; }
48198      else
48199        # Check if the provided tool contains a complete path.
48200        tool_specified="$JTREGEXE"
48201        tool_basename="${tool_specified##*/}"
48202        if test "x$tool_basename" = "x$tool_specified"; then
48203          # A command without a complete path is provided, search $PATH.
48204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48205$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48206          # Extract the first word of "$tool_basename", so it can be a program name with args.
48207set dummy $tool_basename; ac_word=$2
48208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48209$as_echo_n "checking for $ac_word... " >&6; }
48210if ${ac_cv_path_JTREGEXE+:} false; then :
48211  $as_echo_n "(cached) " >&6
48212else
48213  case $JTREGEXE in
48214  [\\/]* | ?:[\\/]*)
48215  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48216  ;;
48217  *)
48218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48219for as_dir in $PATH
48220do
48221  IFS=$as_save_IFS
48222  test -z "$as_dir" && as_dir=.
48223    for ac_exec_ext in '' $ac_executable_extensions; do
48224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48225    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48227    break 2
48228  fi
48229done
48230  done
48231IFS=$as_save_IFS
48232
48233  ;;
48234esac
48235fi
48236JTREGEXE=$ac_cv_path_JTREGEXE
48237if test -n "$JTREGEXE"; then
48238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48239$as_echo "$JTREGEXE" >&6; }
48240else
48241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48242$as_echo "no" >&6; }
48243fi
48244
48245
48246          if test "x$JTREGEXE" = x; then
48247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48248          fi
48249        else
48250          # Otherwise we believe it is a complete path. Use it as it is.
48251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48252$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48254$as_echo_n "checking for JTREGEXE... " >&6; }
48255          if test ! -x "$tool_specified"; then
48256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48257$as_echo "not found" >&6; }
48258            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48259          fi
48260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48261$as_echo "$tool_specified" >&6; }
48262        fi
48263      fi
48264    fi
48265
48266  fi
48267
48268
48269
48270  if test "x$JTREGEXE" = x; then
48271    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48272  fi
48273
48274
48275      JT_HOME="`$DIRNAME $JTREGEXE`"
48276    fi
48277  fi
48278
48279
48280
48281
48282
48283
48284  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48285  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48286  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48287  #                              commands produced by the link step (currently AIX only)
48288  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48289    COMPILER_TARGET_BITS_FLAG="-q"
48290    COMPILER_COMMAND_FILE_FLAG="-f"
48291    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48292  else
48293    COMPILER_TARGET_BITS_FLAG="-m"
48294    COMPILER_COMMAND_FILE_FLAG="@"
48295    COMPILER_BINDCMD_FILE_FLAG=""
48296
48297    # The solstudio linker does not support @-files.
48298    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48299      COMPILER_COMMAND_FILE_FLAG=
48300    fi
48301
48302    # Check if @file is supported by gcc
48303    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48305$as_echo_n "checking if @file is supported by gcc... " >&6; }
48306      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48307      $ECHO "" "--version" > command.file
48308      if $CXX @command.file 2>&5 >&5; then
48309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48310$as_echo "yes" >&6; }
48311        COMPILER_COMMAND_FILE_FLAG="@"
48312      else
48313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48314$as_echo "no" >&6; }
48315        COMPILER_COMMAND_FILE_FLAG=
48316      fi
48317      $RM command.file
48318    fi
48319  fi
48320
48321
48322
48323
48324  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48325  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48326    ARFLAGS="-r"
48327  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48328    ARFLAGS="-X64"
48329  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48330    # lib.exe is used as AR to create static libraries.
48331    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48332  else
48333    ARFLAGS=""
48334  fi
48335
48336
48337  ## Setup strip.
48338  # FIXME: should this really be per platform, or should it be per toolchain type?
48339  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48340  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48341  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48342    STRIPFLAGS="-g"
48343  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48344    STRIPFLAGS="-x"
48345  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48346    STRIPFLAGS="-S"
48347  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48348    STRIPFLAGS="-X32_64"
48349  fi
48350
48351
48352
48353  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48354    CC_OUT_OPTION=-Fo
48355    EXE_OUT_OPTION=-out:
48356    LD_OUT_OPTION=-out:
48357    AR_OUT_OPTION=-out:
48358  else
48359    # The option used to specify the target .o,.a or .so file.
48360    # When compiling, how to specify the to be created object file.
48361    CC_OUT_OPTION='-o$(SPACE)'
48362    # When linking, how to specify the to be created executable.
48363    EXE_OUT_OPTION='-o$(SPACE)'
48364    # When linking, how to specify the to be created dynamically linkable library.
48365    LD_OUT_OPTION='-o$(SPACE)'
48366    # When archiving, how to specify the to be create static archive for object files.
48367    AR_OUT_OPTION='rcs$(SPACE)'
48368  fi
48369
48370
48371
48372
48373
48374  # On Windows, we need to set RC flags.
48375  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48376    RC_FLAGS="-nologo -l0x409"
48377    JVM_RCFLAGS="-nologo"
48378    if test "x$DEBUG_LEVEL" = xrelease; then
48379      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48380      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48381    fi
48382
48383    # The version variables used to create RC_FLAGS may be overridden
48384    # in a custom configure script, or possibly the command line.
48385    # Let those variables be expanded at make time in spec.gmk.
48386    # The \$ are escaped to the shell, and the $(...) variables
48387    # are evaluated by make.
48388    RC_FLAGS="$RC_FLAGS \
48389        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48390        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48391        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48392        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48393        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48394        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48395        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48396
48397    JVM_RCFLAGS="$JVM_RCFLAGS \
48398        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48399        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48400        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48401        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48402        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48403        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48404        -D\"HS_FNAME=jvm.dll\" \
48405        -D\"HS_INTERNAL_NAME=jvm\""
48406  fi
48407
48408
48409
48410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48411    # silence copyright notice and other headers.
48412    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48413  fi
48414
48415
48416# Now we can test some aspects on the target using configure macros.
48417
48418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48419$as_echo_n "checking for ANSI C header files... " >&6; }
48420if ${ac_cv_header_stdc+:} false; then :
48421  $as_echo_n "(cached) " >&6
48422else
48423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48424/* end confdefs.h.  */
48425#include <stdlib.h>
48426#include <stdarg.h>
48427#include <string.h>
48428#include <float.h>
48429
48430int
48431main ()
48432{
48433
48434  ;
48435  return 0;
48436}
48437_ACEOF
48438if ac_fn_cxx_try_compile "$LINENO"; then :
48439  ac_cv_header_stdc=yes
48440else
48441  ac_cv_header_stdc=no
48442fi
48443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48444
48445if test $ac_cv_header_stdc = yes; then
48446  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48448/* end confdefs.h.  */
48449#include <string.h>
48450
48451_ACEOF
48452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48453  $EGREP "memchr" >/dev/null 2>&1; then :
48454
48455else
48456  ac_cv_header_stdc=no
48457fi
48458rm -f conftest*
48459
48460fi
48461
48462if test $ac_cv_header_stdc = yes; then
48463  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48465/* end confdefs.h.  */
48466#include <stdlib.h>
48467
48468_ACEOF
48469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48470  $EGREP "free" >/dev/null 2>&1; then :
48471
48472else
48473  ac_cv_header_stdc=no
48474fi
48475rm -f conftest*
48476
48477fi
48478
48479if test $ac_cv_header_stdc = yes; then
48480  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48481  if test "$cross_compiling" = yes; then :
48482  :
48483else
48484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48485/* end confdefs.h.  */
48486#include <ctype.h>
48487#include <stdlib.h>
48488#if ((' ' & 0x0FF) == 0x020)
48489# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48490# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48491#else
48492# define ISLOWER(c) \
48493		   (('a' <= (c) && (c) <= 'i') \
48494		     || ('j' <= (c) && (c) <= 'r') \
48495		     || ('s' <= (c) && (c) <= 'z'))
48496# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48497#endif
48498
48499#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48500int
48501main ()
48502{
48503  int i;
48504  for (i = 0; i < 256; i++)
48505    if (XOR (islower (i), ISLOWER (i))
48506	|| toupper (i) != TOUPPER (i))
48507      return 2;
48508  return 0;
48509}
48510_ACEOF
48511if ac_fn_cxx_try_run "$LINENO"; then :
48512
48513else
48514  ac_cv_header_stdc=no
48515fi
48516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48517  conftest.$ac_objext conftest.beam conftest.$ac_ext
48518fi
48519
48520fi
48521fi
48522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48523$as_echo "$ac_cv_header_stdc" >&6; }
48524if test $ac_cv_header_stdc = yes; then
48525
48526$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48527
48528fi
48529
48530# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48532		  inttypes.h stdint.h unistd.h
48533do :
48534  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48535ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48536"
48537if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48538  cat >>confdefs.h <<_ACEOF
48539#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48540_ACEOF
48541
48542fi
48543
48544done
48545
48546
48547
48548  ###############################################################################
48549  #
48550  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48551  # (The JVM can use 32 or 64 bit Java pointers but that decision
48552  # is made at runtime.)
48553  #
48554
48555  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48556    # Always specify -m flag on Solaris
48557    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48558
48559  # When we add flags to the "official" CFLAGS etc, we need to
48560  # keep track of these additions in ADDED_CFLAGS etc. These
48561  # will later be checked to make sure only controlled additions
48562  # have been made to CFLAGS etc.
48563  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48564  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48565  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48566
48567  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48568  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48569  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48570
48571  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48572  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48573  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48574
48575  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48576  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48577  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48578
48579  elif test "x$COMPILE_TYPE" = xreduced; then
48580    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48581      # Specify -m if running reduced on unix platforms
48582
48583  # When we add flags to the "official" CFLAGS etc, we need to
48584  # keep track of these additions in ADDED_CFLAGS etc. These
48585  # will later be checked to make sure only controlled additions
48586  # have been made to CFLAGS etc.
48587  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48590
48591  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48592  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48593  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48594
48595  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48596  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48597  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48598
48599  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48600  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48601  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48602
48603    fi
48604  fi
48605  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48606    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48607    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48608    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48609  fi
48610
48611  # Make compilation sanity check
48612  for ac_header in stdio.h
48613do :
48614  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48615if test "x$ac_cv_header_stdio_h" = xyes; then :
48616  cat >>confdefs.h <<_ACEOF
48617#define HAVE_STDIO_H 1
48618_ACEOF
48619
48620else
48621
48622    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48623$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48624    if test "x$COMPILE_TYPE" = xreduced; then
48625
48626  # Print a helpful message on how to acquire the necessary build dependency.
48627  # reduced is the help tag: freetype, cups, alsa etc
48628  MISSING_DEPENDENCY=reduced
48629
48630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48631    cygwin_help $MISSING_DEPENDENCY
48632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48633    msys_help $MISSING_DEPENDENCY
48634  else
48635    PKGHANDLER_COMMAND=
48636
48637    case $PKGHANDLER in
48638      apt-get)
48639        apt_help     $MISSING_DEPENDENCY ;;
48640      yum)
48641        yum_help     $MISSING_DEPENDENCY ;;
48642      brew)
48643        brew_help    $MISSING_DEPENDENCY ;;
48644      port)
48645        port_help    $MISSING_DEPENDENCY ;;
48646      pkgutil)
48647        pkgutil_help $MISSING_DEPENDENCY ;;
48648      pkgadd)
48649        pkgadd_help  $MISSING_DEPENDENCY ;;
48650    esac
48651
48652    if test "x$PKGHANDLER_COMMAND" != x; then
48653      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48654    fi
48655  fi
48656
48657      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48658$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48659    elif test "x$COMPILE_TYPE" = xcross; then
48660      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48661$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48662    fi
48663    as_fn_error $? "Cannot continue." "$LINENO" 5
48664
48665fi
48666
48667done
48668
48669
48670  # The cast to long int works around a bug in the HP C Compiler
48671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48673# This bug is HP SR number 8606223364.
48674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48675$as_echo_n "checking size of int *... " >&6; }
48676if ${ac_cv_sizeof_int_p+:} false; then :
48677  $as_echo_n "(cached) " >&6
48678else
48679  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48680
48681else
48682  if test "$ac_cv_type_int_p" = yes; then
48683     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48685as_fn_error 77 "cannot compute sizeof (int *)
48686See \`config.log' for more details" "$LINENO" 5; }
48687   else
48688     ac_cv_sizeof_int_p=0
48689   fi
48690fi
48691
48692fi
48693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48694$as_echo "$ac_cv_sizeof_int_p" >&6; }
48695
48696
48697
48698cat >>confdefs.h <<_ACEOF
48699#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48700_ACEOF
48701
48702
48703
48704  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48705  if test "x$ac_cv_sizeof_int_p" = x; then
48706    # The test failed, lets stick to the assumed value.
48707    { $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
48708$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48709  else
48710    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48711
48712    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48713      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48714      # Let's try to implicitely set the compilers target architecture and retry the test
48715      { $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
48716$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;}
48717      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48718$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48719
48720  # When we add flags to the "official" CFLAGS etc, we need to
48721  # keep track of these additions in ADDED_CFLAGS etc. These
48722  # will later be checked to make sure only controlled additions
48723  # have been made to CFLAGS etc.
48724  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48725  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48726  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48727
48728  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48729  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48730  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48731
48732  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48733  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48734  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48735
48736  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48737  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48738  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48739
48740
48741      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48742      unset ac_cv_sizeof_int_p
48743      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48744      cat >>confdefs.h <<_ACEOF
48745#undef SIZEOF_INT_P
48746_ACEOF
48747
48748      # The cast to long int works around a bug in the HP C Compiler
48749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48751# This bug is HP SR number 8606223364.
48752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48753$as_echo_n "checking size of int *... " >&6; }
48754if ${ac_cv_sizeof_int_p+:} false; then :
48755  $as_echo_n "(cached) " >&6
48756else
48757  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48758
48759else
48760  if test "$ac_cv_type_int_p" = yes; then
48761     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48763as_fn_error 77 "cannot compute sizeof (int *)
48764See \`config.log' for more details" "$LINENO" 5; }
48765   else
48766     ac_cv_sizeof_int_p=0
48767   fi
48768fi
48769
48770fi
48771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48772$as_echo "$ac_cv_sizeof_int_p" >&6; }
48773
48774
48775
48776cat >>confdefs.h <<_ACEOF
48777#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48778_ACEOF
48779
48780
48781
48782      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48783
48784      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48785        { $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
48786$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;}
48787        if test "x$COMPILE_TYPE" = xreduced; then
48788
48789  # Print a helpful message on how to acquire the necessary build dependency.
48790  # reduced is the help tag: freetype, cups, alsa etc
48791  MISSING_DEPENDENCY=reduced
48792
48793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48794    cygwin_help $MISSING_DEPENDENCY
48795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48796    msys_help $MISSING_DEPENDENCY
48797  else
48798    PKGHANDLER_COMMAND=
48799
48800    case $PKGHANDLER in
48801      apt-get)
48802        apt_help     $MISSING_DEPENDENCY ;;
48803      yum)
48804        yum_help     $MISSING_DEPENDENCY ;;
48805      brew)
48806        brew_help    $MISSING_DEPENDENCY ;;
48807      port)
48808        port_help    $MISSING_DEPENDENCY ;;
48809      pkgutil)
48810        pkgutil_help $MISSING_DEPENDENCY ;;
48811      pkgadd)
48812        pkgadd_help  $MISSING_DEPENDENCY ;;
48813    esac
48814
48815    if test "x$PKGHANDLER_COMMAND" != x; then
48816      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48817    fi
48818  fi
48819
48820          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48821$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48822        elif test "x$COMPILE_TYPE" = xcross; then
48823          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48824$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48825        fi
48826        as_fn_error $? "Cannot continue." "$LINENO" 5
48827      fi
48828    fi
48829  fi
48830
48831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48832$as_echo_n "checking for target address size... " >&6; }
48833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48834$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48835
48836
48837  ###############################################################################
48838  #
48839  # Is the target little of big endian?
48840  #
48841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48842$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48843if ${ac_cv_c_bigendian+:} false; then :
48844  $as_echo_n "(cached) " >&6
48845else
48846  ac_cv_c_bigendian=unknown
48847    # See if we're dealing with a universal compiler.
48848    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48849/* end confdefs.h.  */
48850#ifndef __APPLE_CC__
48851	       not a universal capable compiler
48852	     #endif
48853	     typedef int dummy;
48854
48855_ACEOF
48856if ac_fn_cxx_try_compile "$LINENO"; then :
48857
48858	# Check for potential -arch flags.  It is not universal unless
48859	# there are at least two -arch flags with different values.
48860	ac_arch=
48861	ac_prev=
48862	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48863	 if test -n "$ac_prev"; then
48864	   case $ac_word in
48865	     i?86 | x86_64 | ppc | ppc64)
48866	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48867		 ac_arch=$ac_word
48868	       else
48869		 ac_cv_c_bigendian=universal
48870		 break
48871	       fi
48872	       ;;
48873	   esac
48874	   ac_prev=
48875	 elif test "x$ac_word" = "x-arch"; then
48876	   ac_prev=arch
48877	 fi
48878       done
48879fi
48880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48881    if test $ac_cv_c_bigendian = unknown; then
48882      # See if sys/param.h defines the BYTE_ORDER macro.
48883      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48884/* end confdefs.h.  */
48885#include <sys/types.h>
48886	     #include <sys/param.h>
48887
48888int
48889main ()
48890{
48891#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48892		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48893		     && LITTLE_ENDIAN)
48894	      bogus endian macros
48895	     #endif
48896
48897  ;
48898  return 0;
48899}
48900_ACEOF
48901if ac_fn_cxx_try_compile "$LINENO"; then :
48902  # It does; now see whether it defined to BIG_ENDIAN or not.
48903	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48904/* end confdefs.h.  */
48905#include <sys/types.h>
48906		#include <sys/param.h>
48907
48908int
48909main ()
48910{
48911#if BYTE_ORDER != BIG_ENDIAN
48912		 not big endian
48913		#endif
48914
48915  ;
48916  return 0;
48917}
48918_ACEOF
48919if ac_fn_cxx_try_compile "$LINENO"; then :
48920  ac_cv_c_bigendian=yes
48921else
48922  ac_cv_c_bigendian=no
48923fi
48924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48925fi
48926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48927    fi
48928    if test $ac_cv_c_bigendian = unknown; then
48929      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48930      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48931/* end confdefs.h.  */
48932#include <limits.h>
48933
48934int
48935main ()
48936{
48937#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48938	      bogus endian macros
48939	     #endif
48940
48941  ;
48942  return 0;
48943}
48944_ACEOF
48945if ac_fn_cxx_try_compile "$LINENO"; then :
48946  # It does; now see whether it defined to _BIG_ENDIAN or not.
48947	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48948/* end confdefs.h.  */
48949#include <limits.h>
48950
48951int
48952main ()
48953{
48954#ifndef _BIG_ENDIAN
48955		 not big endian
48956		#endif
48957
48958  ;
48959  return 0;
48960}
48961_ACEOF
48962if ac_fn_cxx_try_compile "$LINENO"; then :
48963  ac_cv_c_bigendian=yes
48964else
48965  ac_cv_c_bigendian=no
48966fi
48967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48968fi
48969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48970    fi
48971    if test $ac_cv_c_bigendian = unknown; then
48972      # Compile a test program.
48973      if test "$cross_compiling" = yes; then :
48974  # Try to guess by grepping values from an object file.
48975	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48976/* end confdefs.h.  */
48977short int ascii_mm[] =
48978		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48979		short int ascii_ii[] =
48980		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48981		int use_ascii (int i) {
48982		  return ascii_mm[i] + ascii_ii[i];
48983		}
48984		short int ebcdic_ii[] =
48985		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48986		short int ebcdic_mm[] =
48987		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48988		int use_ebcdic (int i) {
48989		  return ebcdic_mm[i] + ebcdic_ii[i];
48990		}
48991		extern int foo;
48992
48993int
48994main ()
48995{
48996return use_ascii (foo) == use_ebcdic (foo);
48997  ;
48998  return 0;
48999}
49000_ACEOF
49001if ac_fn_cxx_try_compile "$LINENO"; then :
49002  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49003	      ac_cv_c_bigendian=yes
49004	    fi
49005	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49006	      if test "$ac_cv_c_bigendian" = unknown; then
49007		ac_cv_c_bigendian=no
49008	      else
49009		# finding both strings is unlikely to happen, but who knows?
49010		ac_cv_c_bigendian=unknown
49011	      fi
49012	    fi
49013fi
49014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49015else
49016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49017/* end confdefs.h.  */
49018$ac_includes_default
49019int
49020main ()
49021{
49022
49023	     /* Are we little or big endian?  From Harbison&Steele.  */
49024	     union
49025	     {
49026	       long int l;
49027	       char c[sizeof (long int)];
49028	     } u;
49029	     u.l = 1;
49030	     return u.c[sizeof (long int) - 1] == 1;
49031
49032  ;
49033  return 0;
49034}
49035_ACEOF
49036if ac_fn_cxx_try_run "$LINENO"; then :
49037  ac_cv_c_bigendian=no
49038else
49039  ac_cv_c_bigendian=yes
49040fi
49041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49042  conftest.$ac_objext conftest.beam conftest.$ac_ext
49043fi
49044
49045    fi
49046fi
49047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49048$as_echo "$ac_cv_c_bigendian" >&6; }
49049 case $ac_cv_c_bigendian in #(
49050   yes)
49051     ENDIAN="big";; #(
49052   no)
49053     ENDIAN="little" ;; #(
49054   universal)
49055     ENDIAN="universal_endianness"
49056     ;; #(
49057   *)
49058     ENDIAN="unknown" ;;
49059 esac
49060
49061
49062  if test "x$ENDIAN" = xuniversal_endianness; then
49063    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49064  fi
49065  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49066    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
49067  fi
49068
49069
49070# Configure flags for the tools
49071
49072  ###############################################################################
49073  #
49074  # How to compile shared libraries.
49075  #
49076
49077  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49078    PICFLAG="-fPIC"
49079    C_FLAG_REORDER=''
49080    CXX_FLAG_REORDER=''
49081
49082    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49083      # Linking is different on MacOSX
49084      if test "x$STATIC_BUILD" = xtrue; then
49085        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49086      else
49087        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49088        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49089      fi
49090      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49091      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49092      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49093      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49094    else
49095      # Default works for linux, might work on other platforms as well.
49096      SHARED_LIBRARY_FLAGS='-shared'
49097      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49098      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49099      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49100      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49101    fi
49102  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49103    C_FLAG_REORDER=''
49104    CXX_FLAG_REORDER=''
49105
49106    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49107      # Linking is different on MacOSX
49108      PICFLAG=''
49109      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49110      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49111      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49112      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49113      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49114
49115      if test "x$STATIC_BUILD" = xfalse; then
49116        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49117      fi
49118    else
49119      # Default works for linux, might work on other platforms as well.
49120      PICFLAG='-fPIC'
49121      SHARED_LIBRARY_FLAGS='-shared'
49122      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49123      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49124      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49125
49126      # arm specific settings
49127      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49128        # '-Wl,-z,origin' isn't used on arm.
49129        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49130      else
49131        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49132      fi
49133
49134    fi
49135  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49136    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49137      PICFLAG="-xcode=pic32"
49138    else
49139      PICFLAG="-KPIC"
49140    fi
49141    C_FLAG_REORDER='-xF'
49142    CXX_FLAG_REORDER='-xF'
49143    SHARED_LIBRARY_FLAGS="-G"
49144    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49145    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49146    SET_SHARED_LIBRARY_NAME='-h $1'
49147    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49148  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49149    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49150    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49151    # will have to patch this single instruction with a call to some out-of-order code which
49152    # does the load from the TOC. This is of course slow. But in that case we also would have
49153    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49154    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49155    # can be patched directly by the linker and does not require a jump to out-of-order code.
49156    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49157    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49158    # loads for accessing a global variable). But there are rumors that this may be seen as a
49159    # 'performance feature' because of improved code locality of the symbols used in a
49160    # compilation unit.
49161    PICFLAG="-qpic"
49162    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49163    C_FLAG_REORDER=''
49164    CXX_FLAG_REORDER=''
49165    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49166    SET_EXECUTABLE_ORIGIN=""
49167    SET_SHARED_LIBRARY_ORIGIN=''
49168    SET_SHARED_LIBRARY_NAME=''
49169    SET_SHARED_LIBRARY_MAPFILE=''
49170  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49171    PICFLAG=""
49172    C_FLAG_REORDER=''
49173    CXX_FLAG_REORDER=''
49174    SHARED_LIBRARY_FLAGS="-dll"
49175    SET_EXECUTABLE_ORIGIN=''
49176    SET_SHARED_LIBRARY_ORIGIN=''
49177    SET_SHARED_LIBRARY_NAME=''
49178    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49179  fi
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189  # The (cross) compiler is now configured, we can now test capabilities
49190  # of the target platform.
49191
49192
49193
49194  ###############################################################################
49195  #
49196  # Setup the opt flags for different compilers
49197  # and different operating systems.
49198  #
49199
49200  # FIXME: this was indirectly the old default, but just inherited.
49201  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49202  #   C_FLAG_DEPS="-MMD -MF"
49203  # fi
49204
49205  # Generate make dependency files
49206  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49207    C_FLAG_DEPS="-MMD -MF"
49208  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49209    C_FLAG_DEPS="-MMD -MF"
49210  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49211    C_FLAG_DEPS="-xMMD -xMF"
49212  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49213    C_FLAG_DEPS="-qmakedep=gcc -MF"
49214  fi
49215  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49216
49217
49218
49219  # Debug symbols
49220  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49221    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49222      # reduce from default "-g2" option to save space
49223      CFLAGS_DEBUG_SYMBOLS="-g1"
49224      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49225    else
49226      CFLAGS_DEBUG_SYMBOLS="-g"
49227      CXXFLAGS_DEBUG_SYMBOLS="-g"
49228    fi
49229  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49230    CFLAGS_DEBUG_SYMBOLS="-g"
49231    CXXFLAGS_DEBUG_SYMBOLS="-g"
49232  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49233    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49234    # -g0 enables debug symbols without disabling inlining.
49235    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49236  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49237    CFLAGS_DEBUG_SYMBOLS="-g"
49238    CXXFLAGS_DEBUG_SYMBOLS="-g"
49239  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49240    CFLAGS_DEBUG_SYMBOLS="-Zi"
49241    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49242  fi
49243
49244
49245
49246  # Debug symbols for JVM_CFLAGS
49247  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49248    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49249    if test "x$DEBUG_LEVEL" = xslowdebug; then
49250      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49251    else
49252      # -g0 does not disable inlining, which -g does.
49253      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49254    fi
49255  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49256    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49257  else
49258    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49259  fi
49260
49261
49262  # bounds, memory and behavior checking options
49263  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49264    case $DEBUG_LEVEL in
49265    release )
49266      # no adjustment
49267      ;;
49268    fastdebug )
49269      # no adjustment
49270      ;;
49271    slowdebug )
49272      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49273      # get's added conditionally on whether we produce debug symbols or not.
49274      # This is most likely not really correct.
49275
49276      # Add runtime stack smashing and undefined behavior checks.
49277      # Not all versions of gcc support -fstack-protector
49278      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321    # Execute function body
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370    # Execute function body
49371
49372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49373$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49374  supports=yes
49375
49376  saved_cflags="$CFLAGS"
49377  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49378  ac_ext=c
49379ac_cpp='$CPP $CPPFLAGS'
49380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49382ac_compiler_gnu=$ac_cv_c_compiler_gnu
49383
49384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49385/* end confdefs.h.  */
49386int i;
49387_ACEOF
49388if ac_fn_c_try_compile "$LINENO"; then :
49389
49390else
49391  supports=no
49392fi
49393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49394  ac_ext=cpp
49395ac_cpp='$CXXCPP $CPPFLAGS'
49396ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49397ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49398ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49399
49400  CFLAGS="$saved_cflags"
49401
49402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49403$as_echo "$supports" >&6; }
49404  if test "x$supports" = "xyes" ; then
49405    :
49406    C_COMP_SUPPORTS="yes"
49407  else
49408    :
49409    C_COMP_SUPPORTS="no"
49410  fi
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470    # Execute function body
49471
49472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49473$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49474  supports=yes
49475
49476  saved_cxxflags="$CXXFLAGS"
49477  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49478  ac_ext=cpp
49479ac_cpp='$CXXCPP $CPPFLAGS'
49480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49483
49484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49485/* end confdefs.h.  */
49486int i;
49487_ACEOF
49488if ac_fn_cxx_try_compile "$LINENO"; then :
49489
49490else
49491  supports=no
49492fi
49493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49494  ac_ext=cpp
49495ac_cpp='$CXXCPP $CPPFLAGS'
49496ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49497ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49498ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49499
49500  CXXFLAGS="$saved_cxxflags"
49501
49502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49503$as_echo "$supports" >&6; }
49504  if test "x$supports" = "xyes" ; then
49505    :
49506    CXX_COMP_SUPPORTS="yes"
49507  else
49508    :
49509    CXX_COMP_SUPPORTS="no"
49510  fi
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520
49521
49522
49523
49524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49525$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49526  supports=no
49527  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49528
49529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49530$as_echo "$supports" >&6; }
49531  if test "x$supports" = "xyes" ; then
49532    :
49533
49534  else
49535    :
49536    STACK_PROTECTOR_CFLAG=""
49537  fi
49538
49539
49540
49541
49542
49543
49544
49545      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49546      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49547      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49548        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49549      fi
49550      ;;
49551    esac
49552  fi
49553
49554  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49555    if test "x$DEBUG_LEVEL" != xrelease; then
49556      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49557        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49558      fi
49559    fi
49560  fi
49561
49562  # Optimization levels
49563  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49564    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49565
49566    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49567      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49568      C_O_FLAG_HIGHEST_JVM="-xO4"
49569      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49570      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49571      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49572      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49573      C_O_FLAG_DEBUG_JVM=""
49574      C_O_FLAG_NONE="-xregs=no%frameptr"
49575      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49576      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49577      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49578      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49579      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49580      CXX_O_FLAG_DEBUG_JVM=""
49581      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49582      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49583        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49584        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49585      fi
49586    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49587      C_O_FLAG_HIGHEST_JVM="-xO4"
49588      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49589      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49590      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49591      C_O_FLAG_DEBUG=""
49592      C_O_FLAG_DEBUG_JVM=""
49593      C_O_FLAG_NONE=""
49594      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49595      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49596      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49597      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49598      CXX_O_FLAG_DEBUG=""
49599      CXX_O_FLAG_DEBUG_JVM=""
49600      CXX_O_FLAG_NONE=""
49601    fi
49602  else
49603    # The remaining toolchains share opt flags between CC and CXX;
49604    # setup for C and duplicate afterwards.
49605    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49606      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49607        # On MacOSX we optimize for size, something
49608        # we should do for all platforms?
49609        C_O_FLAG_HIGHEST_JVM="-Os"
49610        C_O_FLAG_HIGHEST="-Os"
49611        C_O_FLAG_HI="-Os"
49612        C_O_FLAG_NORM="-Os"
49613        C_O_FLAG_SIZE="-Os"
49614      else
49615        C_O_FLAG_HIGHEST_JVM="-O3"
49616        C_O_FLAG_HIGHEST="-O3"
49617        C_O_FLAG_HI="-O3"
49618        C_O_FLAG_NORM="-O2"
49619        C_O_FLAG_SIZE="-Os"
49620      fi
49621      C_O_FLAG_DEBUG="-O0"
49622      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49623        C_O_FLAG_DEBUG_JVM=""
49624      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49625        C_O_FLAG_DEBUG_JVM="-O0"
49626      fi
49627      C_O_FLAG_NONE="-O0"
49628    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49629      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49630        # On MacOSX we optimize for size, something
49631        # we should do for all platforms?
49632        C_O_FLAG_HIGHEST_JVM="-Os"
49633        C_O_FLAG_HIGHEST="-Os"
49634        C_O_FLAG_HI="-Os"
49635        C_O_FLAG_NORM="-Os"
49636        C_O_FLAG_SIZE="-Os"
49637      else
49638        C_O_FLAG_HIGHEST_JVM="-O3"
49639        C_O_FLAG_HIGHEST="-O3"
49640        C_O_FLAG_HI="-O3"
49641        C_O_FLAG_NORM="-O2"
49642        C_O_FLAG_SIZE="-Os"
49643      fi
49644      C_O_FLAG_DEBUG="-O0"
49645      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49646        C_O_FLAG_DEBUG_JVM=""
49647      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49648        C_O_FLAG_DEBUG_JVM="-O0"
49649      fi
49650      C_O_FLAG_NONE="-O0"
49651    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49652      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49653      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49654      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49655      C_O_FLAG_NORM="-O2"
49656      C_O_FLAG_DEBUG="-qnoopt"
49657      # FIXME: Value below not verified.
49658      C_O_FLAG_DEBUG_JVM=""
49659      C_O_FLAG_NONE="-qnoopt"
49660    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49661      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49662      C_O_FLAG_HIGHEST="-O2"
49663      C_O_FLAG_HI="-O1"
49664      C_O_FLAG_NORM="-O1"
49665      C_O_FLAG_DEBUG="-Od"
49666      C_O_FLAG_DEBUG_JVM=""
49667      C_O_FLAG_NONE="-Od"
49668      C_O_FLAG_SIZE="-Os"
49669    fi
49670    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49671    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49672    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49673    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49674    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49675    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49676    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49677    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49678  fi
49679
49680  # Adjust optimization flags according to debug level.
49681  case $DEBUG_LEVEL in
49682    release )
49683      # no adjustment
49684      ;;
49685    fastdebug )
49686      # Not quite so much optimization
49687      C_O_FLAG_HI="$C_O_FLAG_NORM"
49688      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49689      ;;
49690    slowdebug )
49691      # Disable optimization
49692      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49693      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49694      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49695      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49696      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49697      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49698      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49699      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49700      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49701      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49702      ;;
49703  esac
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724# Check whether --with-abi-profile was given.
49725if test "${with_abi_profile+set}" = set; then :
49726  withval=$with_abi_profile;
49727fi
49728
49729
49730  if test "x$with_abi_profile" != x; then
49731    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49732        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49733      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49734    fi
49735
49736    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49738$as_echo_n "checking for ABI profle... " >&6; }
49739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49740$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49741
49742    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49743      ARM_FLOAT_TYPE=vfp-sflt
49744      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49745    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49746      ARM_FLOAT_TYPE=vfp-hflt
49747      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49748    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49749      ARM_FLOAT_TYPE=sflt
49750      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49751    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49752      ARM_FLOAT_TYPE=vfp-sflt
49753      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49754    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49755      ARM_FLOAT_TYPE=vfp-hflt
49756      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49757    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49758      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49759      ARM_FLOAT_TYPE=
49760      ARM_ARCH_TYPE_FLAGS=
49761    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49762      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49763      ARM_FLOAT_TYPE=
49764      ARM_ARCH_TYPE_FLAGS=
49765    else
49766      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49767    fi
49768
49769    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49770      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49771    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49772      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49773    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49774      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49775    fi
49776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49777$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49779$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49780
49781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49782$as_echo_n "checking for arch type flags... " >&6; }
49783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49784$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49785
49786    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49787    # autoconf target triplet.
49788     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49789    # Sanity check that it is a known ABI.
49790    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49791        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49792        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49793          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49794$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49795    fi
49796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49797$as_echo_n "checking for ABI property name... " >&6; }
49798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49799$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49800
49801
49802    # Pass these on to the open part of configure as if they were set using
49803    # --with-extra-c[xx]flags.
49804    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49805    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49806    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49807    # FIXME: This should not really be set using extra_cflags.
49808    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49809        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49810        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49811    fi
49812    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49813    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49814    # And pass the architecture flags to the linker as well
49815    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49816  fi
49817
49818  # When building with an abi profile, the name of that profile is appended on the
49819  # bundle platform, which is used in bundle names.
49820  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49821    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49822  fi
49823
49824
49825  # Special extras...
49826  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49827    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49828      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49829      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49830    fi
49831    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49832    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49833  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49834    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49835    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49836  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49837    CXXSTD_CXXFLAG="-std=gnu++98"
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880    # Execute function body
49881
49882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49883$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49884  supports=yes
49885
49886  saved_cxxflags="$CXXFLAGS"
49887  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49888  ac_ext=cpp
49889ac_cpp='$CXXCPP $CPPFLAGS'
49890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49893
49894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49895/* end confdefs.h.  */
49896int i;
49897_ACEOF
49898if ac_fn_cxx_try_compile "$LINENO"; then :
49899
49900else
49901  supports=no
49902fi
49903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49904  ac_ext=cpp
49905ac_cpp='$CXXCPP $CPPFLAGS'
49906ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49907ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49908ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49909
49910  CXXFLAGS="$saved_cxxflags"
49911
49912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49913$as_echo "$supports" >&6; }
49914  if test "x$supports" = "xyes" ; then
49915    :
49916
49917  else
49918    :
49919    CXXSTD_CXXFLAG=""
49920  fi
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49934    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49935
49936  fi
49937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49938    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49939    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49940  fi
49941
49942  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49943  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49944  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49945
49946  ###############################################################################
49947  #
49948  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49949  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49950  #
49951
49952  # Setup compiler/platform specific flags into
49953  #    CFLAGS_JDK    - C Compiler flags
49954  #    CXXFLAGS_JDK  - C++ Compiler flags
49955  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49956  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49957    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49958    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49959    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49960    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49961      # Force compatibility with i586 on 32 bit intel platforms.
49962      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49963      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49964    fi
49965    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49966        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49967    case $OPENJDK_TARGET_CPU_ARCH in
49968      arm )
49969        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49970        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49971        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49972        ;;
49973      ppc )
49974        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49975        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49976        ;;
49977      s390 )
49978        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49979        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980        ;;
49981      * )
49982        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49983        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49984        ;;
49985    esac
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040    # Execute function body
50041
50042  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50043  REFERENCE_VERSION=6
50044
50045  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50046    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50047  fi
50048
50049  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50050    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50051  fi
50052
50053  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50054  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50055
50056  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50057    :
50058
50059  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50060  # runs afoul of the more aggressive versions of these optimisations.
50061  # Notably, value range propagation now assumes that the this pointer of C++
50062  # member functions is non-null.
50063  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50064        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50065        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50066$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50067  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50068  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50069
50070  else
50071    :
50072
50073  fi
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50089    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50090
50091    # Restrict the debug information created by Clang to avoid
50092    # too big object files and speed the build up a little bit
50093    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50094    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50095    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50096      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50097        # Force compatibility with i586 on 32 bit intel platforms.
50098        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50099        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50100      fi
50101      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50102      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50103          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50104      case $OPENJDK_TARGET_CPU_ARCH in
50105        ppc )
50106          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50107          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50108          ;;
50109        * )
50110          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50111          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50112          ;;
50113      esac
50114    fi
50115  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50116    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50117    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50118    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50119      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50120    fi
50121
50122    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50123    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50124  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50125    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50126    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50127    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50128  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50129    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50130        -MD -Zc:wchar_t- -W3 -wd4800 \
50131        -DWIN32_LEAN_AND_MEAN \
50132        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50133        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50134        -DWIN32 -DIAL"
50135    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50136      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50137    else
50138      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50139    fi
50140    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50141    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50142    # studio.
50143    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50144      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50145      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50146      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50147    fi
50148  fi
50149
50150  ###############################################################################
50151
50152  # Adjust flags according to debug level.
50153  case $DEBUG_LEVEL in
50154    fastdebug | slowdebug )
50155      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50156      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50157      ;;
50158    release )
50159      ;;
50160    * )
50161      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50162      ;;
50163  esac
50164
50165  # Set some common defines. These works for all compilers, but assume
50166  # -D is universally accepted.
50167
50168  # Setup endianness
50169  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50170    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50171    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50172    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50173    #   Note: -Dmacro         is the same as    #define macro 1
50174    #         -Dmacro=        is the same as    #define macro
50175    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50176      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50177    else
50178      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50179    fi
50180  else
50181    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50182    # are defined in the system?
50183    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50184      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50185    else
50186      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50187    fi
50188  fi
50189
50190  # Setup target OS define. Use OS target name but in upper case.
50191  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50192  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50193
50194  # Setup target CPU
50195  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50196      $OPENJDK_TARGET_ADD_LP64 \
50197      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50198
50199  # Setup debug/release defines
50200  if test "x$DEBUG_LEVEL" = xrelease; then
50201    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50202    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50203      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50204    fi
50205  else
50206    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50207  fi
50208
50209  # Set some additional per-OS defines.
50210  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50211    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50212    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50213        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50214  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50215    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50216    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50217        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50218  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50219    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50220    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50221    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50222    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50223        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50224        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50225        -fno-omit-frame-pointer"
50226  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50227    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50228    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50229    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50230        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50231        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50232  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50233    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50234  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50235    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50236    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50237  fi
50238
50239  # Set some additional per-CPU defines.
50240  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50241    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50242  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50243    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50244  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50245    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50246      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50247      # fixes `relocation truncated to fit' error for gcc 4.1.
50248      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50249      # Use ppc64 instructions, but schedule for power5
50250      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50251    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50252      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50253    fi
50254  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50255    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50256      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50257      # Little endian machine uses ELFv2 ABI.
50258      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50259      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50260      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50261    fi
50262  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50263    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50264      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50265    fi
50266  fi
50267
50268  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50269    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50270  fi
50271
50272  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50273    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50274      # Solaris does not have _LP64=1 in the old build.
50275      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50276      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50277    fi
50278  fi
50279
50280  # Set JVM_CFLAGS warning handling
50281  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50282    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50283        -Wunused-value -Woverloaded-virtual"
50284
50285    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340    # Execute function body
50341
50342  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50343  REFERENCE_VERSION=4.8
50344
50345  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50346    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50347  fi
50348
50349  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50350    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50351  fi
50352
50353  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50354  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50355
50356  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50357    :
50358
50359            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50360            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50361
50362
50363  else
50364    :
50365
50366  fi
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381    fi
50382    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50383      # Non-zero builds have stricter warnings
50384      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50385    else
50386      if test "x$TOOLCHAIN_TYPE" = xclang; then
50387        # Some versions of llvm do not like -Wundef
50388        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50389      fi
50390    fi
50391  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50392    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50393        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50394  fi
50395
50396  # Additional macosx handling
50397  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50398    # Setting these parameters makes it an error to link to macosx APIs that are
50399    # newer than the given OS version and makes the linked binaries compatible
50400    # even if built on a newer version of the OS.
50401    # The expected format is X.Y.Z
50402    MACOSX_VERSION_MIN=10.7.0
50403
50404
50405    # The macro takes the version with no dots, ex: 1070
50406    # Let the flags variables get resolved in make for easier override on make
50407    # command line.
50408    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50409    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50410  fi
50411
50412  # Setup some hard coded includes
50413  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50414      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50415      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50416      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50417      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50418      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50419      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50420
50421  # The shared libraries are compiled using the picflag.
50422  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50423      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50424  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50425      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50426
50427  # Executable flags
50428  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50429  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50430
50431
50432
50433
50434
50435
50436  # Setup LDFLAGS et al.
50437  #
50438
50439  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50440    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50441    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50442    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50443    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50444      LDFLAGS_SAFESH="-safeseh"
50445      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50446      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50447      # NOTE: Old build added -machine. Probably not needed.
50448      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50449    else
50450      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50451    fi
50452  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50453      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50454      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50455        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50456        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50457    fi
50458  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50459    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50460    # We have previously set HAS_GNU_HASH if this is the case
50461    if test -n "$HAS_GNU_HASH"; then
50462      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50463      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50464      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50465    fi
50466      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50467        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50468    fi
50469    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50470      # And since we now know that the linker is gnu, then add -z defs, to forbid
50471      # undefined symbols in object files.
50472      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50473      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50474      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50475      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50476      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50477      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50478        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50479      fi
50480      case $DEBUG_LEVEL in
50481        release )
50482          # tell linker to optimize libraries.
50483          # Should this be supplied to the OSS linker as well?
50484          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50485          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50486          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50487          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50488            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50489          fi
50490          ;;
50491        slowdebug )
50492          # Hotspot always let the linker optimize
50493          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50494          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50495            # do relocations at load
50496            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50497            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50498            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50499          fi
50500          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50501            # mark relocations read only
50502            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50503            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50504            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50505          fi
50506          ;;
50507        fastdebug )
50508          # Hotspot always let the linker optimize
50509          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50510          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50511            # mark relocations read only
50512            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50513            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50514            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50515          fi
50516          ;;
50517        * )
50518          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50519          ;;
50520        esac
50521    fi
50522  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50523    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50524    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50525    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50526    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50527    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50528    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50529      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50530    fi
50531  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50532    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50533    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50534    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50535  fi
50536
50537  # Customize LDFLAGS for executables
50538
50539  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50540
50541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50542    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50543      LDFLAGS_STACK_SIZE=1048576
50544    else
50545      LDFLAGS_STACK_SIZE=327680
50546    fi
50547    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50548  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50549    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50550  fi
50551
50552  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50553
50554  # Customize LDFLAGS for libs
50555  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50556
50557  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50558  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50559    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50560        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50561    JDKLIB_LIBS=""
50562  else
50563    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50564        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50565
50566    if test "xTARGET" = "xTARGET"; then
50567      # On some platforms (mac) the linker warns about non existing -L dirs.
50568      # For any of the variants server, client or minimal, the dir matches the
50569      # variant name. The "main" variant should be used for linking. For the
50570      # rest, the dir is just server.
50571      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50572          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50573        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50574            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50575      else
50576        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50577            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50578      fi
50579    elif test "xTARGET" = "xBUILD"; then
50580      # When building a buildjdk, it's always only the server variant
50581      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50582          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50583    fi
50584
50585    JDKLIB_LIBS="-ljava -ljvm"
50586    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50587      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50588    fi
50589
50590  fi
50591
50592LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50593
50594  # Set JVM_LIBS (per os)
50595  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50596    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50597  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50598    # FIXME: This hard-coded path is not really proper.
50599    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50600      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50601    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50602      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50603    fi
50604    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50605        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50606  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50607    JVM_LIBS="$JVM_LIBS -lm"
50608  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50609    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50610  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50611    JVM_LIBS="$JVM_LIBS -lm"
50612  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50613    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50614        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50615        wsock32.lib winmm.lib version.lib psapi.lib"
50616    fi
50617
50618  # Set JVM_ASFLAGS
50619  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50620    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50621      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50622    fi
50623  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50624    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50625  fi
50626
50627  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643  # Special extras...
50644  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50645    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50646      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50647      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50648    fi
50649    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50650    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50651  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50652    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50653    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50654  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50655    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698    # Execute function body
50699
50700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50701$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50702  supports=yes
50703
50704  saved_cxxflags="$CXXFLAGS"
50705  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50706  ac_ext=cpp
50707ac_cpp='$CXXCPP $CPPFLAGS'
50708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50711
50712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50713/* end confdefs.h.  */
50714int i;
50715_ACEOF
50716if ac_fn_cxx_try_compile "$LINENO"; then :
50717
50718else
50719  supports=no
50720fi
50721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50722  ac_ext=cpp
50723ac_cpp='$CXXCPP $CPPFLAGS'
50724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50727
50728  CXXFLAGS="$saved_cxxflags"
50729
50730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50731$as_echo "$supports" >&6; }
50732  if test "x$supports" = "xyes" ; then
50733    :
50734
50735  else
50736    :
50737    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50738  fi
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50752    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50753
50754  fi
50755  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50756    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50757    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50758  fi
50759
50760  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50761  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50762  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50763
50764  ###############################################################################
50765  #
50766  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50767  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50768  #
50769
50770  # Setup compiler/platform specific flags into
50771  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50772  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50773  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50774  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50775    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50776    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50777    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50778    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50779      # Force compatibility with i586 on 32 bit intel platforms.
50780      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50781      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50782    fi
50783    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50784        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50785    case $OPENJDK_BUILD_CPU_ARCH in
50786      arm )
50787        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50788        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50789        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50790        ;;
50791      ppc )
50792        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50793        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50794        ;;
50795      s390 )
50796        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50797        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50798        ;;
50799      * )
50800        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50801        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50802        ;;
50803    esac
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857
50858    # Execute function body
50859
50860  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50861  REFERENCE_VERSION=6
50862
50863  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50864    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50865  fi
50866
50867  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50868    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50869  fi
50870
50871  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50872  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50873
50874  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50875    :
50876
50877  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50878  # runs afoul of the more aggressive versions of these optimisations.
50879  # Notably, value range propagation now assumes that the this pointer of C++
50880  # member functions is non-null.
50881  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50882        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50883        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50884$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50885  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50886  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50887
50888  else
50889    :
50890
50891  fi
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50908
50909    # Restrict the debug information created by Clang to avoid
50910    # too big object files and speed the build up a little bit
50911    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50913    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50914      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50915        # Force compatibility with i586 on 32 bit intel platforms.
50916        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50917        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50918      fi
50919      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50920      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50921          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50922      case $OPENJDK_BUILD_CPU_ARCH in
50923        ppc )
50924          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50925          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50926          ;;
50927        * )
50928          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50929          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50930          ;;
50931      esac
50932    fi
50933  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50934    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50935    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50936    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50937      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50938    fi
50939
50940    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50941    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50942  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50943    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50944    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50945    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50946  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50947    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50948        -MD -Zc:wchar_t- -W3 -wd4800 \
50949        -DWIN32_LEAN_AND_MEAN \
50950        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50951        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50952        -DWIN32 -DIAL"
50953    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50954      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50955    else
50956      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50957    fi
50958    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50959    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50960    # studio.
50961    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50962      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50963      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50964      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50965    fi
50966  fi
50967
50968  ###############################################################################
50969
50970  # Adjust flags according to debug level.
50971  case $DEBUG_LEVEL in
50972    fastdebug | slowdebug )
50973      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50974      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50975      ;;
50976    release )
50977      ;;
50978    * )
50979      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50980      ;;
50981  esac
50982
50983  # Set some common defines. These works for all compilers, but assume
50984  # -D is universally accepted.
50985
50986  # Setup endianness
50987  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50988    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50989    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50990    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50991    #   Note: -Dmacro         is the same as    #define macro 1
50992    #         -Dmacro=        is the same as    #define macro
50993    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50994      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50995    else
50996      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50997    fi
50998  else
50999    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51000    # are defined in the system?
51001    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51002      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51003    else
51004      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51005    fi
51006  fi
51007
51008  # Setup target OS define. Use OS target name but in upper case.
51009  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51010  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51011
51012  # Setup target CPU
51013  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51014      $OPENJDK_BUILD_ADD_LP64 \
51015      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51016
51017  # Setup debug/release defines
51018  if test "x$DEBUG_LEVEL" = xrelease; then
51019    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51020    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51021      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51022    fi
51023  else
51024    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51025  fi
51026
51027  # Set some additional per-OS defines.
51028  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51029    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51030    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51031        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51032  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51033    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51034    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51035        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51036  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51037    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51038    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51039    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51040    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51041        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51042        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51043        -fno-omit-frame-pointer"
51044  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51045    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51046    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51047    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51048        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51049        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51050  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51051    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51052  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51053    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51054    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51055  fi
51056
51057  # Set some additional per-CPU defines.
51058  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51059    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51060  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51061    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51062  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51063    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51064      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51065      # fixes `relocation truncated to fit' error for gcc 4.1.
51066      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51067      # Use ppc64 instructions, but schedule for power5
51068      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51069    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51070      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51071    fi
51072  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51073    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51074      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51075      # Little endian machine uses ELFv2 ABI.
51076      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51077      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51078      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51079    fi
51080  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51081    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51082      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51083    fi
51084  fi
51085
51086  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51087    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51088  fi
51089
51090  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51091    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51092      # Solaris does not have _LP64=1 in the old build.
51093      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51094      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51095    fi
51096  fi
51097
51098  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51099  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51100    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51101        -Wunused-value -Woverloaded-virtual"
51102
51103    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158    # Execute function body
51159
51160  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51161  REFERENCE_VERSION=4.8
51162
51163  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51164    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51165  fi
51166
51167  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51168    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51169  fi
51170
51171  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51172  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51173
51174  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51175    :
51176
51177            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51178            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51179
51180
51181  else
51182    :
51183
51184  fi
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199    fi
51200    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51201      # Non-zero builds have stricter warnings
51202      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51203    else
51204      if test "x$TOOLCHAIN_TYPE" = xclang; then
51205        # Some versions of llvm do not like -Wundef
51206        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51207      fi
51208    fi
51209  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51210    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51211        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51212  fi
51213
51214  # Additional macosx handling
51215  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51216    # Setting these parameters makes it an error to link to macosx APIs that are
51217    # newer than the given OS version and makes the linked binaries compatible
51218    # even if built on a newer version of the OS.
51219    # The expected format is X.Y.Z
51220    MACOSX_VERSION_MIN=10.7.0
51221
51222
51223    # The macro takes the version with no dots, ex: 1070
51224    # Let the flags variables get resolved in make for easier override on make
51225    # command line.
51226    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)"
51227    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51228  fi
51229
51230  # Setup some hard coded includes
51231  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51232      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51233      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51234      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51235      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51236      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51237      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51238
51239  # The shared libraries are compiled using the picflag.
51240  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51241      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51242  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51243      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51244
51245  # Executable flags
51246  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51247  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51248
51249
51250
51251
51252
51253
51254  # Setup LDFLAGS et al.
51255  #
51256
51257  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51258    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51259    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51260    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51261    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51262      LDFLAGS_SAFESH="-safeseh"
51263      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51264      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51265      # NOTE: Old build added -machine. Probably not needed.
51266      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51267    else
51268      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51269    fi
51270  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51271      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51272      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51273        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51274        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51275    fi
51276  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51277    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51278    # We have previously set HAS_GNU_HASH if this is the case
51279    if test -n "$HAS_GNU_HASH"; then
51280      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51281      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51282      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51283    fi
51284      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51285        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51286    fi
51287    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51288      # And since we now know that the linker is gnu, then add -z defs, to forbid
51289      # undefined symbols in object files.
51290      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51291      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51292      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51293      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51294      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51295      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51296        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51297      fi
51298      case $DEBUG_LEVEL in
51299        release )
51300          # tell linker to optimize libraries.
51301          # Should this be supplied to the OSS linker as well?
51302          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51303          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51304          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51305          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51306            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51307          fi
51308          ;;
51309        slowdebug )
51310          # Hotspot always let the linker optimize
51311          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51312          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51313            # do relocations at load
51314            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51315            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51316            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51317          fi
51318          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51319            # mark relocations read only
51320            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51321            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51322            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51323          fi
51324          ;;
51325        fastdebug )
51326          # Hotspot always let the linker optimize
51327          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51328          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51329            # mark relocations read only
51330            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51331            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51332            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51333          fi
51334          ;;
51335        * )
51336          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51337          ;;
51338        esac
51339    fi
51340  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51341    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51342    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51343    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51344    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51345    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51346    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51347      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51348    fi
51349  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51350    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51351    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51352    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51353  fi
51354
51355  # Customize LDFLAGS for executables
51356
51357  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51358
51359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51360    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51361      LDFLAGS_STACK_SIZE=1048576
51362    else
51363      LDFLAGS_STACK_SIZE=327680
51364    fi
51365    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51366  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51367    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51368  fi
51369
51370  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51371
51372  # Customize LDFLAGS for libs
51373  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51374
51375  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51376  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51377    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51378        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51379    OPENJDK_BUILD_JDKLIB_LIBS=""
51380  else
51381    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51382        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51383
51384    if test "xBUILD" = "xTARGET"; then
51385      # On some platforms (mac) the linker warns about non existing -L dirs.
51386      # For any of the variants server, client or minimal, the dir matches the
51387      # variant name. The "main" variant should be used for linking. For the
51388      # rest, the dir is just server.
51389      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51390          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51391        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51392            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51393      else
51394        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51395            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51396      fi
51397    elif test "xBUILD" = "xBUILD"; then
51398      # When building a buildjdk, it's always only the server variant
51399      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51400          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51401    fi
51402
51403    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51404    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51405      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51406    fi
51407
51408  fi
51409
51410OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51411
51412  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51413  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51414    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51415  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51416    # FIXME: This hard-coded path is not really proper.
51417    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51418      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51419    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51420      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51421    fi
51422    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51423        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51424  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51425    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51426  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51427    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51428  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51429    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51430  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51431    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51432        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51433        wsock32.lib winmm.lib version.lib psapi.lib"
51434    fi
51435
51436  # Set OPENJDK_BUILD_JVM_ASFLAGS
51437  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51438    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51439      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51440    fi
51441  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51442    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51443  fi
51444
51445  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461  # Tests are only ever compiled for TARGET
51462  # Flags for compiling test libraries
51463  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51464  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51465
51466  # Flags for compiling test executables
51467  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51468  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51469
51470
51471
51472
51473
51474
51475  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51476  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51477
51478
51479
51480
51481
51482
51483  # Some Zero and Shark settings.
51484  # ZERO_ARCHFLAG tells the compiler which mode to build for
51485  case "${OPENJDK_TARGET_CPU}" in
51486    s390)
51487      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51488      ;;
51489    *)
51490      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51491  esac
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534    # Execute function body
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583    # Execute function body
51584
51585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51586$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51587  supports=yes
51588
51589  saved_cflags="$CFLAGS"
51590  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51591  ac_ext=c
51592ac_cpp='$CPP $CPPFLAGS'
51593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51595ac_compiler_gnu=$ac_cv_c_compiler_gnu
51596
51597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51598/* end confdefs.h.  */
51599int i;
51600_ACEOF
51601if ac_fn_c_try_compile "$LINENO"; then :
51602
51603else
51604  supports=no
51605fi
51606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51607  ac_ext=cpp
51608ac_cpp='$CXXCPP $CPPFLAGS'
51609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51612
51613  CFLAGS="$saved_cflags"
51614
51615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51616$as_echo "$supports" >&6; }
51617  if test "x$supports" = "xyes" ; then
51618    :
51619    C_COMP_SUPPORTS="yes"
51620  else
51621    :
51622    C_COMP_SUPPORTS="no"
51623  fi
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683    # Execute function body
51684
51685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51686$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51687  supports=yes
51688
51689  saved_cxxflags="$CXXFLAGS"
51690  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51691  ac_ext=cpp
51692ac_cpp='$CXXCPP $CPPFLAGS'
51693ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51694ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51695ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51696
51697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51698/* end confdefs.h.  */
51699int i;
51700_ACEOF
51701if ac_fn_cxx_try_compile "$LINENO"; then :
51702
51703else
51704  supports=no
51705fi
51706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51707  ac_ext=cpp
51708ac_cpp='$CXXCPP $CPPFLAGS'
51709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51712
51713  CXXFLAGS="$saved_cxxflags"
51714
51715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51716$as_echo "$supports" >&6; }
51717  if test "x$supports" = "xyes" ; then
51718    :
51719    CXX_COMP_SUPPORTS="yes"
51720  else
51721    :
51722    CXX_COMP_SUPPORTS="no"
51723  fi
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51738$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51739  supports=no
51740  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51741
51742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51743$as_echo "$supports" >&6; }
51744  if test "x$supports" = "xyes" ; then
51745    :
51746
51747  else
51748    :
51749    ZERO_ARCHFLAG=""
51750  fi
51751
51752
51753
51754
51755
51756
51757
51758
51759  # Check that the compiler supports -mX (or -qX on AIX) flags
51760  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808    # Execute function body
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
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    # Execute function body
51858
51859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51860$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51861  supports=yes
51862
51863  saved_cflags="$CFLAGS"
51864  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51865  ac_ext=c
51866ac_cpp='$CPP $CPPFLAGS'
51867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51869ac_compiler_gnu=$ac_cv_c_compiler_gnu
51870
51871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51872/* end confdefs.h.  */
51873int i;
51874_ACEOF
51875if ac_fn_c_try_compile "$LINENO"; then :
51876
51877else
51878  supports=no
51879fi
51880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51881  ac_ext=cpp
51882ac_cpp='$CXXCPP $CPPFLAGS'
51883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51886
51887  CFLAGS="$saved_cflags"
51888
51889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51890$as_echo "$supports" >&6; }
51891  if test "x$supports" = "xyes" ; then
51892    :
51893    C_COMP_SUPPORTS="yes"
51894  else
51895    :
51896    C_COMP_SUPPORTS="no"
51897  fi
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957    # Execute function body
51958
51959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51960$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51961  supports=yes
51962
51963  saved_cxxflags="$CXXFLAGS"
51964  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51965  ac_ext=cpp
51966ac_cpp='$CXXCPP $CPPFLAGS'
51967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51970
51971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51972/* end confdefs.h.  */
51973int i;
51974_ACEOF
51975if ac_fn_cxx_try_compile "$LINENO"; then :
51976
51977else
51978  supports=no
51979fi
51980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51981  ac_ext=cpp
51982ac_cpp='$CXXCPP $CPPFLAGS'
51983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51986
51987  CXXFLAGS="$saved_cxxflags"
51988
51989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51990$as_echo "$supports" >&6; }
51991  if test "x$supports" = "xyes" ; then
51992    :
51993    CXX_COMP_SUPPORTS="yes"
51994  else
51995    :
51996    CXX_COMP_SUPPORTS="no"
51997  fi
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52012$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52013  supports=no
52014  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52015
52016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52017$as_echo "$supports" >&6; }
52018  if test "x$supports" = "xyes" ; then
52019    :
52020    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52021  else
52022    :
52023    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52024  fi
52025
52026
52027
52028
52029
52030
52031
52032
52033  # Check whether --enable-warnings-as-errors was given.
52034if test "${enable_warnings_as_errors+set}" = set; then :
52035  enableval=$enable_warnings_as_errors;
52036fi
52037
52038
52039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52040$as_echo_n "checking if native warnings are errors... " >&6; }
52041  if test "x$enable_warnings_as_errors" = "xyes"; then
52042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52043$as_echo "yes (explicitly set)" >&6; }
52044    WARNINGS_AS_ERRORS=true
52045  elif test "x$enable_warnings_as_errors" = "xno"; then
52046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52047$as_echo "no" >&6; }
52048    WARNINGS_AS_ERRORS=false
52049  elif test "x$enable_warnings_as_errors" = "x"; then
52050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52051$as_echo "yes (default)" >&6; }
52052    WARNINGS_AS_ERRORS=true
52053  else
52054    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52055  fi
52056
52057  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52058    # Set legacy hotspot variable
52059    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52060  else
52061    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52062  fi
52063
52064
52065
52066
52067  case "${TOOLCHAIN_TYPE}" in
52068    microsoft)
52069      DISABLE_WARNING_PREFIX="-wd"
52070      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52071      ;;
52072    solstudio)
52073      DISABLE_WARNING_PREFIX="-erroff="
52074      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52075      ;;
52076    gcc)
52077      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125    # Execute function body
52126
52127
52128
52129
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    # Execute function body
52175
52176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52177$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52178  supports=yes
52179
52180  saved_cflags="$CFLAGS"
52181  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52182  ac_ext=c
52183ac_cpp='$CPP $CPPFLAGS'
52184ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52185ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52186ac_compiler_gnu=$ac_cv_c_compiler_gnu
52187
52188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52189/* end confdefs.h.  */
52190int i;
52191_ACEOF
52192if ac_fn_c_try_compile "$LINENO"; then :
52193
52194else
52195  supports=no
52196fi
52197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52198  ac_ext=cpp
52199ac_cpp='$CXXCPP $CPPFLAGS'
52200ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52201ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52202ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52203
52204  CFLAGS="$saved_cflags"
52205
52206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52207$as_echo "$supports" >&6; }
52208  if test "x$supports" = "xyes" ; then
52209    :
52210    C_COMP_SUPPORTS="yes"
52211  else
52212    :
52213    C_COMP_SUPPORTS="no"
52214  fi
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274    # Execute function body
52275
52276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52277$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52278  supports=yes
52279
52280  saved_cxxflags="$CXXFLAGS"
52281  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52282  ac_ext=cpp
52283ac_cpp='$CXXCPP $CPPFLAGS'
52284ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52285ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52286ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52287
52288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52289/* end confdefs.h.  */
52290int i;
52291_ACEOF
52292if ac_fn_cxx_try_compile "$LINENO"; then :
52293
52294else
52295  supports=no
52296fi
52297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52298  ac_ext=cpp
52299ac_cpp='$CXXCPP $CPPFLAGS'
52300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52303
52304  CXXFLAGS="$saved_cxxflags"
52305
52306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52307$as_echo "$supports" >&6; }
52308  if test "x$supports" = "xyes" ; then
52309    :
52310    CXX_COMP_SUPPORTS="yes"
52311  else
52312    :
52313    CXX_COMP_SUPPORTS="no"
52314  fi
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52329$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52330  supports=no
52331  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52332
52333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52334$as_echo "$supports" >&6; }
52335  if test "x$supports" = "xyes" ; then
52336    :
52337    GCC_CAN_DISABLE_WARNINGS=true
52338  else
52339    :
52340    GCC_CAN_DISABLE_WARNINGS=false
52341
52342  fi
52343
52344
52345
52346
52347
52348
52349      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52350        DISABLE_WARNING_PREFIX="-Wno-"
52351      else
52352        DISABLE_WARNING_PREFIX=
52353      fi
52354      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52355      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52356      # CFLAGS since any target specific flags will likely not work with the
52357      # build compiler
52358      CC_OLD="$CC"
52359      CXX_OLD="$CXX"
52360      CC="$BUILD_CC"
52361      CXX="$BUILD_CXX"
52362      CFLAGS_OLD="$CFLAGS"
52363      CFLAGS=""
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411    # Execute function body
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460    # Execute function body
52461
52462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52463$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52464  supports=yes
52465
52466  saved_cflags="$CFLAGS"
52467  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52468  ac_ext=c
52469ac_cpp='$CPP $CPPFLAGS'
52470ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52471ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52472ac_compiler_gnu=$ac_cv_c_compiler_gnu
52473
52474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52475/* end confdefs.h.  */
52476int i;
52477_ACEOF
52478if ac_fn_c_try_compile "$LINENO"; then :
52479
52480else
52481  supports=no
52482fi
52483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52484  ac_ext=cpp
52485ac_cpp='$CXXCPP $CPPFLAGS'
52486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52489
52490  CFLAGS="$saved_cflags"
52491
52492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52493$as_echo "$supports" >&6; }
52494  if test "x$supports" = "xyes" ; then
52495    :
52496    C_COMP_SUPPORTS="yes"
52497  else
52498    :
52499    C_COMP_SUPPORTS="no"
52500  fi
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560    # Execute function body
52561
52562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52563$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52564  supports=yes
52565
52566  saved_cxxflags="$CXXFLAGS"
52567  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52568  ac_ext=cpp
52569ac_cpp='$CXXCPP $CPPFLAGS'
52570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52573
52574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52575/* end confdefs.h.  */
52576int i;
52577_ACEOF
52578if ac_fn_cxx_try_compile "$LINENO"; then :
52579
52580else
52581  supports=no
52582fi
52583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52584  ac_ext=cpp
52585ac_cpp='$CXXCPP $CPPFLAGS'
52586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52589
52590  CXXFLAGS="$saved_cxxflags"
52591
52592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52593$as_echo "$supports" >&6; }
52594  if test "x$supports" = "xyes" ; then
52595    :
52596    CXX_COMP_SUPPORTS="yes"
52597  else
52598    :
52599    CXX_COMP_SUPPORTS="no"
52600  fi
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52615$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52616  supports=no
52617  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52618
52619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52620$as_echo "$supports" >&6; }
52621  if test "x$supports" = "xyes" ; then
52622    :
52623    BUILD_CC_CAN_DISABLE_WARNINGS=true
52624  else
52625    :
52626    BUILD_CC_CAN_DISABLE_WARNINGS=false
52627
52628  fi
52629
52630
52631
52632
52633
52634
52635      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52636        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52637      else
52638        BUILD_CC_DISABLE_WARNING_PREFIX=
52639      fi
52640      CC="$CC_OLD"
52641      CXX="$CXX_OLD"
52642      CFLAGS="$CFLAGS_OLD"
52643      ;;
52644    clang)
52645      DISABLE_WARNING_PREFIX="-Wno-"
52646      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52647      ;;
52648    xlc)
52649      DISABLE_WARNING_PREFIX="-qsuppress="
52650      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52651      ;;
52652  esac
52653
52654
52655
52656
52657
52658# Setup debug symbols (need objcopy from the toolchain for that)
52659
52660  #
52661  # NATIVE_DEBUG_SYMBOLS
52662  # This must be done after the toolchain is setup, since we're looking at objcopy.
52663  #
52664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52665$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52666
52667# Check whether --with-native-debug-symbols was given.
52668if test "${with_native_debug_symbols+set}" = set; then :
52669  withval=$with_native_debug_symbols;
52670        if test "x$OPENJDK_TARGET_OS" = xaix; then
52671          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52672            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52673          fi
52674        fi
52675
52676else
52677
52678        if test "x$OPENJDK_TARGET_OS" = xaix; then
52679          # AIX doesn't support 'zipped' so use 'internal' as default
52680          with_native_debug_symbols="internal"
52681        else
52682          if test "x$STATIC_BUILD" = xtrue; then
52683            with_native_debug_symbols="none"
52684          else
52685            with_native_debug_symbols="zipped"
52686          fi
52687        fi
52688
52689fi
52690
52691  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52693$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52694
52695  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52696
52697    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52698      if test "x$OBJCOPY" = x; then
52699        # enabling of enable-debug-symbols and can't find objcopy
52700        # this is an error
52701        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52702      fi
52703    fi
52704
52705    COMPILE_WITH_DEBUG_SYMBOLS=true
52706    COPY_DEBUG_SYMBOLS=true
52707    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52708  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52709    COMPILE_WITH_DEBUG_SYMBOLS=false
52710    COPY_DEBUG_SYMBOLS=false
52711    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52712  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52713    COMPILE_WITH_DEBUG_SYMBOLS=true
52714    COPY_DEBUG_SYMBOLS=false
52715    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52716  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52717
52718    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52719      if test "x$OBJCOPY" = x; then
52720        # enabling of enable-debug-symbols and can't find objcopy
52721        # this is an error
52722        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52723      fi
52724    fi
52725
52726    COMPILE_WITH_DEBUG_SYMBOLS=true
52727    COPY_DEBUG_SYMBOLS=true
52728    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52729  else
52730    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52731  fi
52732
52733  # --enable-debug-symbols is deprecated.
52734  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52735
52736  # Check whether --enable-debug-symbols was given.
52737if test "${enable_debug_symbols+set}" = set; then :
52738  enableval=$enable_debug_symbols;
52739fi
52740
52741  if test "x$enable_debug_symbols" != x; then
52742    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52743$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52744
52745    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52746      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52747$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52748    fi
52749
52750  fi
52751
52752
52753  # --enable-zip-debug-info is deprecated.
52754  # Please use --with-native-debug-symbols=zipped .
52755
52756  # Check whether --enable-zip-debug-info was given.
52757if test "${enable_zip_debug_info+set}" = set; then :
52758  enableval=$enable_zip_debug_info;
52759fi
52760
52761  if test "x$enable_zip_debug_info" != x; then
52762    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52763$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52764
52765    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52766      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52767$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52768    fi
52769
52770  fi
52771
52772
52773
52774
52775
52776
52777
52778  # Check whether --enable-native-coverage was given.
52779if test "${enable_native_coverage+set}" = set; then :
52780  enableval=$enable_native_coverage;
52781fi
52782
52783  GCOV_ENABLED="false"
52784  if test "x$enable_native_coverage" = "xyes"; then
52785    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52787$as_echo_n "checking if native coverage is enabled... " >&6; }
52788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52789$as_echo "yes" >&6; }
52790      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52791      GCOV_LDFLAGS="-fprofile-arcs"
52792      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52793      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52794      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52795      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52796      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52797      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52798      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52799      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52800      GCOV_ENABLED="true"
52801    else
52802      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52803    fi
52804  elif test "x$enable_native_coverage" = "xno"; then
52805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52806$as_echo_n "checking if native coverage is enabled... " >&6; }
52807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52808$as_echo "no" >&6; }
52809  elif test "x$enable_native_coverage" != "x"; then
52810    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52811  fi
52812
52813
52814
52815
52816# Need toolchain to setup dtrace
52817
52818  # Test for dtrace dependencies
52819  # Check whether --enable-dtrace was given.
52820if test "${enable_dtrace+set}" = set; then :
52821  enableval=$enable_dtrace;
52822fi
52823
52824
52825  DTRACE_DEP_MISSING=false
52826
52827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52828$as_echo_n "checking for dtrace tool... " >&6; }
52829  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52831$as_echo "$DTRACE" >&6; }
52832  else
52833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52834$as_echo "not found, cannot build dtrace" >&6; }
52835    DTRACE_DEP_MISSING=true
52836  fi
52837
52838  for ac_header in sys/sdt.h
52839do :
52840  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52841if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52842  cat >>confdefs.h <<_ACEOF
52843#define HAVE_SYS_SDT_H 1
52844_ACEOF
52845 DTRACE_HEADERS_OK=yes
52846else
52847  DTRACE_HEADERS_OK=no
52848fi
52849
52850done
52851
52852  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52853    DTRACE_DEP_MISSING=true
52854  fi
52855
52856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52857$as_echo_n "checking if dtrace should be built... " >&6; }
52858  if test "x$enable_dtrace" = "xyes"; then
52859    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52861$as_echo "no, missing dependencies" >&6; }
52862
52863  # Print a helpful message on how to acquire the necessary build dependency.
52864  # dtrace is the help tag: freetype, cups, alsa etc
52865  MISSING_DEPENDENCY=dtrace
52866
52867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52868    cygwin_help $MISSING_DEPENDENCY
52869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52870    msys_help $MISSING_DEPENDENCY
52871  else
52872    PKGHANDLER_COMMAND=
52873
52874    case $PKGHANDLER in
52875      apt-get)
52876        apt_help     $MISSING_DEPENDENCY ;;
52877      yum)
52878        yum_help     $MISSING_DEPENDENCY ;;
52879      brew)
52880        brew_help    $MISSING_DEPENDENCY ;;
52881      port)
52882        port_help    $MISSING_DEPENDENCY ;;
52883      pkgutil)
52884        pkgutil_help $MISSING_DEPENDENCY ;;
52885      pkgadd)
52886        pkgadd_help  $MISSING_DEPENDENCY ;;
52887    esac
52888
52889    if test "x$PKGHANDLER_COMMAND" != x; then
52890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52891    fi
52892  fi
52893
52894      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52895    else
52896      INCLUDE_DTRACE=true
52897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52898$as_echo "yes, forced" >&6; }
52899    fi
52900  elif test "x$enable_dtrace" = "xno"; then
52901    INCLUDE_DTRACE=false
52902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52903$as_echo "no, forced" >&6; }
52904  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52905    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52906      INCLUDE_DTRACE=false
52907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52908$as_echo "no, missing dependencies" >&6; }
52909    else
52910      INCLUDE_DTRACE=true
52911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52912$as_echo "yes, dependencies present" >&6; }
52913    fi
52914  else
52915    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52916  fi
52917
52918
52919
52920  # Check whether --enable-aot was given.
52921if test "${enable_aot+set}" = set; then :
52922  enableval=$enable_aot;
52923fi
52924
52925
52926  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52927    ENABLE_AOT="true"
52928  elif test "x$enable_aot" = "xyes"; then
52929    ENABLE_AOT="true"
52930  elif test "x$enable_aot" = "xno"; then
52931    ENABLE_AOT="false"
52932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52933$as_echo_n "checking if aot should be enabled... " >&6; }
52934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52935$as_echo "no, forced" >&6; }
52936  else
52937    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52938  fi
52939
52940  if test "x$ENABLE_AOT" = "xtrue"; then
52941    # Only enable AOT on linux-X64.
52942    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52943      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52944        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52945          ENABLE_AOT="true"
52946        else
52947          ENABLE_AOT="false"
52948          if test "x$enable_aot" = "xyes"; then
52949            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52950          fi
52951        fi
52952      else
52953        ENABLE_AOT="false"
52954        if test "x$enable_aot" = "xyes"; then
52955          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52956        fi
52957      fi
52958    else
52959      ENABLE_AOT="false"
52960      if test "x$enable_aot" = "xyes"; then
52961        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52962      fi
52963    fi
52964  fi
52965
52966
52967
52968
52969  # Check whether --enable-hotspot-gtest was given.
52970if test "${enable_hotspot_gtest+set}" = set; then :
52971  enableval=$enable_hotspot_gtest;
52972fi
52973
52974
52975  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52976    GTEST_DIR_EXISTS="true"
52977  else
52978    GTEST_DIR_EXISTS="false"
52979  fi
52980
52981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52982$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52983  if test "x$enable_hotspot_gtest" = "xyes"; then
52984    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52986$as_echo "yes, forced" >&6; }
52987      BUILD_GTEST="true"
52988    else
52989      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52990    fi
52991  elif test "x$enable_hotspot_gtest" = "xno"; then
52992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52993$as_echo "no, forced" >&6; }
52994    BUILD_GTEST="false"
52995  elif test "x$enable_hotspot_gtest" = "x"; then
52996    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52998$as_echo "yes" >&6; }
52999      BUILD_GTEST="true"
53000    else
53001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53002$as_echo "no" >&6; }
53003      BUILD_GTEST="false"
53004    fi
53005  else
53006    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53007  fi
53008
53009
53010
53011
53012###############################################################################
53013#
53014# Check dependencies for external and internal libraries.
53015#
53016###############################################################################
53017
53018# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53019
53020  # When using cygwin or msys, we need a wrapper binary that renames
53021  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53022  # @files and rewrites these too! This wrapper binary is
53023  # called fixpath.
53024  FIXPATH=
53025  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53027$as_echo_n "checking if fixpath can be created... " >&6; }
53028    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53029    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53030    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53031    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53032      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53033      FIXPATH="$FIXPATH_BIN -c"
53034    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53035      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53036      # @ was chosen as separator to minimize risk of other tools messing around with it
53037      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53038          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53039      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53040      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53041    fi
53042    FIXPATH_SRC_W="$FIXPATH_SRC"
53043    FIXPATH_BIN_W="$FIXPATH_BIN"
53044
53045  unix_path="$FIXPATH_SRC_W"
53046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53047    windows_path=`$CYGPATH -m "$unix_path"`
53048    FIXPATH_SRC_W="$windows_path"
53049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53050    windows_path=`cmd //c echo $unix_path`
53051    FIXPATH_SRC_W="$windows_path"
53052  fi
53053
53054
53055  unix_path="$FIXPATH_BIN_W"
53056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53057    windows_path=`$CYGPATH -m "$unix_path"`
53058    FIXPATH_BIN_W="$windows_path"
53059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53060    windows_path=`cmd //c echo $unix_path`
53061    FIXPATH_BIN_W="$windows_path"
53062  fi
53063
53064    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53065    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53066    cd $FIXPATH_DIR
53067    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53068    cd $CURDIR
53069
53070    if test ! -x $FIXPATH_BIN; then
53071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53072$as_echo "no" >&6; }
53073      cat $FIXPATH_DIR/fixpath1.log
53074      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53075    fi
53076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53077$as_echo "yes" >&6; }
53078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53079$as_echo_n "checking if fixpath.exe works... " >&6; }
53080    cd $FIXPATH_DIR
53081    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53082        > $FIXPATH_DIR/fixpath2.log 2>&1
53083    cd $CURDIR
53084    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53086$as_echo "no" >&6; }
53087      cat $FIXPATH_DIR/fixpath2.log
53088      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53089    fi
53090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53091$as_echo "yes" >&6; }
53092
53093    FIXPATH_DETACH_FLAG="--detach"
53094  fi
53095
53096
53097
53098
53099
53100
53101  # Check if X11 is needed
53102  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53103    # No X11 support on windows or macosx
53104    NEEDS_LIB_X11=false
53105  else
53106    # All other instances need X11, even if building headless only, libawt still
53107    # needs X11 headers.
53108    NEEDS_LIB_X11=true
53109  fi
53110
53111  # Check if cups is needed
53112  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53113    # Windows have a separate print system
53114    NEEDS_LIB_CUPS=false
53115  else
53116    NEEDS_LIB_CUPS=true
53117  fi
53118
53119  # A custom hook may have set this already
53120  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53121    NEEDS_LIB_FREETYPE=true
53122  fi
53123
53124  # Check if alsa is needed
53125  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53126    NEEDS_LIB_ALSA=true
53127  else
53128    NEEDS_LIB_ALSA=false
53129  fi
53130
53131  # Check if ffi is needed
53132  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53133    NEEDS_LIB_FFI=true
53134  else
53135    NEEDS_LIB_FFI=false
53136  fi
53137
53138
53139  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53140  # dynamic build is configured on command line.
53141
53142# Check whether --with-stdc++lib was given.
53143if test "${with_stdc__lib+set}" = set; then :
53144  withval=$with_stdc__lib;
53145        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53146                && test "x$with_stdc__lib" != xdefault; then
53147          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53148        fi
53149
53150else
53151  with_stdc__lib=default
53152
53153fi
53154
53155
53156  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53157    # Test if stdc++ can be linked statically.
53158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53159$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53160    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53161    ac_ext=cpp
53162ac_cpp='$CXXCPP $CPPFLAGS'
53163ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53164ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53165ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53166
53167    OLD_LIBS="$LIBS"
53168    LIBS="$STATIC_STDCXX_FLAGS"
53169    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53170/* end confdefs.h.  */
53171
53172int
53173main ()
53174{
53175return 0;
53176  ;
53177  return 0;
53178}
53179_ACEOF
53180if ac_fn_cxx_try_link "$LINENO"; then :
53181  has_static_libstdcxx=yes
53182else
53183  has_static_libstdcxx=no
53184fi
53185rm -f core conftest.err conftest.$ac_objext \
53186    conftest$ac_exeext conftest.$ac_ext
53187    LIBS="$OLD_LIBS"
53188    ac_ext=cpp
53189ac_cpp='$CXXCPP $CPPFLAGS'
53190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53193
53194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53195$as_echo "$has_static_libstdcxx" >&6; }
53196
53197    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53198      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53199    fi
53200
53201    # If dynamic was requested, it's available since it would fail above otherwise.
53202    # If dynamic wasn't requested, go with static unless it isn't available.
53203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53204$as_echo_n "checking how to link with libstdc++... " >&6; }
53205    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53206        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53208$as_echo "dynamic" >&6; }
53209    else
53210      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53211      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53212      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53213      # just use the same setting as for the TARGET toolchain.
53214      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53216$as_echo "static" >&6; }
53217    fi
53218  fi
53219
53220  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53221  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53222    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53223  fi
53224
53225
53226
53227  # Setup Windows runtime dlls
53228  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53229
53230
53231# Check whether --with-msvcr-dll was given.
53232if test "${with_msvcr_dll+set}" = set; then :
53233  withval=$with_msvcr_dll;
53234fi
53235
53236
53237  if test "x$with_msvcr_dll" != x; then
53238    # If given explicitly by user, do not probe. If not present, fail directly.
53239
53240  DLL_NAME="$MSVCR_NAME"
53241  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53242  METHOD="--with-msvcr-dll"
53243  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53244    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53245$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53246
53247    # Need to check if the found msvcr is correct architecture
53248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53249$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53250    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53252      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53253      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53255        CORRECT_MSVCR_ARCH="PE32 executable"
53256      else
53257        CORRECT_MSVCR_ARCH="PE32+ executable"
53258      fi
53259    else
53260      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53261        CORRECT_MSVCR_ARCH=386
53262      else
53263        CORRECT_MSVCR_ARCH=x86-64
53264      fi
53265    fi
53266    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53268$as_echo "ok" >&6; }
53269      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53270
53271  # Only process if variable expands to non-empty
53272
53273  if test "x$MSVC_DLL" != x; then
53274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53275
53276  # Input might be given as Windows format, start by converting to
53277  # unix format.
53278  path="$MSVC_DLL"
53279  new_path=`$CYGPATH -u "$path"`
53280
53281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53284  # "foo.exe" is OK but "foo" is an error.
53285  #
53286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53287  # It is also a way to make sure we got the proper file name for the real test later on.
53288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53289  if test "x$test_shortpath" = x; then
53290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53291$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53292    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53293  fi
53294
53295  # Call helper function which possibly converts this using DOS-style short mode.
53296  # If so, the updated path is stored in $new_path.
53297
53298  input_path="$new_path"
53299  # Check if we need to convert this using DOS-style short mode. If the path
53300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53301  # take no chances and rewrite it.
53302  # Note: m4 eats our [], so we need to use [ and ] instead.
53303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53304  if test "x$has_forbidden_chars" != x; then
53305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53309      # Going to short mode and back again did indeed matter. Since short mode is
53310      # case insensitive, let's make it lowercase to improve readability.
53311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53312      # Now convert it back to Unix-style (cygpath)
53313      input_path=`$CYGPATH -u "$shortmode_path"`
53314      new_path="$input_path"
53315    fi
53316  fi
53317
53318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53319  if test "x$test_cygdrive_prefix" = x; then
53320    # As a simple fix, exclude /usr/bin since it's not a real path.
53321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53323      # a path prefixed by /cygdrive for fixpath to work.
53324      new_path="$CYGWIN_ROOT_PATH$input_path"
53325    fi
53326  fi
53327
53328
53329  if test "x$path" != "x$new_path"; then
53330    MSVC_DLL="$new_path"
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53333  fi
53334
53335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53336
53337  path="$MSVC_DLL"
53338  has_colon=`$ECHO $path | $GREP ^.:`
53339  new_path="$path"
53340  if test "x$has_colon" = x; then
53341    # Not in mixed or Windows style, start by that.
53342    new_path=`cmd //c echo $path`
53343  fi
53344
53345
53346  input_path="$new_path"
53347  # Check if we need to convert this using DOS-style short mode. If the path
53348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53349  # take no chances and rewrite it.
53350  # Note: m4 eats our [], so we need to use [ and ] instead.
53351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53352  if test "x$has_forbidden_chars" != x; then
53353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53355  fi
53356
53357
53358  windows_path="$new_path"
53359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53360    unix_path=`$CYGPATH -u "$windows_path"`
53361    new_path="$unix_path"
53362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53364    new_path="$unix_path"
53365  fi
53366
53367  if test "x$path" != "x$new_path"; then
53368    MSVC_DLL="$new_path"
53369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53370$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53371  fi
53372
53373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53375
53376    else
53377      # We're on a unix platform. Hooray! :)
53378      path="$MSVC_DLL"
53379      has_space=`$ECHO "$path" | $GREP " "`
53380      if test "x$has_space" != x; then
53381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53382$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53384      fi
53385
53386      # Use eval to expand a potential ~
53387      eval path="$path"
53388      if test ! -f "$path" && test ! -d "$path"; then
53389        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53390      fi
53391
53392      if test -d "$path"; then
53393        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53394      else
53395        dir="`$DIRNAME "$path"`"
53396        base="`$BASENAME "$path"`"
53397        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53398      fi
53399    fi
53400  fi
53401
53402      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53403$as_echo_n "checking for $DLL_NAME... " >&6; }
53404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53405$as_echo "$MSVC_DLL" >&6; }
53406    else
53407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53408$as_echo "incorrect, ignoring" >&6; }
53409      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53410$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53411    fi
53412  fi
53413
53414    if test "x$MSVC_DLL" = x; then
53415      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53416    fi
53417    MSVCR_DLL="$MSVC_DLL"
53418  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53419
53420  DLL_NAME="$MSVCR_NAME"
53421  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53422  METHOD="devkit"
53423  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53424    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53425$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53426
53427    # Need to check if the found msvcr is correct architecture
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53429$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53430    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53432      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53433      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53434      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53435        CORRECT_MSVCR_ARCH="PE32 executable"
53436      else
53437        CORRECT_MSVCR_ARCH="PE32+ executable"
53438      fi
53439    else
53440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53441        CORRECT_MSVCR_ARCH=386
53442      else
53443        CORRECT_MSVCR_ARCH=x86-64
53444      fi
53445    fi
53446    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53448$as_echo "ok" >&6; }
53449      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53450
53451  # Only process if variable expands to non-empty
53452
53453  if test "x$MSVC_DLL" != x; then
53454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53455
53456  # Input might be given as Windows format, start by converting to
53457  # unix format.
53458  path="$MSVC_DLL"
53459  new_path=`$CYGPATH -u "$path"`
53460
53461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53464  # "foo.exe" is OK but "foo" is an error.
53465  #
53466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53467  # It is also a way to make sure we got the proper file name for the real test later on.
53468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53469  if test "x$test_shortpath" = x; then
53470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53471$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53472    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53473  fi
53474
53475  # Call helper function which possibly converts this using DOS-style short mode.
53476  # If so, the updated path is stored in $new_path.
53477
53478  input_path="$new_path"
53479  # Check if we need to convert this using DOS-style short mode. If the path
53480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53481  # take no chances and rewrite it.
53482  # Note: m4 eats our [], so we need to use [ and ] instead.
53483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53484  if test "x$has_forbidden_chars" != x; then
53485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53489      # Going to short mode and back again did indeed matter. Since short mode is
53490      # case insensitive, let's make it lowercase to improve readability.
53491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53492      # Now convert it back to Unix-style (cygpath)
53493      input_path=`$CYGPATH -u "$shortmode_path"`
53494      new_path="$input_path"
53495    fi
53496  fi
53497
53498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53499  if test "x$test_cygdrive_prefix" = x; then
53500    # As a simple fix, exclude /usr/bin since it's not a real path.
53501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53503      # a path prefixed by /cygdrive for fixpath to work.
53504      new_path="$CYGWIN_ROOT_PATH$input_path"
53505    fi
53506  fi
53507
53508
53509  if test "x$path" != "x$new_path"; then
53510    MSVC_DLL="$new_path"
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53513  fi
53514
53515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53516
53517  path="$MSVC_DLL"
53518  has_colon=`$ECHO $path | $GREP ^.:`
53519  new_path="$path"
53520  if test "x$has_colon" = x; then
53521    # Not in mixed or Windows style, start by that.
53522    new_path=`cmd //c echo $path`
53523  fi
53524
53525
53526  input_path="$new_path"
53527  # Check if we need to convert this using DOS-style short mode. If the path
53528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53529  # take no chances and rewrite it.
53530  # Note: m4 eats our [], so we need to use [ and ] instead.
53531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53532  if test "x$has_forbidden_chars" != x; then
53533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53535  fi
53536
53537
53538  windows_path="$new_path"
53539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53540    unix_path=`$CYGPATH -u "$windows_path"`
53541    new_path="$unix_path"
53542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53544    new_path="$unix_path"
53545  fi
53546
53547  if test "x$path" != "x$new_path"; then
53548    MSVC_DLL="$new_path"
53549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53550$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53551  fi
53552
53553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53555
53556    else
53557      # We're on a unix platform. Hooray! :)
53558      path="$MSVC_DLL"
53559      has_space=`$ECHO "$path" | $GREP " "`
53560      if test "x$has_space" != x; then
53561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53562$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53564      fi
53565
53566      # Use eval to expand a potential ~
53567      eval path="$path"
53568      if test ! -f "$path" && test ! -d "$path"; then
53569        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53570      fi
53571
53572      if test -d "$path"; then
53573        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53574      else
53575        dir="`$DIRNAME "$path"`"
53576        base="`$BASENAME "$path"`"
53577        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53578      fi
53579    fi
53580  fi
53581
53582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53583$as_echo_n "checking for $DLL_NAME... " >&6; }
53584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53585$as_echo "$MSVC_DLL" >&6; }
53586    else
53587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53588$as_echo "incorrect, ignoring" >&6; }
53589      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53590$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53591    fi
53592  fi
53593
53594    if test "x$MSVC_DLL" = x; then
53595      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53596    fi
53597    MSVCR_DLL="$MSVC_DLL"
53598  else
53599
53600  DLL_NAME="${MSVCR_NAME}"
53601  MSVC_DLL=
53602
53603  if test "x$MSVC_DLL" = x; then
53604    # Probe: Using well-known location from Visual Studio 10.0
53605    if test "x$VCINSTALLDIR" != x; then
53606      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53607
53608  windows_path="$CYGWIN_VC_INSTALL_DIR"
53609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53610    unix_path=`$CYGPATH -u "$windows_path"`
53611    CYGWIN_VC_INSTALL_DIR="$unix_path"
53612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53614    CYGWIN_VC_INSTALL_DIR="$unix_path"
53615  fi
53616
53617      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53618        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53619      else
53620        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53621      fi
53622      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53623
53624  DLL_NAME="$DLL_NAME"
53625  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53626  METHOD="well-known location in VCINSTALLDIR"
53627  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53629$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53630
53631    # Need to check if the found msvcr is correct architecture
53632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53633$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53634    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53636      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53637      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53638      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53639        CORRECT_MSVCR_ARCH="PE32 executable"
53640      else
53641        CORRECT_MSVCR_ARCH="PE32+ executable"
53642      fi
53643    else
53644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53645        CORRECT_MSVCR_ARCH=386
53646      else
53647        CORRECT_MSVCR_ARCH=x86-64
53648      fi
53649    fi
53650    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53652$as_echo "ok" >&6; }
53653      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53654
53655  # Only process if variable expands to non-empty
53656
53657  if test "x$MSVC_DLL" != x; then
53658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53659
53660  # Input might be given as Windows format, start by converting to
53661  # unix format.
53662  path="$MSVC_DLL"
53663  new_path=`$CYGPATH -u "$path"`
53664
53665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53668  # "foo.exe" is OK but "foo" is an error.
53669  #
53670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53671  # It is also a way to make sure we got the proper file name for the real test later on.
53672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53673  if test "x$test_shortpath" = x; then
53674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53675$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53676    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53677  fi
53678
53679  # Call helper function which possibly converts this using DOS-style short mode.
53680  # If so, the updated path is stored in $new_path.
53681
53682  input_path="$new_path"
53683  # Check if we need to convert this using DOS-style short mode. If the path
53684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53685  # take no chances and rewrite it.
53686  # Note: m4 eats our [], so we need to use [ and ] instead.
53687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53688  if test "x$has_forbidden_chars" != x; then
53689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53693      # Going to short mode and back again did indeed matter. Since short mode is
53694      # case insensitive, let's make it lowercase to improve readability.
53695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53696      # Now convert it back to Unix-style (cygpath)
53697      input_path=`$CYGPATH -u "$shortmode_path"`
53698      new_path="$input_path"
53699    fi
53700  fi
53701
53702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53703  if test "x$test_cygdrive_prefix" = x; then
53704    # As a simple fix, exclude /usr/bin since it's not a real path.
53705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53707      # a path prefixed by /cygdrive for fixpath to work.
53708      new_path="$CYGWIN_ROOT_PATH$input_path"
53709    fi
53710  fi
53711
53712
53713  if test "x$path" != "x$new_path"; then
53714    MSVC_DLL="$new_path"
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53716$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53717  fi
53718
53719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53720
53721  path="$MSVC_DLL"
53722  has_colon=`$ECHO $path | $GREP ^.:`
53723  new_path="$path"
53724  if test "x$has_colon" = x; then
53725    # Not in mixed or Windows style, start by that.
53726    new_path=`cmd //c echo $path`
53727  fi
53728
53729
53730  input_path="$new_path"
53731  # Check if we need to convert this using DOS-style short mode. If the path
53732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53733  # take no chances and rewrite it.
53734  # Note: m4 eats our [], so we need to use [ and ] instead.
53735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53736  if test "x$has_forbidden_chars" != x; then
53737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53739  fi
53740
53741
53742  windows_path="$new_path"
53743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53744    unix_path=`$CYGPATH -u "$windows_path"`
53745    new_path="$unix_path"
53746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53748    new_path="$unix_path"
53749  fi
53750
53751  if test "x$path" != "x$new_path"; then
53752    MSVC_DLL="$new_path"
53753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53754$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53755  fi
53756
53757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53759
53760    else
53761      # We're on a unix platform. Hooray! :)
53762      path="$MSVC_DLL"
53763      has_space=`$ECHO "$path" | $GREP " "`
53764      if test "x$has_space" != x; then
53765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53766$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53768      fi
53769
53770      # Use eval to expand a potential ~
53771      eval path="$path"
53772      if test ! -f "$path" && test ! -d "$path"; then
53773        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53774      fi
53775
53776      if test -d "$path"; then
53777        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53778      else
53779        dir="`$DIRNAME "$path"`"
53780        base="`$BASENAME "$path"`"
53781        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53782      fi
53783    fi
53784  fi
53785
53786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53787$as_echo_n "checking for $DLL_NAME... " >&6; }
53788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53789$as_echo "$MSVC_DLL" >&6; }
53790    else
53791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53792$as_echo "incorrect, ignoring" >&6; }
53793      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53794$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53795    fi
53796  fi
53797
53798    fi
53799  fi
53800
53801  if test "x$MSVC_DLL" = x; then
53802    # Probe: Check in the Boot JDK directory.
53803    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53804
53805  DLL_NAME="$DLL_NAME"
53806  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53807  METHOD="well-known location in Boot JDK"
53808  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53809    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53810$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53811
53812    # Need to check if the found msvcr is correct architecture
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53814$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53815    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53817      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53818      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53819      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53820        CORRECT_MSVCR_ARCH="PE32 executable"
53821      else
53822        CORRECT_MSVCR_ARCH="PE32+ executable"
53823      fi
53824    else
53825      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53826        CORRECT_MSVCR_ARCH=386
53827      else
53828        CORRECT_MSVCR_ARCH=x86-64
53829      fi
53830    fi
53831    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53833$as_echo "ok" >&6; }
53834      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53835
53836  # Only process if variable expands to non-empty
53837
53838  if test "x$MSVC_DLL" != x; then
53839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53840
53841  # Input might be given as Windows format, start by converting to
53842  # unix format.
53843  path="$MSVC_DLL"
53844  new_path=`$CYGPATH -u "$path"`
53845
53846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53849  # "foo.exe" is OK but "foo" is an error.
53850  #
53851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53852  # It is also a way to make sure we got the proper file name for the real test later on.
53853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53854  if test "x$test_shortpath" = x; then
53855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53856$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53857    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53858  fi
53859
53860  # Call helper function which possibly converts this using DOS-style short mode.
53861  # If so, the updated path is stored in $new_path.
53862
53863  input_path="$new_path"
53864  # Check if we need to convert this using DOS-style short mode. If the path
53865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53866  # take no chances and rewrite it.
53867  # Note: m4 eats our [], so we need to use [ and ] instead.
53868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53869  if test "x$has_forbidden_chars" != x; then
53870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53874      # Going to short mode and back again did indeed matter. Since short mode is
53875      # case insensitive, let's make it lowercase to improve readability.
53876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53877      # Now convert it back to Unix-style (cygpath)
53878      input_path=`$CYGPATH -u "$shortmode_path"`
53879      new_path="$input_path"
53880    fi
53881  fi
53882
53883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53884  if test "x$test_cygdrive_prefix" = x; then
53885    # As a simple fix, exclude /usr/bin since it's not a real path.
53886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53888      # a path prefixed by /cygdrive for fixpath to work.
53889      new_path="$CYGWIN_ROOT_PATH$input_path"
53890    fi
53891  fi
53892
53893
53894  if test "x$path" != "x$new_path"; then
53895    MSVC_DLL="$new_path"
53896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53897$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53898  fi
53899
53900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53901
53902  path="$MSVC_DLL"
53903  has_colon=`$ECHO $path | $GREP ^.:`
53904  new_path="$path"
53905  if test "x$has_colon" = x; then
53906    # Not in mixed or Windows style, start by that.
53907    new_path=`cmd //c echo $path`
53908  fi
53909
53910
53911  input_path="$new_path"
53912  # Check if we need to convert this using DOS-style short mode. If the path
53913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53914  # take no chances and rewrite it.
53915  # Note: m4 eats our [], so we need to use [ and ] instead.
53916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53917  if test "x$has_forbidden_chars" != x; then
53918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53920  fi
53921
53922
53923  windows_path="$new_path"
53924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53925    unix_path=`$CYGPATH -u "$windows_path"`
53926    new_path="$unix_path"
53927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53929    new_path="$unix_path"
53930  fi
53931
53932  if test "x$path" != "x$new_path"; then
53933    MSVC_DLL="$new_path"
53934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53935$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53936  fi
53937
53938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53940
53941    else
53942      # We're on a unix platform. Hooray! :)
53943      path="$MSVC_DLL"
53944      has_space=`$ECHO "$path" | $GREP " "`
53945      if test "x$has_space" != x; then
53946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53947$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53949      fi
53950
53951      # Use eval to expand a potential ~
53952      eval path="$path"
53953      if test ! -f "$path" && test ! -d "$path"; then
53954        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53955      fi
53956
53957      if test -d "$path"; then
53958        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53959      else
53960        dir="`$DIRNAME "$path"`"
53961        base="`$BASENAME "$path"`"
53962        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53963      fi
53964    fi
53965  fi
53966
53967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53968$as_echo_n "checking for $DLL_NAME... " >&6; }
53969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53970$as_echo "$MSVC_DLL" >&6; }
53971    else
53972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53973$as_echo "incorrect, ignoring" >&6; }
53974      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53975$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53976    fi
53977  fi
53978
53979  fi
53980
53981  if test "x$MSVC_DLL" = x; then
53982    # Probe: Look in the Windows system32 directory
53983    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53984
53985  windows_path="$CYGWIN_SYSTEMROOT"
53986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53987    unix_path=`$CYGPATH -u "$windows_path"`
53988    CYGWIN_SYSTEMROOT="$unix_path"
53989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53991    CYGWIN_SYSTEMROOT="$unix_path"
53992  fi
53993
53994    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53995
53996  DLL_NAME="$DLL_NAME"
53997  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53998  METHOD="well-known location in SYSTEMROOT"
53999  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54001$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54002
54003    # Need to check if the found msvcr is correct architecture
54004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54005$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54006    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54008      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54009      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54011        CORRECT_MSVCR_ARCH="PE32 executable"
54012      else
54013        CORRECT_MSVCR_ARCH="PE32+ executable"
54014      fi
54015    else
54016      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54017        CORRECT_MSVCR_ARCH=386
54018      else
54019        CORRECT_MSVCR_ARCH=x86-64
54020      fi
54021    fi
54022    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54024$as_echo "ok" >&6; }
54025      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54026
54027  # Only process if variable expands to non-empty
54028
54029  if test "x$MSVC_DLL" != x; then
54030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54031
54032  # Input might be given as Windows format, start by converting to
54033  # unix format.
54034  path="$MSVC_DLL"
54035  new_path=`$CYGPATH -u "$path"`
54036
54037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54040  # "foo.exe" is OK but "foo" is an error.
54041  #
54042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54043  # It is also a way to make sure we got the proper file name for the real test later on.
54044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54045  if test "x$test_shortpath" = x; then
54046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54048    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54049  fi
54050
54051  # Call helper function which possibly converts this using DOS-style short mode.
54052  # If so, the updated path is stored in $new_path.
54053
54054  input_path="$new_path"
54055  # Check if we need to convert this using DOS-style short mode. If the path
54056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54057  # take no chances and rewrite it.
54058  # Note: m4 eats our [], so we need to use [ and ] instead.
54059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54060  if test "x$has_forbidden_chars" != x; then
54061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54065      # Going to short mode and back again did indeed matter. Since short mode is
54066      # case insensitive, let's make it lowercase to improve readability.
54067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54068      # Now convert it back to Unix-style (cygpath)
54069      input_path=`$CYGPATH -u "$shortmode_path"`
54070      new_path="$input_path"
54071    fi
54072  fi
54073
54074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54075  if test "x$test_cygdrive_prefix" = x; then
54076    # As a simple fix, exclude /usr/bin since it's not a real path.
54077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54079      # a path prefixed by /cygdrive for fixpath to work.
54080      new_path="$CYGWIN_ROOT_PATH$input_path"
54081    fi
54082  fi
54083
54084
54085  if test "x$path" != "x$new_path"; then
54086    MSVC_DLL="$new_path"
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54089  fi
54090
54091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54092
54093  path="$MSVC_DLL"
54094  has_colon=`$ECHO $path | $GREP ^.:`
54095  new_path="$path"
54096  if test "x$has_colon" = x; then
54097    # Not in mixed or Windows style, start by that.
54098    new_path=`cmd //c echo $path`
54099  fi
54100
54101
54102  input_path="$new_path"
54103  # Check if we need to convert this using DOS-style short mode. If the path
54104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54105  # take no chances and rewrite it.
54106  # Note: m4 eats our [], so we need to use [ and ] instead.
54107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54108  if test "x$has_forbidden_chars" != x; then
54109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54111  fi
54112
54113
54114  windows_path="$new_path"
54115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54116    unix_path=`$CYGPATH -u "$windows_path"`
54117    new_path="$unix_path"
54118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54120    new_path="$unix_path"
54121  fi
54122
54123  if test "x$path" != "x$new_path"; then
54124    MSVC_DLL="$new_path"
54125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54127  fi
54128
54129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54131
54132    else
54133      # We're on a unix platform. Hooray! :)
54134      path="$MSVC_DLL"
54135      has_space=`$ECHO "$path" | $GREP " "`
54136      if test "x$has_space" != x; then
54137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54138$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54140      fi
54141
54142      # Use eval to expand a potential ~
54143      eval path="$path"
54144      if test ! -f "$path" && test ! -d "$path"; then
54145        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54146      fi
54147
54148      if test -d "$path"; then
54149        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54150      else
54151        dir="`$DIRNAME "$path"`"
54152        base="`$BASENAME "$path"`"
54153        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54154      fi
54155    fi
54156  fi
54157
54158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54159$as_echo_n "checking for $DLL_NAME... " >&6; }
54160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54161$as_echo "$MSVC_DLL" >&6; }
54162    else
54163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54164$as_echo "incorrect, ignoring" >&6; }
54165      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54166$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54167    fi
54168  fi
54169
54170  fi
54171
54172  if test "x$MSVC_DLL" = x; then
54173    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54174    if test "x$VS100COMNTOOLS" != x; then
54175      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54176
54177  windows_path="$CYGWIN_VS_TOOLS_DIR"
54178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54179    unix_path=`$CYGPATH -u "$windows_path"`
54180    CYGWIN_VS_TOOLS_DIR="$unix_path"
54181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54183    CYGWIN_VS_TOOLS_DIR="$unix_path"
54184  fi
54185
54186      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54187        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54188	    | $GREP -i /x64/ | $HEAD --lines 1`
54189      else
54190        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54191	    | $GREP -i /x86/ | $HEAD --lines 1`
54192      fi
54193
54194  DLL_NAME="$DLL_NAME"
54195  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54196  METHOD="search of VS100COMNTOOLS"
54197  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54198    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54199$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54200
54201    # Need to check if the found msvcr is correct architecture
54202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54203$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54204    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54206      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54207      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54208      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54209        CORRECT_MSVCR_ARCH="PE32 executable"
54210      else
54211        CORRECT_MSVCR_ARCH="PE32+ executable"
54212      fi
54213    else
54214      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54215        CORRECT_MSVCR_ARCH=386
54216      else
54217        CORRECT_MSVCR_ARCH=x86-64
54218      fi
54219    fi
54220    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54222$as_echo "ok" >&6; }
54223      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54224
54225  # Only process if variable expands to non-empty
54226
54227  if test "x$MSVC_DLL" != x; then
54228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54229
54230  # Input might be given as Windows format, start by converting to
54231  # unix format.
54232  path="$MSVC_DLL"
54233  new_path=`$CYGPATH -u "$path"`
54234
54235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54238  # "foo.exe" is OK but "foo" is an error.
54239  #
54240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54241  # It is also a way to make sure we got the proper file name for the real test later on.
54242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54243  if test "x$test_shortpath" = x; then
54244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54245$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54246    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54247  fi
54248
54249  # Call helper function which possibly converts this using DOS-style short mode.
54250  # If so, the updated path is stored in $new_path.
54251
54252  input_path="$new_path"
54253  # Check if we need to convert this using DOS-style short mode. If the path
54254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54255  # take no chances and rewrite it.
54256  # Note: m4 eats our [], so we need to use [ and ] instead.
54257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54258  if test "x$has_forbidden_chars" != x; then
54259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54263      # Going to short mode and back again did indeed matter. Since short mode is
54264      # case insensitive, let's make it lowercase to improve readability.
54265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54266      # Now convert it back to Unix-style (cygpath)
54267      input_path=`$CYGPATH -u "$shortmode_path"`
54268      new_path="$input_path"
54269    fi
54270  fi
54271
54272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54273  if test "x$test_cygdrive_prefix" = x; then
54274    # As a simple fix, exclude /usr/bin since it's not a real path.
54275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54277      # a path prefixed by /cygdrive for fixpath to work.
54278      new_path="$CYGWIN_ROOT_PATH$input_path"
54279    fi
54280  fi
54281
54282
54283  if test "x$path" != "x$new_path"; then
54284    MSVC_DLL="$new_path"
54285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54286$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54287  fi
54288
54289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54290
54291  path="$MSVC_DLL"
54292  has_colon=`$ECHO $path | $GREP ^.:`
54293  new_path="$path"
54294  if test "x$has_colon" = x; then
54295    # Not in mixed or Windows style, start by that.
54296    new_path=`cmd //c echo $path`
54297  fi
54298
54299
54300  input_path="$new_path"
54301  # Check if we need to convert this using DOS-style short mode. If the path
54302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54303  # take no chances and rewrite it.
54304  # Note: m4 eats our [], so we need to use [ and ] instead.
54305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54306  if test "x$has_forbidden_chars" != x; then
54307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54309  fi
54310
54311
54312  windows_path="$new_path"
54313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54314    unix_path=`$CYGPATH -u "$windows_path"`
54315    new_path="$unix_path"
54316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54318    new_path="$unix_path"
54319  fi
54320
54321  if test "x$path" != "x$new_path"; then
54322    MSVC_DLL="$new_path"
54323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54324$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54325  fi
54326
54327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54329
54330    else
54331      # We're on a unix platform. Hooray! :)
54332      path="$MSVC_DLL"
54333      has_space=`$ECHO "$path" | $GREP " "`
54334      if test "x$has_space" != x; then
54335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54336$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54338      fi
54339
54340      # Use eval to expand a potential ~
54341      eval path="$path"
54342      if test ! -f "$path" && test ! -d "$path"; then
54343        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54344      fi
54345
54346      if test -d "$path"; then
54347        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54348      else
54349        dir="`$DIRNAME "$path"`"
54350        base="`$BASENAME "$path"`"
54351        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54352      fi
54353    fi
54354  fi
54355
54356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54357$as_echo_n "checking for $DLL_NAME... " >&6; }
54358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54359$as_echo "$MSVC_DLL" >&6; }
54360    else
54361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54362$as_echo "incorrect, ignoring" >&6; }
54363      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54364$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54365    fi
54366  fi
54367
54368    fi
54369  fi
54370
54371  if test "x$MSVC_DLL" = x; then
54372    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54373    # (This was the original behaviour; kept since it might turn something up)
54374    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54375      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54376        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54377	    | $GREP x64 | $HEAD --lines 1`
54378      else
54379        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54380	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54381        if test "x$POSSIBLE_MSVC_DLL" = x; then
54382          # We're grasping at straws now...
54383          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54384	      | $HEAD --lines 1`
54385        fi
54386      fi
54387
54388
54389  DLL_NAME="$DLL_NAME"
54390  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54391  METHOD="search of VCINSTALLDIR"
54392  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54393    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54394$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54395
54396    # Need to check if the found msvcr is correct architecture
54397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54398$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54399    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54401      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54402      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54403      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54404        CORRECT_MSVCR_ARCH="PE32 executable"
54405      else
54406        CORRECT_MSVCR_ARCH="PE32+ executable"
54407      fi
54408    else
54409      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54410        CORRECT_MSVCR_ARCH=386
54411      else
54412        CORRECT_MSVCR_ARCH=x86-64
54413      fi
54414    fi
54415    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54417$as_echo "ok" >&6; }
54418      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54419
54420  # Only process if variable expands to non-empty
54421
54422  if test "x$MSVC_DLL" != x; then
54423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54424
54425  # Input might be given as Windows format, start by converting to
54426  # unix format.
54427  path="$MSVC_DLL"
54428  new_path=`$CYGPATH -u "$path"`
54429
54430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54433  # "foo.exe" is OK but "foo" is an error.
54434  #
54435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54436  # It is also a way to make sure we got the proper file name for the real test later on.
54437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54438  if test "x$test_shortpath" = x; then
54439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54441    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54442  fi
54443
54444  # Call helper function which possibly converts this using DOS-style short mode.
54445  # If so, the updated path is stored in $new_path.
54446
54447  input_path="$new_path"
54448  # Check if we need to convert this using DOS-style short mode. If the path
54449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54450  # take no chances and rewrite it.
54451  # Note: m4 eats our [], so we need to use [ and ] instead.
54452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54453  if test "x$has_forbidden_chars" != x; then
54454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54458      # Going to short mode and back again did indeed matter. Since short mode is
54459      # case insensitive, let's make it lowercase to improve readability.
54460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54461      # Now convert it back to Unix-style (cygpath)
54462      input_path=`$CYGPATH -u "$shortmode_path"`
54463      new_path="$input_path"
54464    fi
54465  fi
54466
54467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54468  if test "x$test_cygdrive_prefix" = x; then
54469    # As a simple fix, exclude /usr/bin since it's not a real path.
54470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54472      # a path prefixed by /cygdrive for fixpath to work.
54473      new_path="$CYGWIN_ROOT_PATH$input_path"
54474    fi
54475  fi
54476
54477
54478  if test "x$path" != "x$new_path"; then
54479    MSVC_DLL="$new_path"
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54482  fi
54483
54484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54485
54486  path="$MSVC_DLL"
54487  has_colon=`$ECHO $path | $GREP ^.:`
54488  new_path="$path"
54489  if test "x$has_colon" = x; then
54490    # Not in mixed or Windows style, start by that.
54491    new_path=`cmd //c echo $path`
54492  fi
54493
54494
54495  input_path="$new_path"
54496  # Check if we need to convert this using DOS-style short mode. If the path
54497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54498  # take no chances and rewrite it.
54499  # Note: m4 eats our [], so we need to use [ and ] instead.
54500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54501  if test "x$has_forbidden_chars" != x; then
54502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54504  fi
54505
54506
54507  windows_path="$new_path"
54508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54509    unix_path=`$CYGPATH -u "$windows_path"`
54510    new_path="$unix_path"
54511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54513    new_path="$unix_path"
54514  fi
54515
54516  if test "x$path" != "x$new_path"; then
54517    MSVC_DLL="$new_path"
54518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54519$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54520  fi
54521
54522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54524
54525    else
54526      # We're on a unix platform. Hooray! :)
54527      path="$MSVC_DLL"
54528      has_space=`$ECHO "$path" | $GREP " "`
54529      if test "x$has_space" != x; then
54530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54531$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54533      fi
54534
54535      # Use eval to expand a potential ~
54536      eval path="$path"
54537      if test ! -f "$path" && test ! -d "$path"; then
54538        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54539      fi
54540
54541      if test -d "$path"; then
54542        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54543      else
54544        dir="`$DIRNAME "$path"`"
54545        base="`$BASENAME "$path"`"
54546        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54547      fi
54548    fi
54549  fi
54550
54551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54552$as_echo_n "checking for $DLL_NAME... " >&6; }
54553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54554$as_echo "$MSVC_DLL" >&6; }
54555    else
54556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54557$as_echo "incorrect, ignoring" >&6; }
54558      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54559$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54560    fi
54561  fi
54562
54563    fi
54564  fi
54565
54566  if test "x$MSVC_DLL" = x; then
54567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54568$as_echo_n "checking for $DLL_NAME... " >&6; }
54569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54570$as_echo "no" >&6; }
54571    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54572  fi
54573
54574    MSVCR_DLL="$MSVC_DLL"
54575  fi
54576
54577
54578
54579# Check whether --with-msvcp-dll was given.
54580if test "${with_msvcp_dll+set}" = set; then :
54581  withval=$with_msvcp_dll;
54582fi
54583
54584
54585  if test "x$MSVCP_NAME" != "x"; then
54586    if test "x$with_msvcp_dll" != x; then
54587      # If given explicitly by user, do not probe. If not present, fail directly.
54588
54589  DLL_NAME="$MSVCP_NAME"
54590  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54591  METHOD="--with-msvcp-dll"
54592  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54593    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54594$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54595
54596    # Need to check if the found msvcr is correct architecture
54597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54598$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54599    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54602      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54603      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54604        CORRECT_MSVCR_ARCH="PE32 executable"
54605      else
54606        CORRECT_MSVCR_ARCH="PE32+ executable"
54607      fi
54608    else
54609      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54610        CORRECT_MSVCR_ARCH=386
54611      else
54612        CORRECT_MSVCR_ARCH=x86-64
54613      fi
54614    fi
54615    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54617$as_echo "ok" >&6; }
54618      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54619
54620  # Only process if variable expands to non-empty
54621
54622  if test "x$MSVC_DLL" != x; then
54623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54624
54625  # Input might be given as Windows format, start by converting to
54626  # unix format.
54627  path="$MSVC_DLL"
54628  new_path=`$CYGPATH -u "$path"`
54629
54630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54633  # "foo.exe" is OK but "foo" is an error.
54634  #
54635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54636  # It is also a way to make sure we got the proper file name for the real test later on.
54637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54638  if test "x$test_shortpath" = x; then
54639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54640$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54641    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54642  fi
54643
54644  # Call helper function which possibly converts this using DOS-style short mode.
54645  # If so, the updated path is stored in $new_path.
54646
54647  input_path="$new_path"
54648  # Check if we need to convert this using DOS-style short mode. If the path
54649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54650  # take no chances and rewrite it.
54651  # Note: m4 eats our [], so we need to use [ and ] instead.
54652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54653  if test "x$has_forbidden_chars" != x; then
54654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54658      # Going to short mode and back again did indeed matter. Since short mode is
54659      # case insensitive, let's make it lowercase to improve readability.
54660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54661      # Now convert it back to Unix-style (cygpath)
54662      input_path=`$CYGPATH -u "$shortmode_path"`
54663      new_path="$input_path"
54664    fi
54665  fi
54666
54667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54668  if test "x$test_cygdrive_prefix" = x; then
54669    # As a simple fix, exclude /usr/bin since it's not a real path.
54670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54672      # a path prefixed by /cygdrive for fixpath to work.
54673      new_path="$CYGWIN_ROOT_PATH$input_path"
54674    fi
54675  fi
54676
54677
54678  if test "x$path" != "x$new_path"; then
54679    MSVC_DLL="$new_path"
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54681$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54682  fi
54683
54684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54685
54686  path="$MSVC_DLL"
54687  has_colon=`$ECHO $path | $GREP ^.:`
54688  new_path="$path"
54689  if test "x$has_colon" = x; then
54690    # Not in mixed or Windows style, start by that.
54691    new_path=`cmd //c echo $path`
54692  fi
54693
54694
54695  input_path="$new_path"
54696  # Check if we need to convert this using DOS-style short mode. If the path
54697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54698  # take no chances and rewrite it.
54699  # Note: m4 eats our [], so we need to use [ and ] instead.
54700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54701  if test "x$has_forbidden_chars" != x; then
54702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54704  fi
54705
54706
54707  windows_path="$new_path"
54708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54709    unix_path=`$CYGPATH -u "$windows_path"`
54710    new_path="$unix_path"
54711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54713    new_path="$unix_path"
54714  fi
54715
54716  if test "x$path" != "x$new_path"; then
54717    MSVC_DLL="$new_path"
54718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54719$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54720  fi
54721
54722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54724
54725    else
54726      # We're on a unix platform. Hooray! :)
54727      path="$MSVC_DLL"
54728      has_space=`$ECHO "$path" | $GREP " "`
54729      if test "x$has_space" != x; then
54730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54731$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54733      fi
54734
54735      # Use eval to expand a potential ~
54736      eval path="$path"
54737      if test ! -f "$path" && test ! -d "$path"; then
54738        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54739      fi
54740
54741      if test -d "$path"; then
54742        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54743      else
54744        dir="`$DIRNAME "$path"`"
54745        base="`$BASENAME "$path"`"
54746        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54747      fi
54748    fi
54749  fi
54750
54751      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54752$as_echo_n "checking for $DLL_NAME... " >&6; }
54753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54754$as_echo "$MSVC_DLL" >&6; }
54755    else
54756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54757$as_echo "incorrect, ignoring" >&6; }
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54759$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54760    fi
54761  fi
54762
54763      if test "x$MSVC_DLL" = x; then
54764        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54765      fi
54766      MSVCP_DLL="$MSVC_DLL"
54767    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54768
54769  DLL_NAME="$MSVCP_NAME"
54770  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54771  METHOD="devkit"
54772  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54774$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54775
54776    # Need to check if the found msvcr is correct architecture
54777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54778$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54779    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54781      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54782      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54783      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54784        CORRECT_MSVCR_ARCH="PE32 executable"
54785      else
54786        CORRECT_MSVCR_ARCH="PE32+ executable"
54787      fi
54788    else
54789      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54790        CORRECT_MSVCR_ARCH=386
54791      else
54792        CORRECT_MSVCR_ARCH=x86-64
54793      fi
54794    fi
54795    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54797$as_echo "ok" >&6; }
54798      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54799
54800  # Only process if variable expands to non-empty
54801
54802  if test "x$MSVC_DLL" != x; then
54803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54804
54805  # Input might be given as Windows format, start by converting to
54806  # unix format.
54807  path="$MSVC_DLL"
54808  new_path=`$CYGPATH -u "$path"`
54809
54810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54813  # "foo.exe" is OK but "foo" is an error.
54814  #
54815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54816  # It is also a way to make sure we got the proper file name for the real test later on.
54817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54818  if test "x$test_shortpath" = x; then
54819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54820$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54821    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54822  fi
54823
54824  # Call helper function which possibly converts this using DOS-style short mode.
54825  # If so, the updated path is stored in $new_path.
54826
54827  input_path="$new_path"
54828  # Check if we need to convert this using DOS-style short mode. If the path
54829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54830  # take no chances and rewrite it.
54831  # Note: m4 eats our [], so we need to use [ and ] instead.
54832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54833  if test "x$has_forbidden_chars" != x; then
54834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54838      # Going to short mode and back again did indeed matter. Since short mode is
54839      # case insensitive, let's make it lowercase to improve readability.
54840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54841      # Now convert it back to Unix-style (cygpath)
54842      input_path=`$CYGPATH -u "$shortmode_path"`
54843      new_path="$input_path"
54844    fi
54845  fi
54846
54847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54848  if test "x$test_cygdrive_prefix" = x; then
54849    # As a simple fix, exclude /usr/bin since it's not a real path.
54850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54852      # a path prefixed by /cygdrive for fixpath to work.
54853      new_path="$CYGWIN_ROOT_PATH$input_path"
54854    fi
54855  fi
54856
54857
54858  if test "x$path" != "x$new_path"; then
54859    MSVC_DLL="$new_path"
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54862  fi
54863
54864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54865
54866  path="$MSVC_DLL"
54867  has_colon=`$ECHO $path | $GREP ^.:`
54868  new_path="$path"
54869  if test "x$has_colon" = x; then
54870    # Not in mixed or Windows style, start by that.
54871    new_path=`cmd //c echo $path`
54872  fi
54873
54874
54875  input_path="$new_path"
54876  # Check if we need to convert this using DOS-style short mode. If the path
54877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54878  # take no chances and rewrite it.
54879  # Note: m4 eats our [], so we need to use [ and ] instead.
54880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54881  if test "x$has_forbidden_chars" != x; then
54882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54884  fi
54885
54886
54887  windows_path="$new_path"
54888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54889    unix_path=`$CYGPATH -u "$windows_path"`
54890    new_path="$unix_path"
54891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54893    new_path="$unix_path"
54894  fi
54895
54896  if test "x$path" != "x$new_path"; then
54897    MSVC_DLL="$new_path"
54898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54899$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54900  fi
54901
54902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54904
54905    else
54906      # We're on a unix platform. Hooray! :)
54907      path="$MSVC_DLL"
54908      has_space=`$ECHO "$path" | $GREP " "`
54909      if test "x$has_space" != x; then
54910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54911$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54913      fi
54914
54915      # Use eval to expand a potential ~
54916      eval path="$path"
54917      if test ! -f "$path" && test ! -d "$path"; then
54918        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54919      fi
54920
54921      if test -d "$path"; then
54922        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54923      else
54924        dir="`$DIRNAME "$path"`"
54925        base="`$BASENAME "$path"`"
54926        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54927      fi
54928    fi
54929  fi
54930
54931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54932$as_echo_n "checking for $DLL_NAME... " >&6; }
54933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54934$as_echo "$MSVC_DLL" >&6; }
54935    else
54936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54937$as_echo "incorrect, ignoring" >&6; }
54938      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54939$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54940    fi
54941  fi
54942
54943      if test "x$MSVC_DLL" = x; then
54944        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54945      fi
54946      MSVCP_DLL="$MSVC_DLL"
54947    else
54948
54949  DLL_NAME="${MSVCP_NAME}"
54950  MSVC_DLL=
54951
54952  if test "x$MSVC_DLL" = x; then
54953    # Probe: Using well-known location from Visual Studio 10.0
54954    if test "x$VCINSTALLDIR" != x; then
54955      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54956
54957  windows_path="$CYGWIN_VC_INSTALL_DIR"
54958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54959    unix_path=`$CYGPATH -u "$windows_path"`
54960    CYGWIN_VC_INSTALL_DIR="$unix_path"
54961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54963    CYGWIN_VC_INSTALL_DIR="$unix_path"
54964  fi
54965
54966      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54967        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54968      else
54969        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54970      fi
54971      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54972
54973  DLL_NAME="$DLL_NAME"
54974  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54975  METHOD="well-known location in VCINSTALLDIR"
54976  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54977    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54978$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54979
54980    # Need to check if the found msvcr is correct architecture
54981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54982$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54983    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54985      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54986      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54987      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54988        CORRECT_MSVCR_ARCH="PE32 executable"
54989      else
54990        CORRECT_MSVCR_ARCH="PE32+ executable"
54991      fi
54992    else
54993      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54994        CORRECT_MSVCR_ARCH=386
54995      else
54996        CORRECT_MSVCR_ARCH=x86-64
54997      fi
54998    fi
54999    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55001$as_echo "ok" >&6; }
55002      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55003
55004  # Only process if variable expands to non-empty
55005
55006  if test "x$MSVC_DLL" != x; then
55007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55008
55009  # Input might be given as Windows format, start by converting to
55010  # unix format.
55011  path="$MSVC_DLL"
55012  new_path=`$CYGPATH -u "$path"`
55013
55014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55017  # "foo.exe" is OK but "foo" is an error.
55018  #
55019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55020  # It is also a way to make sure we got the proper file name for the real test later on.
55021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55022  if test "x$test_shortpath" = x; then
55023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55024$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55025    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55026  fi
55027
55028  # Call helper function which possibly converts this using DOS-style short mode.
55029  # If so, the updated path is stored in $new_path.
55030
55031  input_path="$new_path"
55032  # Check if we need to convert this using DOS-style short mode. If the path
55033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55034  # take no chances and rewrite it.
55035  # Note: m4 eats our [], so we need to use [ and ] instead.
55036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55037  if test "x$has_forbidden_chars" != x; then
55038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55042      # Going to short mode and back again did indeed matter. Since short mode is
55043      # case insensitive, let's make it lowercase to improve readability.
55044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55045      # Now convert it back to Unix-style (cygpath)
55046      input_path=`$CYGPATH -u "$shortmode_path"`
55047      new_path="$input_path"
55048    fi
55049  fi
55050
55051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55052  if test "x$test_cygdrive_prefix" = x; then
55053    # As a simple fix, exclude /usr/bin since it's not a real path.
55054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55056      # a path prefixed by /cygdrive for fixpath to work.
55057      new_path="$CYGWIN_ROOT_PATH$input_path"
55058    fi
55059  fi
55060
55061
55062  if test "x$path" != "x$new_path"; then
55063    MSVC_DLL="$new_path"
55064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55065$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55066  fi
55067
55068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55069
55070  path="$MSVC_DLL"
55071  has_colon=`$ECHO $path | $GREP ^.:`
55072  new_path="$path"
55073  if test "x$has_colon" = x; then
55074    # Not in mixed or Windows style, start by that.
55075    new_path=`cmd //c echo $path`
55076  fi
55077
55078
55079  input_path="$new_path"
55080  # Check if we need to convert this using DOS-style short mode. If the path
55081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55082  # take no chances and rewrite it.
55083  # Note: m4 eats our [], so we need to use [ and ] instead.
55084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55085  if test "x$has_forbidden_chars" != x; then
55086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55088  fi
55089
55090
55091  windows_path="$new_path"
55092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55093    unix_path=`$CYGPATH -u "$windows_path"`
55094    new_path="$unix_path"
55095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55097    new_path="$unix_path"
55098  fi
55099
55100  if test "x$path" != "x$new_path"; then
55101    MSVC_DLL="$new_path"
55102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55103$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55104  fi
55105
55106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55108
55109    else
55110      # We're on a unix platform. Hooray! :)
55111      path="$MSVC_DLL"
55112      has_space=`$ECHO "$path" | $GREP " "`
55113      if test "x$has_space" != x; then
55114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55115$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55117      fi
55118
55119      # Use eval to expand a potential ~
55120      eval path="$path"
55121      if test ! -f "$path" && test ! -d "$path"; then
55122        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55123      fi
55124
55125      if test -d "$path"; then
55126        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55127      else
55128        dir="`$DIRNAME "$path"`"
55129        base="`$BASENAME "$path"`"
55130        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55131      fi
55132    fi
55133  fi
55134
55135      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55136$as_echo_n "checking for $DLL_NAME... " >&6; }
55137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55138$as_echo "$MSVC_DLL" >&6; }
55139    else
55140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55141$as_echo "incorrect, ignoring" >&6; }
55142      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55143$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55144    fi
55145  fi
55146
55147    fi
55148  fi
55149
55150  if test "x$MSVC_DLL" = x; then
55151    # Probe: Check in the Boot JDK directory.
55152    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55153
55154  DLL_NAME="$DLL_NAME"
55155  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55156  METHOD="well-known location in Boot JDK"
55157  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55159$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55160
55161    # Need to check if the found msvcr is correct architecture
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55163$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55164    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55166      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55167      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55168      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55169        CORRECT_MSVCR_ARCH="PE32 executable"
55170      else
55171        CORRECT_MSVCR_ARCH="PE32+ executable"
55172      fi
55173    else
55174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55175        CORRECT_MSVCR_ARCH=386
55176      else
55177        CORRECT_MSVCR_ARCH=x86-64
55178      fi
55179    fi
55180    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55182$as_echo "ok" >&6; }
55183      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55184
55185  # Only process if variable expands to non-empty
55186
55187  if test "x$MSVC_DLL" != x; then
55188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55189
55190  # Input might be given as Windows format, start by converting to
55191  # unix format.
55192  path="$MSVC_DLL"
55193  new_path=`$CYGPATH -u "$path"`
55194
55195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55198  # "foo.exe" is OK but "foo" is an error.
55199  #
55200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55201  # It is also a way to make sure we got the proper file name for the real test later on.
55202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55203  if test "x$test_shortpath" = x; then
55204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55205$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55206    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55207  fi
55208
55209  # Call helper function which possibly converts this using DOS-style short mode.
55210  # If so, the updated path is stored in $new_path.
55211
55212  input_path="$new_path"
55213  # Check if we need to convert this using DOS-style short mode. If the path
55214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55215  # take no chances and rewrite it.
55216  # Note: m4 eats our [], so we need to use [ and ] instead.
55217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55218  if test "x$has_forbidden_chars" != x; then
55219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55223      # Going to short mode and back again did indeed matter. Since short mode is
55224      # case insensitive, let's make it lowercase to improve readability.
55225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55226      # Now convert it back to Unix-style (cygpath)
55227      input_path=`$CYGPATH -u "$shortmode_path"`
55228      new_path="$input_path"
55229    fi
55230  fi
55231
55232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55233  if test "x$test_cygdrive_prefix" = x; then
55234    # As a simple fix, exclude /usr/bin since it's not a real path.
55235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55237      # a path prefixed by /cygdrive for fixpath to work.
55238      new_path="$CYGWIN_ROOT_PATH$input_path"
55239    fi
55240  fi
55241
55242
55243  if test "x$path" != "x$new_path"; then
55244    MSVC_DLL="$new_path"
55245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55247  fi
55248
55249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55250
55251  path="$MSVC_DLL"
55252  has_colon=`$ECHO $path | $GREP ^.:`
55253  new_path="$path"
55254  if test "x$has_colon" = x; then
55255    # Not in mixed or Windows style, start by that.
55256    new_path=`cmd //c echo $path`
55257  fi
55258
55259
55260  input_path="$new_path"
55261  # Check if we need to convert this using DOS-style short mode. If the path
55262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55263  # take no chances and rewrite it.
55264  # Note: m4 eats our [], so we need to use [ and ] instead.
55265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55266  if test "x$has_forbidden_chars" != x; then
55267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55269  fi
55270
55271
55272  windows_path="$new_path"
55273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55274    unix_path=`$CYGPATH -u "$windows_path"`
55275    new_path="$unix_path"
55276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55278    new_path="$unix_path"
55279  fi
55280
55281  if test "x$path" != "x$new_path"; then
55282    MSVC_DLL="$new_path"
55283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55284$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55285  fi
55286
55287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55289
55290    else
55291      # We're on a unix platform. Hooray! :)
55292      path="$MSVC_DLL"
55293      has_space=`$ECHO "$path" | $GREP " "`
55294      if test "x$has_space" != x; then
55295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55298      fi
55299
55300      # Use eval to expand a potential ~
55301      eval path="$path"
55302      if test ! -f "$path" && test ! -d "$path"; then
55303        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55304      fi
55305
55306      if test -d "$path"; then
55307        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55308      else
55309        dir="`$DIRNAME "$path"`"
55310        base="`$BASENAME "$path"`"
55311        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55312      fi
55313    fi
55314  fi
55315
55316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55317$as_echo_n "checking for $DLL_NAME... " >&6; }
55318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55319$as_echo "$MSVC_DLL" >&6; }
55320    else
55321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55322$as_echo "incorrect, ignoring" >&6; }
55323      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55324$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55325    fi
55326  fi
55327
55328  fi
55329
55330  if test "x$MSVC_DLL" = x; then
55331    # Probe: Look in the Windows system32 directory
55332    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55333
55334  windows_path="$CYGWIN_SYSTEMROOT"
55335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55336    unix_path=`$CYGPATH -u "$windows_path"`
55337    CYGWIN_SYSTEMROOT="$unix_path"
55338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55340    CYGWIN_SYSTEMROOT="$unix_path"
55341  fi
55342
55343    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55344
55345  DLL_NAME="$DLL_NAME"
55346  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55347  METHOD="well-known location in SYSTEMROOT"
55348  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55349    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55350$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55351
55352    # Need to check if the found msvcr is correct architecture
55353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55354$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55355    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55357      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55358      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55359      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55360        CORRECT_MSVCR_ARCH="PE32 executable"
55361      else
55362        CORRECT_MSVCR_ARCH="PE32+ executable"
55363      fi
55364    else
55365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55366        CORRECT_MSVCR_ARCH=386
55367      else
55368        CORRECT_MSVCR_ARCH=x86-64
55369      fi
55370    fi
55371    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55373$as_echo "ok" >&6; }
55374      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55375
55376  # Only process if variable expands to non-empty
55377
55378  if test "x$MSVC_DLL" != x; then
55379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55380
55381  # Input might be given as Windows format, start by converting to
55382  # unix format.
55383  path="$MSVC_DLL"
55384  new_path=`$CYGPATH -u "$path"`
55385
55386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55389  # "foo.exe" is OK but "foo" is an error.
55390  #
55391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55392  # It is also a way to make sure we got the proper file name for the real test later on.
55393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55394  if test "x$test_shortpath" = x; then
55395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55396$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55397    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55398  fi
55399
55400  # Call helper function which possibly converts this using DOS-style short mode.
55401  # If so, the updated path is stored in $new_path.
55402
55403  input_path="$new_path"
55404  # Check if we need to convert this using DOS-style short mode. If the path
55405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55406  # take no chances and rewrite it.
55407  # Note: m4 eats our [], so we need to use [ and ] instead.
55408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55409  if test "x$has_forbidden_chars" != x; then
55410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55414      # Going to short mode and back again did indeed matter. Since short mode is
55415      # case insensitive, let's make it lowercase to improve readability.
55416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55417      # Now convert it back to Unix-style (cygpath)
55418      input_path=`$CYGPATH -u "$shortmode_path"`
55419      new_path="$input_path"
55420    fi
55421  fi
55422
55423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55424  if test "x$test_cygdrive_prefix" = x; then
55425    # As a simple fix, exclude /usr/bin since it's not a real path.
55426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55428      # a path prefixed by /cygdrive for fixpath to work.
55429      new_path="$CYGWIN_ROOT_PATH$input_path"
55430    fi
55431  fi
55432
55433
55434  if test "x$path" != "x$new_path"; then
55435    MSVC_DLL="$new_path"
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55437$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55438  fi
55439
55440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55441
55442  path="$MSVC_DLL"
55443  has_colon=`$ECHO $path | $GREP ^.:`
55444  new_path="$path"
55445  if test "x$has_colon" = x; then
55446    # Not in mixed or Windows style, start by that.
55447    new_path=`cmd //c echo $path`
55448  fi
55449
55450
55451  input_path="$new_path"
55452  # Check if we need to convert this using DOS-style short mode. If the path
55453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55454  # take no chances and rewrite it.
55455  # Note: m4 eats our [], so we need to use [ and ] instead.
55456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55457  if test "x$has_forbidden_chars" != x; then
55458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55460  fi
55461
55462
55463  windows_path="$new_path"
55464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55465    unix_path=`$CYGPATH -u "$windows_path"`
55466    new_path="$unix_path"
55467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55469    new_path="$unix_path"
55470  fi
55471
55472  if test "x$path" != "x$new_path"; then
55473    MSVC_DLL="$new_path"
55474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55475$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55476  fi
55477
55478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55480
55481    else
55482      # We're on a unix platform. Hooray! :)
55483      path="$MSVC_DLL"
55484      has_space=`$ECHO "$path" | $GREP " "`
55485      if test "x$has_space" != x; then
55486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55489      fi
55490
55491      # Use eval to expand a potential ~
55492      eval path="$path"
55493      if test ! -f "$path" && test ! -d "$path"; then
55494        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55495      fi
55496
55497      if test -d "$path"; then
55498        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55499      else
55500        dir="`$DIRNAME "$path"`"
55501        base="`$BASENAME "$path"`"
55502        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55503      fi
55504    fi
55505  fi
55506
55507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55508$as_echo_n "checking for $DLL_NAME... " >&6; }
55509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55510$as_echo "$MSVC_DLL" >&6; }
55511    else
55512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55513$as_echo "incorrect, ignoring" >&6; }
55514      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55515$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55516    fi
55517  fi
55518
55519  fi
55520
55521  if test "x$MSVC_DLL" = x; then
55522    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55523    if test "x$VS100COMNTOOLS" != x; then
55524      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55525
55526  windows_path="$CYGWIN_VS_TOOLS_DIR"
55527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55528    unix_path=`$CYGPATH -u "$windows_path"`
55529    CYGWIN_VS_TOOLS_DIR="$unix_path"
55530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55532    CYGWIN_VS_TOOLS_DIR="$unix_path"
55533  fi
55534
55535      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55536        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55537	    | $GREP -i /x64/ | $HEAD --lines 1`
55538      else
55539        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55540	    | $GREP -i /x86/ | $HEAD --lines 1`
55541      fi
55542
55543  DLL_NAME="$DLL_NAME"
55544  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55545  METHOD="search of VS100COMNTOOLS"
55546  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55547    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55548$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55549
55550    # Need to check if the found msvcr is correct architecture
55551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55552$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55553    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55555      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55556      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55557      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55558        CORRECT_MSVCR_ARCH="PE32 executable"
55559      else
55560        CORRECT_MSVCR_ARCH="PE32+ executable"
55561      fi
55562    else
55563      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55564        CORRECT_MSVCR_ARCH=386
55565      else
55566        CORRECT_MSVCR_ARCH=x86-64
55567      fi
55568    fi
55569    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55571$as_echo "ok" >&6; }
55572      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55573
55574  # Only process if variable expands to non-empty
55575
55576  if test "x$MSVC_DLL" != x; then
55577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55578
55579  # Input might be given as Windows format, start by converting to
55580  # unix format.
55581  path="$MSVC_DLL"
55582  new_path=`$CYGPATH -u "$path"`
55583
55584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55587  # "foo.exe" is OK but "foo" is an error.
55588  #
55589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55590  # It is also a way to make sure we got the proper file name for the real test later on.
55591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55592  if test "x$test_shortpath" = x; then
55593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55594$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55595    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55596  fi
55597
55598  # Call helper function which possibly converts this using DOS-style short mode.
55599  # If so, the updated path is stored in $new_path.
55600
55601  input_path="$new_path"
55602  # Check if we need to convert this using DOS-style short mode. If the path
55603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55604  # take no chances and rewrite it.
55605  # Note: m4 eats our [], so we need to use [ and ] instead.
55606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55607  if test "x$has_forbidden_chars" != x; then
55608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55612      # Going to short mode and back again did indeed matter. Since short mode is
55613      # case insensitive, let's make it lowercase to improve readability.
55614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55615      # Now convert it back to Unix-style (cygpath)
55616      input_path=`$CYGPATH -u "$shortmode_path"`
55617      new_path="$input_path"
55618    fi
55619  fi
55620
55621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55622  if test "x$test_cygdrive_prefix" = x; then
55623    # As a simple fix, exclude /usr/bin since it's not a real path.
55624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55626      # a path prefixed by /cygdrive for fixpath to work.
55627      new_path="$CYGWIN_ROOT_PATH$input_path"
55628    fi
55629  fi
55630
55631
55632  if test "x$path" != "x$new_path"; then
55633    MSVC_DLL="$new_path"
55634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55635$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55636  fi
55637
55638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55639
55640  path="$MSVC_DLL"
55641  has_colon=`$ECHO $path | $GREP ^.:`
55642  new_path="$path"
55643  if test "x$has_colon" = x; then
55644    # Not in mixed or Windows style, start by that.
55645    new_path=`cmd //c echo $path`
55646  fi
55647
55648
55649  input_path="$new_path"
55650  # Check if we need to convert this using DOS-style short mode. If the path
55651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55652  # take no chances and rewrite it.
55653  # Note: m4 eats our [], so we need to use [ and ] instead.
55654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55655  if test "x$has_forbidden_chars" != x; then
55656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55658  fi
55659
55660
55661  windows_path="$new_path"
55662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55663    unix_path=`$CYGPATH -u "$windows_path"`
55664    new_path="$unix_path"
55665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55667    new_path="$unix_path"
55668  fi
55669
55670  if test "x$path" != "x$new_path"; then
55671    MSVC_DLL="$new_path"
55672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55673$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55674  fi
55675
55676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55678
55679    else
55680      # We're on a unix platform. Hooray! :)
55681      path="$MSVC_DLL"
55682      has_space=`$ECHO "$path" | $GREP " "`
55683      if test "x$has_space" != x; then
55684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55685$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55687      fi
55688
55689      # Use eval to expand a potential ~
55690      eval path="$path"
55691      if test ! -f "$path" && test ! -d "$path"; then
55692        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55693      fi
55694
55695      if test -d "$path"; then
55696        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55697      else
55698        dir="`$DIRNAME "$path"`"
55699        base="`$BASENAME "$path"`"
55700        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55701      fi
55702    fi
55703  fi
55704
55705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55706$as_echo_n "checking for $DLL_NAME... " >&6; }
55707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55708$as_echo "$MSVC_DLL" >&6; }
55709    else
55710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55711$as_echo "incorrect, ignoring" >&6; }
55712      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55713$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55714    fi
55715  fi
55716
55717    fi
55718  fi
55719
55720  if test "x$MSVC_DLL" = x; then
55721    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55722    # (This was the original behaviour; kept since it might turn something up)
55723    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55724      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55725        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55726	    | $GREP x64 | $HEAD --lines 1`
55727      else
55728        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55729	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55730        if test "x$POSSIBLE_MSVC_DLL" = x; then
55731          # We're grasping at straws now...
55732          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55733	      | $HEAD --lines 1`
55734        fi
55735      fi
55736
55737
55738  DLL_NAME="$DLL_NAME"
55739  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55740  METHOD="search of VCINSTALLDIR"
55741  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55742    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55743$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55744
55745    # Need to check if the found msvcr is correct architecture
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55747$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55748    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55751      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55752      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55753        CORRECT_MSVCR_ARCH="PE32 executable"
55754      else
55755        CORRECT_MSVCR_ARCH="PE32+ executable"
55756      fi
55757    else
55758      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55759        CORRECT_MSVCR_ARCH=386
55760      else
55761        CORRECT_MSVCR_ARCH=x86-64
55762      fi
55763    fi
55764    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55766$as_echo "ok" >&6; }
55767      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55768
55769  # Only process if variable expands to non-empty
55770
55771  if test "x$MSVC_DLL" != x; then
55772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55773
55774  # Input might be given as Windows format, start by converting to
55775  # unix format.
55776  path="$MSVC_DLL"
55777  new_path=`$CYGPATH -u "$path"`
55778
55779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55782  # "foo.exe" is OK but "foo" is an error.
55783  #
55784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55785  # It is also a way to make sure we got the proper file name for the real test later on.
55786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55787  if test "x$test_shortpath" = x; then
55788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55789$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55790    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55791  fi
55792
55793  # Call helper function which possibly converts this using DOS-style short mode.
55794  # If so, the updated path is stored in $new_path.
55795
55796  input_path="$new_path"
55797  # Check if we need to convert this using DOS-style short mode. If the path
55798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55799  # take no chances and rewrite it.
55800  # Note: m4 eats our [], so we need to use [ and ] instead.
55801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55802  if test "x$has_forbidden_chars" != x; then
55803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55807      # Going to short mode and back again did indeed matter. Since short mode is
55808      # case insensitive, let's make it lowercase to improve readability.
55809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55810      # Now convert it back to Unix-style (cygpath)
55811      input_path=`$CYGPATH -u "$shortmode_path"`
55812      new_path="$input_path"
55813    fi
55814  fi
55815
55816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55817  if test "x$test_cygdrive_prefix" = x; then
55818    # As a simple fix, exclude /usr/bin since it's not a real path.
55819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55821      # a path prefixed by /cygdrive for fixpath to work.
55822      new_path="$CYGWIN_ROOT_PATH$input_path"
55823    fi
55824  fi
55825
55826
55827  if test "x$path" != "x$new_path"; then
55828    MSVC_DLL="$new_path"
55829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55830$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55831  fi
55832
55833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55834
55835  path="$MSVC_DLL"
55836  has_colon=`$ECHO $path | $GREP ^.:`
55837  new_path="$path"
55838  if test "x$has_colon" = x; then
55839    # Not in mixed or Windows style, start by that.
55840    new_path=`cmd //c echo $path`
55841  fi
55842
55843
55844  input_path="$new_path"
55845  # Check if we need to convert this using DOS-style short mode. If the path
55846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55847  # take no chances and rewrite it.
55848  # Note: m4 eats our [], so we need to use [ and ] instead.
55849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55850  if test "x$has_forbidden_chars" != x; then
55851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55853  fi
55854
55855
55856  windows_path="$new_path"
55857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55858    unix_path=`$CYGPATH -u "$windows_path"`
55859    new_path="$unix_path"
55860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55862    new_path="$unix_path"
55863  fi
55864
55865  if test "x$path" != "x$new_path"; then
55866    MSVC_DLL="$new_path"
55867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55868$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55869  fi
55870
55871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55873
55874    else
55875      # We're on a unix platform. Hooray! :)
55876      path="$MSVC_DLL"
55877      has_space=`$ECHO "$path" | $GREP " "`
55878      if test "x$has_space" != x; then
55879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55880$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55882      fi
55883
55884      # Use eval to expand a potential ~
55885      eval path="$path"
55886      if test ! -f "$path" && test ! -d "$path"; then
55887        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55888      fi
55889
55890      if test -d "$path"; then
55891        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55892      else
55893        dir="`$DIRNAME "$path"`"
55894        base="`$BASENAME "$path"`"
55895        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55896      fi
55897    fi
55898  fi
55899
55900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55901$as_echo_n "checking for $DLL_NAME... " >&6; }
55902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55903$as_echo "$MSVC_DLL" >&6; }
55904    else
55905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55906$as_echo "incorrect, ignoring" >&6; }
55907      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55908$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55909    fi
55910  fi
55911
55912    fi
55913  fi
55914
55915  if test "x$MSVC_DLL" = x; then
55916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55917$as_echo_n "checking for $DLL_NAME... " >&6; }
55918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55919$as_echo "no" >&6; }
55920    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55921  fi
55922
55923      MSVCP_DLL="$MSVC_DLL"
55924    fi
55925
55926  fi
55927
55928  fi
55929
55930
55931  if test "x$NEEDS_LIB_X11" = xfalse; then
55932    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55933      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55934$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55935    fi
55936    X_CFLAGS=
55937    X_LIBS=
55938  else
55939
55940    if test "x${with_x}" = xno; then
55941      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55942    fi
55943
55944    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55945      # The user has specified a X11 base directory. Use it for includes and
55946      # libraries, unless explicitly overridden.
55947      if test "x$x_includes" = xNONE; then
55948        x_includes="${with_x}/include"
55949      fi
55950      if test "x$x_libraries" = xNONE; then
55951        x_libraries="${with_x}/lib"
55952      fi
55953    else
55954      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55955      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55956      # --x-libraries for the sysroot, if that seems to be correct.
55957      if test "x$SYSROOT" != "x"; then
55958        if test "x$x_includes" = xNONE; then
55959          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55960            x_includes="$SYSROOT/usr/X11R6/include"
55961          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55962            x_includes="$SYSROOT/usr/include"
55963          fi
55964        fi
55965        if test "x$x_libraries" = xNONE; then
55966          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55967            x_libraries="$SYSROOT/usr/X11R6/lib"
55968          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55969            x_libraries="$SYSROOT/usr/lib64"
55970          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55971            x_libraries="$SYSROOT/usr/lib"
55972          fi
55973        fi
55974      fi
55975    fi
55976
55977    # Now let autoconf do it's magic
55978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55979$as_echo_n "checking for X... " >&6; }
55980
55981
55982# Check whether --with-x was given.
55983if test "${with_x+set}" = set; then :
55984  withval=$with_x;
55985fi
55986
55987# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55988if test "x$with_x" = xno; then
55989  # The user explicitly disabled X.
55990  have_x=disabled
55991else
55992  case $x_includes,$x_libraries in #(
55993    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55994    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55995  $as_echo_n "(cached) " >&6
55996else
55997  # One or both of the vars are not set, and there is no cached value.
55998ac_x_includes=no ac_x_libraries=no
55999rm -f -r conftest.dir
56000if mkdir conftest.dir; then
56001  cd conftest.dir
56002  cat >Imakefile <<'_ACEOF'
56003incroot:
56004	@echo incroot='${INCROOT}'
56005usrlibdir:
56006	@echo usrlibdir='${USRLIBDIR}'
56007libdir:
56008	@echo libdir='${LIBDIR}'
56009_ACEOF
56010  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56011    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56012    for ac_var in incroot usrlibdir libdir; do
56013      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56014    done
56015    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56016    for ac_extension in a so sl dylib la dll; do
56017      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56018	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56019	ac_im_usrlibdir=$ac_im_libdir; break
56020      fi
56021    done
56022    # Screen out bogus values from the imake configuration.  They are
56023    # bogus both because they are the default anyway, and because
56024    # using them would break gcc on systems where it needs fixed includes.
56025    case $ac_im_incroot in
56026	/usr/include) ac_x_includes= ;;
56027	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56028    esac
56029    case $ac_im_usrlibdir in
56030	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56031	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56032    esac
56033  fi
56034  cd ..
56035  rm -f -r conftest.dir
56036fi
56037
56038# Standard set of common directories for X headers.
56039# Check X11 before X11Rn because it is often a symlink to the current release.
56040ac_x_header_dirs='
56041/usr/X11/include
56042/usr/X11R7/include
56043/usr/X11R6/include
56044/usr/X11R5/include
56045/usr/X11R4/include
56046
56047/usr/include/X11
56048/usr/include/X11R7
56049/usr/include/X11R6
56050/usr/include/X11R5
56051/usr/include/X11R4
56052
56053/usr/local/X11/include
56054/usr/local/X11R7/include
56055/usr/local/X11R6/include
56056/usr/local/X11R5/include
56057/usr/local/X11R4/include
56058
56059/usr/local/include/X11
56060/usr/local/include/X11R7
56061/usr/local/include/X11R6
56062/usr/local/include/X11R5
56063/usr/local/include/X11R4
56064
56065/usr/X386/include
56066/usr/x386/include
56067/usr/XFree86/include/X11
56068
56069/usr/include
56070/usr/local/include
56071/usr/unsupported/include
56072/usr/athena/include
56073/usr/local/x11r5/include
56074/usr/lpp/Xamples/include
56075
56076/usr/openwin/include
56077/usr/openwin/share/include'
56078
56079if test "$ac_x_includes" = no; then
56080  # Guess where to find include files, by looking for Xlib.h.
56081  # First, try using that file with no special directory specified.
56082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56083/* end confdefs.h.  */
56084#include <X11/Xlib.h>
56085_ACEOF
56086if ac_fn_cxx_try_cpp "$LINENO"; then :
56087  # We can compile using X headers with no special include directory.
56088ac_x_includes=
56089else
56090  for ac_dir in $ac_x_header_dirs; do
56091  if test -r "$ac_dir/X11/Xlib.h"; then
56092    ac_x_includes=$ac_dir
56093    break
56094  fi
56095done
56096fi
56097rm -f conftest.err conftest.i conftest.$ac_ext
56098fi # $ac_x_includes = no
56099
56100if test "$ac_x_libraries" = no; then
56101  # Check for the libraries.
56102  # See if we find them without any special options.
56103  # Don't add to $LIBS permanently.
56104  ac_save_LIBS=$LIBS
56105  LIBS="-lX11 $LIBS"
56106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56107/* end confdefs.h.  */
56108#include <X11/Xlib.h>
56109int
56110main ()
56111{
56112XrmInitialize ()
56113  ;
56114  return 0;
56115}
56116_ACEOF
56117if ac_fn_cxx_try_link "$LINENO"; then :
56118  LIBS=$ac_save_LIBS
56119# We can link X programs with no special library path.
56120ac_x_libraries=
56121else
56122  LIBS=$ac_save_LIBS
56123for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56124do
56125  # Don't even attempt the hair of trying to link an X program!
56126  for ac_extension in a so sl dylib la dll; do
56127    if test -r "$ac_dir/libX11.$ac_extension"; then
56128      ac_x_libraries=$ac_dir
56129      break 2
56130    fi
56131  done
56132done
56133fi
56134rm -f core conftest.err conftest.$ac_objext \
56135    conftest$ac_exeext conftest.$ac_ext
56136fi # $ac_x_libraries = no
56137
56138case $ac_x_includes,$ac_x_libraries in #(
56139  no,* | *,no | *\'*)
56140    # Didn't find X, or a directory has "'" in its name.
56141    ac_cv_have_x="have_x=no";; #(
56142  *)
56143    # Record where we found X for the cache.
56144    ac_cv_have_x="have_x=yes\
56145	ac_x_includes='$ac_x_includes'\
56146	ac_x_libraries='$ac_x_libraries'"
56147esac
56148fi
56149;; #(
56150    *) have_x=yes;;
56151  esac
56152  eval "$ac_cv_have_x"
56153fi # $with_x != no
56154
56155if test "$have_x" != yes; then
56156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56157$as_echo "$have_x" >&6; }
56158  no_x=yes
56159else
56160  # If each of the values was on the command line, it overrides each guess.
56161  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56162  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56163  # Update the cache value to reflect the command line values.
56164  ac_cv_have_x="have_x=yes\
56165	ac_x_includes='$x_includes'\
56166	ac_x_libraries='$x_libraries'"
56167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56168$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56169fi
56170
56171    if test "$no_x" = yes; then
56172  # Not all programs may use this symbol, but it does not hurt to define it.
56173
56174$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56175
56176  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56177else
56178  if test -n "$x_includes"; then
56179    X_CFLAGS="$X_CFLAGS -I$x_includes"
56180  fi
56181
56182  # It would also be nice to do this for all -L options, not just this one.
56183  if test -n "$x_libraries"; then
56184    X_LIBS="$X_LIBS -L$x_libraries"
56185    # For Solaris; some versions of Sun CC require a space after -R and
56186    # others require no space.  Words are not sufficient . . . .
56187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56188$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56189    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56190    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56191    ac_cxx_werror_flag=yes
56192    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56193/* end confdefs.h.  */
56194
56195int
56196main ()
56197{
56198
56199  ;
56200  return 0;
56201}
56202_ACEOF
56203if ac_fn_cxx_try_link "$LINENO"; then :
56204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56205$as_echo "no" >&6; }
56206       X_LIBS="$X_LIBS -R$x_libraries"
56207else
56208  LIBS="$ac_xsave_LIBS -R $x_libraries"
56209       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56210/* end confdefs.h.  */
56211
56212int
56213main ()
56214{
56215
56216  ;
56217  return 0;
56218}
56219_ACEOF
56220if ac_fn_cxx_try_link "$LINENO"; then :
56221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56222$as_echo "yes" >&6; }
56223	  X_LIBS="$X_LIBS -R $x_libraries"
56224else
56225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56226$as_echo "neither works" >&6; }
56227fi
56228rm -f core conftest.err conftest.$ac_objext \
56229    conftest$ac_exeext conftest.$ac_ext
56230fi
56231rm -f core conftest.err conftest.$ac_objext \
56232    conftest$ac_exeext conftest.$ac_ext
56233    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56234    LIBS=$ac_xsave_LIBS
56235  fi
56236
56237  # Check for system-dependent libraries X programs must link with.
56238  # Do this before checking for the system-independent R6 libraries
56239  # (-lICE), since we may need -lsocket or whatever for X linking.
56240
56241  if test "$ISC" = yes; then
56242    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56243  else
56244    # Martyn Johnson says this is needed for Ultrix, if the X
56245    # libraries were built with DECnet support.  And Karl Berry says
56246    # the Alpha needs dnet_stub (dnet does not exist).
56247    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56249/* end confdefs.h.  */
56250
56251/* Override any GCC internal prototype to avoid an error.
56252   Use char because int might match the return type of a GCC
56253   builtin and then its argument prototype would still apply.  */
56254#ifdef __cplusplus
56255extern "C"
56256#endif
56257char XOpenDisplay ();
56258int
56259main ()
56260{
56261return XOpenDisplay ();
56262  ;
56263  return 0;
56264}
56265_ACEOF
56266if ac_fn_cxx_try_link "$LINENO"; then :
56267
56268else
56269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56270$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56271if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56272  $as_echo_n "(cached) " >&6
56273else
56274  ac_check_lib_save_LIBS=$LIBS
56275LIBS="-ldnet  $LIBS"
56276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56277/* end confdefs.h.  */
56278
56279/* Override any GCC internal prototype to avoid an error.
56280   Use char because int might match the return type of a GCC
56281   builtin and then its argument prototype would still apply.  */
56282#ifdef __cplusplus
56283extern "C"
56284#endif
56285char dnet_ntoa ();
56286int
56287main ()
56288{
56289return dnet_ntoa ();
56290  ;
56291  return 0;
56292}
56293_ACEOF
56294if ac_fn_cxx_try_link "$LINENO"; then :
56295  ac_cv_lib_dnet_dnet_ntoa=yes
56296else
56297  ac_cv_lib_dnet_dnet_ntoa=no
56298fi
56299rm -f core conftest.err conftest.$ac_objext \
56300    conftest$ac_exeext conftest.$ac_ext
56301LIBS=$ac_check_lib_save_LIBS
56302fi
56303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56304$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56305if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56306  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56307fi
56308
56309    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56310      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56311$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56312if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56313  $as_echo_n "(cached) " >&6
56314else
56315  ac_check_lib_save_LIBS=$LIBS
56316LIBS="-ldnet_stub  $LIBS"
56317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56318/* end confdefs.h.  */
56319
56320/* Override any GCC internal prototype to avoid an error.
56321   Use char because int might match the return type of a GCC
56322   builtin and then its argument prototype would still apply.  */
56323#ifdef __cplusplus
56324extern "C"
56325#endif
56326char dnet_ntoa ();
56327int
56328main ()
56329{
56330return dnet_ntoa ();
56331  ;
56332  return 0;
56333}
56334_ACEOF
56335if ac_fn_cxx_try_link "$LINENO"; then :
56336  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56337else
56338  ac_cv_lib_dnet_stub_dnet_ntoa=no
56339fi
56340rm -f core conftest.err conftest.$ac_objext \
56341    conftest$ac_exeext conftest.$ac_ext
56342LIBS=$ac_check_lib_save_LIBS
56343fi
56344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56345$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56346if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56347  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56348fi
56349
56350    fi
56351fi
56352rm -f core conftest.err conftest.$ac_objext \
56353    conftest$ac_exeext conftest.$ac_ext
56354    LIBS="$ac_xsave_LIBS"
56355
56356    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56357    # to get the SysV transport functions.
56358    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56359    # needs -lnsl.
56360    # The nsl library prevents programs from opening the X display
56361    # on Irix 5.2, according to T.E. Dickey.
56362    # The functions gethostbyname, getservbyname, and inet_addr are
56363    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56364    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56365if test "x$ac_cv_func_gethostbyname" = xyes; then :
56366
56367fi
56368
56369    if test $ac_cv_func_gethostbyname = no; then
56370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56371$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56372if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56373  $as_echo_n "(cached) " >&6
56374else
56375  ac_check_lib_save_LIBS=$LIBS
56376LIBS="-lnsl  $LIBS"
56377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56378/* end confdefs.h.  */
56379
56380/* Override any GCC internal prototype to avoid an error.
56381   Use char because int might match the return type of a GCC
56382   builtin and then its argument prototype would still apply.  */
56383#ifdef __cplusplus
56384extern "C"
56385#endif
56386char gethostbyname ();
56387int
56388main ()
56389{
56390return gethostbyname ();
56391  ;
56392  return 0;
56393}
56394_ACEOF
56395if ac_fn_cxx_try_link "$LINENO"; then :
56396  ac_cv_lib_nsl_gethostbyname=yes
56397else
56398  ac_cv_lib_nsl_gethostbyname=no
56399fi
56400rm -f core conftest.err conftest.$ac_objext \
56401    conftest$ac_exeext conftest.$ac_ext
56402LIBS=$ac_check_lib_save_LIBS
56403fi
56404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56405$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56406if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56407  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56408fi
56409
56410      if test $ac_cv_lib_nsl_gethostbyname = no; then
56411	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56412$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56413if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56414  $as_echo_n "(cached) " >&6
56415else
56416  ac_check_lib_save_LIBS=$LIBS
56417LIBS="-lbsd  $LIBS"
56418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56419/* end confdefs.h.  */
56420
56421/* Override any GCC internal prototype to avoid an error.
56422   Use char because int might match the return type of a GCC
56423   builtin and then its argument prototype would still apply.  */
56424#ifdef __cplusplus
56425extern "C"
56426#endif
56427char gethostbyname ();
56428int
56429main ()
56430{
56431return gethostbyname ();
56432  ;
56433  return 0;
56434}
56435_ACEOF
56436if ac_fn_cxx_try_link "$LINENO"; then :
56437  ac_cv_lib_bsd_gethostbyname=yes
56438else
56439  ac_cv_lib_bsd_gethostbyname=no
56440fi
56441rm -f core conftest.err conftest.$ac_objext \
56442    conftest$ac_exeext conftest.$ac_ext
56443LIBS=$ac_check_lib_save_LIBS
56444fi
56445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56446$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56447if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56448  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56449fi
56450
56451      fi
56452    fi
56453
56454    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56455    # socket/setsockopt and other routines are undefined under SCO ODT
56456    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56457    # on later versions), says Simon Leinen: it contains gethostby*
56458    # variants that don't use the name server (or something).  -lsocket
56459    # must be given before -lnsl if both are needed.  We assume that
56460    # if connect needs -lnsl, so does gethostbyname.
56461    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56462if test "x$ac_cv_func_connect" = xyes; then :
56463
56464fi
56465
56466    if test $ac_cv_func_connect = no; then
56467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56468$as_echo_n "checking for connect in -lsocket... " >&6; }
56469if ${ac_cv_lib_socket_connect+:} false; then :
56470  $as_echo_n "(cached) " >&6
56471else
56472  ac_check_lib_save_LIBS=$LIBS
56473LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56475/* end confdefs.h.  */
56476
56477/* Override any GCC internal prototype to avoid an error.
56478   Use char because int might match the return type of a GCC
56479   builtin and then its argument prototype would still apply.  */
56480#ifdef __cplusplus
56481extern "C"
56482#endif
56483char connect ();
56484int
56485main ()
56486{
56487return connect ();
56488  ;
56489  return 0;
56490}
56491_ACEOF
56492if ac_fn_cxx_try_link "$LINENO"; then :
56493  ac_cv_lib_socket_connect=yes
56494else
56495  ac_cv_lib_socket_connect=no
56496fi
56497rm -f core conftest.err conftest.$ac_objext \
56498    conftest$ac_exeext conftest.$ac_ext
56499LIBS=$ac_check_lib_save_LIBS
56500fi
56501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56502$as_echo "$ac_cv_lib_socket_connect" >&6; }
56503if test "x$ac_cv_lib_socket_connect" = xyes; then :
56504  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56505fi
56506
56507    fi
56508
56509    # Guillermo Gomez says -lposix is necessary on A/UX.
56510    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56511if test "x$ac_cv_func_remove" = xyes; then :
56512
56513fi
56514
56515    if test $ac_cv_func_remove = no; then
56516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56517$as_echo_n "checking for remove in -lposix... " >&6; }
56518if ${ac_cv_lib_posix_remove+:} false; then :
56519  $as_echo_n "(cached) " >&6
56520else
56521  ac_check_lib_save_LIBS=$LIBS
56522LIBS="-lposix  $LIBS"
56523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56524/* end confdefs.h.  */
56525
56526/* Override any GCC internal prototype to avoid an error.
56527   Use char because int might match the return type of a GCC
56528   builtin and then its argument prototype would still apply.  */
56529#ifdef __cplusplus
56530extern "C"
56531#endif
56532char remove ();
56533int
56534main ()
56535{
56536return remove ();
56537  ;
56538  return 0;
56539}
56540_ACEOF
56541if ac_fn_cxx_try_link "$LINENO"; then :
56542  ac_cv_lib_posix_remove=yes
56543else
56544  ac_cv_lib_posix_remove=no
56545fi
56546rm -f core conftest.err conftest.$ac_objext \
56547    conftest$ac_exeext conftest.$ac_ext
56548LIBS=$ac_check_lib_save_LIBS
56549fi
56550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56551$as_echo "$ac_cv_lib_posix_remove" >&6; }
56552if test "x$ac_cv_lib_posix_remove" = xyes; then :
56553  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56554fi
56555
56556    fi
56557
56558    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56559    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56560if test "x$ac_cv_func_shmat" = xyes; then :
56561
56562fi
56563
56564    if test $ac_cv_func_shmat = no; then
56565      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56566$as_echo_n "checking for shmat in -lipc... " >&6; }
56567if ${ac_cv_lib_ipc_shmat+:} false; then :
56568  $as_echo_n "(cached) " >&6
56569else
56570  ac_check_lib_save_LIBS=$LIBS
56571LIBS="-lipc  $LIBS"
56572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56573/* end confdefs.h.  */
56574
56575/* Override any GCC internal prototype to avoid an error.
56576   Use char because int might match the return type of a GCC
56577   builtin and then its argument prototype would still apply.  */
56578#ifdef __cplusplus
56579extern "C"
56580#endif
56581char shmat ();
56582int
56583main ()
56584{
56585return shmat ();
56586  ;
56587  return 0;
56588}
56589_ACEOF
56590if ac_fn_cxx_try_link "$LINENO"; then :
56591  ac_cv_lib_ipc_shmat=yes
56592else
56593  ac_cv_lib_ipc_shmat=no
56594fi
56595rm -f core conftest.err conftest.$ac_objext \
56596    conftest$ac_exeext conftest.$ac_ext
56597LIBS=$ac_check_lib_save_LIBS
56598fi
56599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56600$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56601if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56602  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56603fi
56604
56605    fi
56606  fi
56607
56608  # Check for libraries that X11R6 Xt/Xaw programs need.
56609  ac_save_LDFLAGS=$LDFLAGS
56610  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56611  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56612  # check for ICE first), but we must link in the order -lSM -lICE or
56613  # we get undefined symbols.  So assume we have SM if we have ICE.
56614  # These have to be linked with before -lX11, unlike the other
56615  # libraries we check for below, so use a different variable.
56616  # John Interrante, Karl Berry
56617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56618$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56619if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56620  $as_echo_n "(cached) " >&6
56621else
56622  ac_check_lib_save_LIBS=$LIBS
56623LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56625/* end confdefs.h.  */
56626
56627/* Override any GCC internal prototype to avoid an error.
56628   Use char because int might match the return type of a GCC
56629   builtin and then its argument prototype would still apply.  */
56630#ifdef __cplusplus
56631extern "C"
56632#endif
56633char IceConnectionNumber ();
56634int
56635main ()
56636{
56637return IceConnectionNumber ();
56638  ;
56639  return 0;
56640}
56641_ACEOF
56642if ac_fn_cxx_try_link "$LINENO"; then :
56643  ac_cv_lib_ICE_IceConnectionNumber=yes
56644else
56645  ac_cv_lib_ICE_IceConnectionNumber=no
56646fi
56647rm -f core conftest.err conftest.$ac_objext \
56648    conftest$ac_exeext conftest.$ac_ext
56649LIBS=$ac_check_lib_save_LIBS
56650fi
56651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56652$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56653if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56654  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56655fi
56656
56657  LDFLAGS=$ac_save_LDFLAGS
56658
56659fi
56660
56661
56662    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56663    # this doesn't make sense so we remove it.
56664    if test "x$COMPILE_TYPE" = xcross; then
56665      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56666    fi
56667
56668    if test "x$no_x" = xyes; then
56669
56670  # Print a helpful message on how to acquire the necessary build dependency.
56671  # x11 is the help tag: freetype, cups, alsa etc
56672  MISSING_DEPENDENCY=x11
56673
56674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56675    cygwin_help $MISSING_DEPENDENCY
56676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56677    msys_help $MISSING_DEPENDENCY
56678  else
56679    PKGHANDLER_COMMAND=
56680
56681    case $PKGHANDLER in
56682      apt-get)
56683        apt_help     $MISSING_DEPENDENCY ;;
56684      yum)
56685        yum_help     $MISSING_DEPENDENCY ;;
56686      brew)
56687        brew_help    $MISSING_DEPENDENCY ;;
56688      port)
56689        port_help    $MISSING_DEPENDENCY ;;
56690      pkgutil)
56691        pkgutil_help $MISSING_DEPENDENCY ;;
56692      pkgadd)
56693        pkgadd_help  $MISSING_DEPENDENCY ;;
56694    esac
56695
56696    if test "x$PKGHANDLER_COMMAND" != x; then
56697      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56698    fi
56699  fi
56700
56701      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56702    fi
56703
56704    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56705      OPENWIN_HOME="/usr/openwin"
56706      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56707      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56708          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56709    fi
56710
56711    ac_ext=c
56712ac_cpp='$CPP $CPPFLAGS'
56713ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56714ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56715ac_compiler_gnu=$ac_cv_c_compiler_gnu
56716
56717    OLD_CFLAGS="$CFLAGS"
56718    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56719
56720    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56721    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56722do :
56723  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56724ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56725          # include <X11/Xlib.h>
56726          # include <X11/Xutil.h>
56727
56728
56729"
56730if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56731  cat >>confdefs.h <<_ACEOF
56732#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56733_ACEOF
56734 X11_HEADERS_OK=yes
56735else
56736  X11_HEADERS_OK=no; break
56737fi
56738
56739done
56740
56741
56742    if test "x$X11_HEADERS_OK" = xno; then
56743
56744  # Print a helpful message on how to acquire the necessary build dependency.
56745  # x11 is the help tag: freetype, cups, alsa etc
56746  MISSING_DEPENDENCY=x11
56747
56748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56749    cygwin_help $MISSING_DEPENDENCY
56750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56751    msys_help $MISSING_DEPENDENCY
56752  else
56753    PKGHANDLER_COMMAND=
56754
56755    case $PKGHANDLER in
56756      apt-get)
56757        apt_help     $MISSING_DEPENDENCY ;;
56758      yum)
56759        yum_help     $MISSING_DEPENDENCY ;;
56760      brew)
56761        brew_help    $MISSING_DEPENDENCY ;;
56762      port)
56763        port_help    $MISSING_DEPENDENCY ;;
56764      pkgutil)
56765        pkgutil_help $MISSING_DEPENDENCY ;;
56766      pkgadd)
56767        pkgadd_help  $MISSING_DEPENDENCY ;;
56768    esac
56769
56770    if test "x$PKGHANDLER_COMMAND" != x; then
56771      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56772    fi
56773  fi
56774
56775      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56776    fi
56777
56778    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56779    # defined in libawt_xawt.
56780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56781$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56782    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56783/* end confdefs.h.  */
56784#include <X11/extensions/Xrender.h>
56785int
56786main ()
56787{
56788XLinearGradient x;
56789  ;
56790  return 0;
56791}
56792_ACEOF
56793if ac_fn_c_try_compile "$LINENO"; then :
56794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56795$as_echo "yes" >&6; }
56796else
56797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56798$as_echo "no" >&6; }
56799         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56800fi
56801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56802
56803    CFLAGS="$OLD_CFLAGS"
56804    ac_ext=cpp
56805ac_cpp='$CXXCPP $CPPFLAGS'
56806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56809
56810  fi # NEEDS_LIB_X11
56811
56812
56813
56814
56815
56816
56817# Check whether --with-cups was given.
56818if test "${with_cups+set}" = set; then :
56819  withval=$with_cups;
56820fi
56821
56822
56823# Check whether --with-cups-include was given.
56824if test "${with_cups_include+set}" = set; then :
56825  withval=$with_cups_include;
56826fi
56827
56828
56829  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56830    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56831        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56832      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56833$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56834    fi
56835    CUPS_CFLAGS=
56836  else
56837    CUPS_FOUND=no
56838
56839    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56840      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56841    fi
56842
56843    if test "x${with_cups}" != x; then
56844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56845$as_echo_n "checking for cups headers... " >&6; }
56846      if test -s "${with_cups}/include/cups/cups.h"; then
56847        CUPS_CFLAGS="-I${with_cups}/include"
56848        CUPS_FOUND=yes
56849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56850$as_echo "$CUPS_FOUND" >&6; }
56851      else
56852        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56853      fi
56854    fi
56855    if test "x${with_cups_include}" != x; then
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56857$as_echo_n "checking for cups headers... " >&6; }
56858      if test -s "${with_cups_include}/cups/cups.h"; then
56859        CUPS_CFLAGS="-I${with_cups_include}"
56860        CUPS_FOUND=yes
56861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56862$as_echo "$CUPS_FOUND" >&6; }
56863      else
56864        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56865      fi
56866    fi
56867    if test "x$CUPS_FOUND" = xno; then
56868      # Are the cups headers installed in the default /usr/include location?
56869      for ac_header in cups/cups.h cups/ppd.h
56870do :
56871  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56872ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56874  cat >>confdefs.h <<_ACEOF
56875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56876_ACEOF
56877
56878          CUPS_FOUND=yes
56879          CUPS_CFLAGS=
56880          DEFAULT_CUPS=yes
56881
56882fi
56883
56884done
56885
56886    fi
56887    if test "x$CUPS_FOUND" = xno; then
56888
56889  # Print a helpful message on how to acquire the necessary build dependency.
56890  # cups is the help tag: freetype, cups, alsa etc
56891  MISSING_DEPENDENCY=cups
56892
56893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56894    cygwin_help $MISSING_DEPENDENCY
56895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56896    msys_help $MISSING_DEPENDENCY
56897  else
56898    PKGHANDLER_COMMAND=
56899
56900    case $PKGHANDLER in
56901      apt-get)
56902        apt_help     $MISSING_DEPENDENCY ;;
56903      yum)
56904        yum_help     $MISSING_DEPENDENCY ;;
56905      brew)
56906        brew_help    $MISSING_DEPENDENCY ;;
56907      port)
56908        port_help    $MISSING_DEPENDENCY ;;
56909      pkgutil)
56910        pkgutil_help $MISSING_DEPENDENCY ;;
56911      pkgadd)
56912        pkgadd_help  $MISSING_DEPENDENCY ;;
56913    esac
56914
56915    if test "x$PKGHANDLER_COMMAND" != x; then
56916      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56917    fi
56918  fi
56919
56920      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56921    fi
56922  fi
56923
56924
56925
56926
56927
56928# Check whether --with-freetype was given.
56929if test "${with_freetype+set}" = set; then :
56930  withval=$with_freetype;
56931fi
56932
56933
56934# Check whether --with-freetype-include was given.
56935if test "${with_freetype_include+set}" = set; then :
56936  withval=$with_freetype_include;
56937fi
56938
56939
56940# Check whether --with-freetype-lib was given.
56941if test "${with_freetype_lib+set}" = set; then :
56942  withval=$with_freetype_lib;
56943fi
56944
56945
56946# Check whether --with-freetype-src was given.
56947if test "${with_freetype_src+set}" = set; then :
56948  withval=$with_freetype_src;
56949fi
56950
56951  # Check whether --enable-freetype-bundling was given.
56952if test "${enable_freetype_bundling+set}" = set; then :
56953  enableval=$enable_freetype_bundling;
56954fi
56955
56956
56957  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56958  FREETYPE_BASE_NAME=freetype
56959  FREETYPE_CFLAGS=
56960  FREETYPE_LIBS=
56961  FREETYPE_BUNDLE_LIB_PATH=
56962
56963  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56964    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56965        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56966        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56967        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56968      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56969$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56970    fi
56971    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56972      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56973$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56974    fi
56975  else
56976    # freetype is needed to build; go get it!
56977
56978    BUNDLE_FREETYPE="$enable_freetype_bundling"
56979
56980    if  test "x$with_freetype_src" != x; then
56981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56982        # Try to build freetype if --with-freetype-src was given on Windows
56983
56984  FREETYPE_SRC_PATH="$with_freetype_src"
56985  BUILD_FREETYPE=yes
56986
56987  # Check if the freetype sources are acessible..
56988  if ! test -d $FREETYPE_SRC_PATH; then
56989    { $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
56990$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56991    BUILD_FREETYPE=no
56992  fi
56993  # ..and contain a vc2010 project file
56994  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56995  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56996    { $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
56997$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56998    BUILD_FREETYPE=no
56999  fi
57000  # Now check if configure found a version of 'msbuild.exe'
57001  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57002    { $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
57003$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;}
57004    BUILD_FREETYPE=no
57005  fi
57006
57007  # Ready to go..
57008  if test "x$BUILD_FREETYPE" = xyes; then
57009    # msbuild requires trailing slashes for output directories
57010    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57011    freetype_lib_path_unix="$freetype_lib_path"
57012    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57013
57014  unix_path="$vcxproj_path"
57015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57016    windows_path=`$CYGPATH -m "$unix_path"`
57017    vcxproj_path="$windows_path"
57018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57019    windows_path=`cmd //c echo $unix_path`
57020    vcxproj_path="$windows_path"
57021  fi
57022
57023
57024  unix_path="$freetype_lib_path"
57025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57026    windows_path=`$CYGPATH -m "$unix_path"`
57027    freetype_lib_path="$windows_path"
57028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57029    windows_path=`cmd //c echo $unix_path`
57030    freetype_lib_path="$windows_path"
57031  fi
57032
57033
57034  unix_path="$freetype_obj_path"
57035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57036    windows_path=`$CYGPATH -m "$unix_path"`
57037    freetype_obj_path="$windows_path"
57038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57039    windows_path=`cmd //c echo $unix_path`
57040    freetype_obj_path="$windows_path"
57041  fi
57042
57043    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57044      freetype_platform=x64
57045    else
57046      freetype_platform=win32
57047    fi
57048
57049    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57050    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57051    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57052    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57053    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57054$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57055
57056    # First we try to build the freetype.dll
57057    $ECHO -e "@echo off\n"\
57058        "$MSBUILD $vcxproj_path "\
57059        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57060        "/p:Configuration=\"Release Multithreaded\" "\
57061        "/p:Platform=$freetype_platform "\
57062        "/p:ConfigurationType=DynamicLibrary "\
57063        "/p:TargetName=freetype "\
57064        "/p:OutDir=\"$freetype_lib_path\" "\
57065        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57066    cmd /c freetype.bat
57067
57068    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57069      # If that succeeds we also build freetype.lib
57070      $ECHO -e "@echo off\n"\
57071          "$MSBUILD $vcxproj_path "\
57072          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57073          "/p:Configuration=\"Release Multithreaded\" "\
57074          "/p:Platform=$freetype_platform "\
57075          "/p:ConfigurationType=StaticLibrary "\
57076          "/p:TargetName=freetype "\
57077          "/p:OutDir=\"$freetype_lib_path\" "\
57078          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57079      cmd /c freetype.bat
57080
57081      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57082        # Once we build both, lib and dll, set freetype lib and include path appropriately
57083        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57084        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57085        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57086$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57087      else
57088        BUILD_FREETYPE=no
57089      fi
57090    else
57091      BUILD_FREETYPE=no
57092    fi
57093  fi
57094
57095        if test "x$BUILD_FREETYPE" = xyes; then
57096          # Okay, we built it. Check that it works.
57097
57098  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57099  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57100  METHOD="--with-freetype-src"
57101
57102  # Let's start with an optimistic view of the world :-)
57103  FOUND_FREETYPE=yes
57104
57105  # First look for the canonical freetype main include file ft2build.h.
57106  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57107    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57108    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57109    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57110      # Fail.
57111      FOUND_FREETYPE=no
57112    fi
57113  fi
57114
57115  if test "x$FOUND_FREETYPE" = xyes; then
57116    # Include file found, let's continue the sanity check.
57117    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57118$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57119
57120    # Reset to default value
57121    FREETYPE_BASE_NAME=freetype
57122    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57123    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57124      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57125          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57126        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57127        # for the .6 version explicitly.
57128        FREETYPE_BASE_NAME=freetype.6
57129        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57130        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57131$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57132      else
57133        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57134$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57135        FOUND_FREETYPE=no
57136      fi
57137    else
57138      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57139        # On Windows, we will need both .lib and .dll file.
57140        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57141          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57142$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57143          FOUND_FREETYPE=no
57144        fi
57145      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57146          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57147        # Found lib in isa dir, use that instead.
57148        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57149        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57150$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57151      fi
57152    fi
57153  fi
57154
57155  if test "x$FOUND_FREETYPE" = xyes; then
57156
57157  # Only process if variable expands to non-empty
57158
57159  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57161
57162  # Input might be given as Windows format, start by converting to
57163  # unix format.
57164  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57165  new_path=`$CYGPATH -u "$path"`
57166
57167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57170  # "foo.exe" is OK but "foo" is an error.
57171  #
57172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57173  # It is also a way to make sure we got the proper file name for the real test later on.
57174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57175  if test "x$test_shortpath" = x; then
57176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57178    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57179  fi
57180
57181  # Call helper function which possibly converts this using DOS-style short mode.
57182  # If so, the updated path is stored in $new_path.
57183
57184  input_path="$new_path"
57185  # Check if we need to convert this using DOS-style short mode. If the path
57186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57187  # take no chances and rewrite it.
57188  # Note: m4 eats our [], so we need to use [ and ] instead.
57189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57190  if test "x$has_forbidden_chars" != x; then
57191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57195      # Going to short mode and back again did indeed matter. Since short mode is
57196      # case insensitive, let's make it lowercase to improve readability.
57197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57198      # Now convert it back to Unix-style (cygpath)
57199      input_path=`$CYGPATH -u "$shortmode_path"`
57200      new_path="$input_path"
57201    fi
57202  fi
57203
57204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57205  if test "x$test_cygdrive_prefix" = x; then
57206    # As a simple fix, exclude /usr/bin since it's not a real path.
57207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57209      # a path prefixed by /cygdrive for fixpath to work.
57210      new_path="$CYGWIN_ROOT_PATH$input_path"
57211    fi
57212  fi
57213
57214
57215  if test "x$path" != "x$new_path"; then
57216    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57219  fi
57220
57221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57222
57223  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57224  has_colon=`$ECHO $path | $GREP ^.:`
57225  new_path="$path"
57226  if test "x$has_colon" = x; then
57227    # Not in mixed or Windows style, start by that.
57228    new_path=`cmd //c echo $path`
57229  fi
57230
57231
57232  input_path="$new_path"
57233  # Check if we need to convert this using DOS-style short mode. If the path
57234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57235  # take no chances and rewrite it.
57236  # Note: m4 eats our [], so we need to use [ and ] instead.
57237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57238  if test "x$has_forbidden_chars" != x; then
57239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57241  fi
57242
57243
57244  windows_path="$new_path"
57245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57246    unix_path=`$CYGPATH -u "$windows_path"`
57247    new_path="$unix_path"
57248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57250    new_path="$unix_path"
57251  fi
57252
57253  if test "x$path" != "x$new_path"; then
57254    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57257  fi
57258
57259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57261
57262    else
57263      # We're on a unix platform. Hooray! :)
57264      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57265      has_space=`$ECHO "$path" | $GREP " "`
57266      if test "x$has_space" != x; then
57267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57268$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57270      fi
57271
57272      # Use eval to expand a potential ~
57273      eval path="$path"
57274      if test ! -f "$path" && test ! -d "$path"; then
57275        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57276      fi
57277
57278      if test -d "$path"; then
57279        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57280      else
57281        dir="`$DIRNAME "$path"`"
57282        base="`$BASENAME "$path"`"
57283        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57284      fi
57285    fi
57286  fi
57287
57288
57289  # Only process if variable expands to non-empty
57290
57291  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57293
57294  # Input might be given as Windows format, start by converting to
57295  # unix format.
57296  path="$POTENTIAL_FREETYPE_LIB_PATH"
57297  new_path=`$CYGPATH -u "$path"`
57298
57299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57302  # "foo.exe" is OK but "foo" is an error.
57303  #
57304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57305  # It is also a way to make sure we got the proper file name for the real test later on.
57306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57307  if test "x$test_shortpath" = x; then
57308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57310    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57311  fi
57312
57313  # Call helper function which possibly converts this using DOS-style short mode.
57314  # If so, the updated path is stored in $new_path.
57315
57316  input_path="$new_path"
57317  # Check if we need to convert this using DOS-style short mode. If the path
57318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57319  # take no chances and rewrite it.
57320  # Note: m4 eats our [], so we need to use [ and ] instead.
57321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57322  if test "x$has_forbidden_chars" != x; then
57323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57327      # Going to short mode and back again did indeed matter. Since short mode is
57328      # case insensitive, let's make it lowercase to improve readability.
57329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57330      # Now convert it back to Unix-style (cygpath)
57331      input_path=`$CYGPATH -u "$shortmode_path"`
57332      new_path="$input_path"
57333    fi
57334  fi
57335
57336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57337  if test "x$test_cygdrive_prefix" = x; then
57338    # As a simple fix, exclude /usr/bin since it's not a real path.
57339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57341      # a path prefixed by /cygdrive for fixpath to work.
57342      new_path="$CYGWIN_ROOT_PATH$input_path"
57343    fi
57344  fi
57345
57346
57347  if test "x$path" != "x$new_path"; then
57348    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57351  fi
57352
57353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57354
57355  path="$POTENTIAL_FREETYPE_LIB_PATH"
57356  has_colon=`$ECHO $path | $GREP ^.:`
57357  new_path="$path"
57358  if test "x$has_colon" = x; then
57359    # Not in mixed or Windows style, start by that.
57360    new_path=`cmd //c echo $path`
57361  fi
57362
57363
57364  input_path="$new_path"
57365  # Check if we need to convert this using DOS-style short mode. If the path
57366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57367  # take no chances and rewrite it.
57368  # Note: m4 eats our [], so we need to use [ and ] instead.
57369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57370  if test "x$has_forbidden_chars" != x; then
57371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57373  fi
57374
57375
57376  windows_path="$new_path"
57377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57378    unix_path=`$CYGPATH -u "$windows_path"`
57379    new_path="$unix_path"
57380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57382    new_path="$unix_path"
57383  fi
57384
57385  if test "x$path" != "x$new_path"; then
57386    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57389  fi
57390
57391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57393
57394    else
57395      # We're on a unix platform. Hooray! :)
57396      path="$POTENTIAL_FREETYPE_LIB_PATH"
57397      has_space=`$ECHO "$path" | $GREP " "`
57398      if test "x$has_space" != x; then
57399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57402      fi
57403
57404      # Use eval to expand a potential ~
57405      eval path="$path"
57406      if test ! -f "$path" && test ! -d "$path"; then
57407        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57408      fi
57409
57410      if test -d "$path"; then
57411        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57412      else
57413        dir="`$DIRNAME "$path"`"
57414        base="`$BASENAME "$path"`"
57415        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57416      fi
57417    fi
57418  fi
57419
57420
57421    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57423$as_echo_n "checking for freetype includes... " >&6; }
57424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57425$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57426    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57428$as_echo_n "checking for freetype libraries... " >&6; }
57429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57430$as_echo "$FREETYPE_LIB_PATH" >&6; }
57431  fi
57432
57433          if test "x$FOUND_FREETYPE" != xyes; then
57434            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57435          fi
57436        else
57437          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57438$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57439          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57440        fi
57441      else
57442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57443$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57444      fi
57445    fi
57446
57447    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57448      # User has specified settings
57449
57450      if test "x$BUNDLE_FREETYPE" = x; then
57451        # If not specified, default is to bundle freetype
57452        BUNDLE_FREETYPE=yes
57453      fi
57454
57455      if test "x$with_freetype" != x; then
57456        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57457        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57458      fi
57459
57460      # Allow --with-freetype-lib and --with-freetype-include to override
57461      if test "x$with_freetype_include" != x; then
57462        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57463      fi
57464      if test "x$with_freetype_lib" != x; then
57465        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57466      fi
57467
57468      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57469        # Okay, we got it. Check that it works.
57470
57471  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57472  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57473  METHOD="--with-freetype"
57474
57475  # Let's start with an optimistic view of the world :-)
57476  FOUND_FREETYPE=yes
57477
57478  # First look for the canonical freetype main include file ft2build.h.
57479  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57480    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57481    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57482    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57483      # Fail.
57484      FOUND_FREETYPE=no
57485    fi
57486  fi
57487
57488  if test "x$FOUND_FREETYPE" = xyes; then
57489    # Include file found, let's continue the sanity check.
57490    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57491$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57492
57493    # Reset to default value
57494    FREETYPE_BASE_NAME=freetype
57495    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57496    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57497      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57498          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57499        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57500        # for the .6 version explicitly.
57501        FREETYPE_BASE_NAME=freetype.6
57502        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57503        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57504$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57505      else
57506        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57507$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57508        FOUND_FREETYPE=no
57509      fi
57510    else
57511      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57512        # On Windows, we will need both .lib and .dll file.
57513        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57514          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57516          FOUND_FREETYPE=no
57517        fi
57518      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57520        # Found lib in isa dir, use that instead.
57521        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57522        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57523$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57524      fi
57525    fi
57526  fi
57527
57528  if test "x$FOUND_FREETYPE" = xyes; then
57529
57530  # Only process if variable expands to non-empty
57531
57532  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57534
57535  # Input might be given as Windows format, start by converting to
57536  # unix format.
57537  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57538  new_path=`$CYGPATH -u "$path"`
57539
57540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57543  # "foo.exe" is OK but "foo" is an error.
57544  #
57545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57546  # It is also a way to make sure we got the proper file name for the real test later on.
57547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57548  if test "x$test_shortpath" = x; then
57549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57551    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57552  fi
57553
57554  # Call helper function which possibly converts this using DOS-style short mode.
57555  # If so, the updated path is stored in $new_path.
57556
57557  input_path="$new_path"
57558  # Check if we need to convert this using DOS-style short mode. If the path
57559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57560  # take no chances and rewrite it.
57561  # Note: m4 eats our [], so we need to use [ and ] instead.
57562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57563  if test "x$has_forbidden_chars" != x; then
57564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57568      # Going to short mode and back again did indeed matter. Since short mode is
57569      # case insensitive, let's make it lowercase to improve readability.
57570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57571      # Now convert it back to Unix-style (cygpath)
57572      input_path=`$CYGPATH -u "$shortmode_path"`
57573      new_path="$input_path"
57574    fi
57575  fi
57576
57577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57578  if test "x$test_cygdrive_prefix" = x; then
57579    # As a simple fix, exclude /usr/bin since it's not a real path.
57580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57582      # a path prefixed by /cygdrive for fixpath to work.
57583      new_path="$CYGWIN_ROOT_PATH$input_path"
57584    fi
57585  fi
57586
57587
57588  if test "x$path" != "x$new_path"; then
57589    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57592  fi
57593
57594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57595
57596  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57597  has_colon=`$ECHO $path | $GREP ^.:`
57598  new_path="$path"
57599  if test "x$has_colon" = x; then
57600    # Not in mixed or Windows style, start by that.
57601    new_path=`cmd //c echo $path`
57602  fi
57603
57604
57605  input_path="$new_path"
57606  # Check if we need to convert this using DOS-style short mode. If the path
57607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57608  # take no chances and rewrite it.
57609  # Note: m4 eats our [], so we need to use [ and ] instead.
57610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57611  if test "x$has_forbidden_chars" != x; then
57612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57614  fi
57615
57616
57617  windows_path="$new_path"
57618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57619    unix_path=`$CYGPATH -u "$windows_path"`
57620    new_path="$unix_path"
57621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57623    new_path="$unix_path"
57624  fi
57625
57626  if test "x$path" != "x$new_path"; then
57627    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57630  fi
57631
57632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57634
57635    else
57636      # We're on a unix platform. Hooray! :)
57637      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57638      has_space=`$ECHO "$path" | $GREP " "`
57639      if test "x$has_space" != x; then
57640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57643      fi
57644
57645      # Use eval to expand a potential ~
57646      eval path="$path"
57647      if test ! -f "$path" && test ! -d "$path"; then
57648        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57649      fi
57650
57651      if test -d "$path"; then
57652        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57653      else
57654        dir="`$DIRNAME "$path"`"
57655        base="`$BASENAME "$path"`"
57656        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57657      fi
57658    fi
57659  fi
57660
57661
57662  # Only process if variable expands to non-empty
57663
57664  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57666
57667  # Input might be given as Windows format, start by converting to
57668  # unix format.
57669  path="$POTENTIAL_FREETYPE_LIB_PATH"
57670  new_path=`$CYGPATH -u "$path"`
57671
57672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57675  # "foo.exe" is OK but "foo" is an error.
57676  #
57677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57678  # It is also a way to make sure we got the proper file name for the real test later on.
57679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57680  if test "x$test_shortpath" = x; then
57681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57684  fi
57685
57686  # Call helper function which possibly converts this using DOS-style short mode.
57687  # If so, the updated path is stored in $new_path.
57688
57689  input_path="$new_path"
57690  # Check if we need to convert this using DOS-style short mode. If the path
57691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57692  # take no chances and rewrite it.
57693  # Note: m4 eats our [], so we need to use [ and ] instead.
57694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57695  if test "x$has_forbidden_chars" != x; then
57696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57700      # Going to short mode and back again did indeed matter. Since short mode is
57701      # case insensitive, let's make it lowercase to improve readability.
57702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57703      # Now convert it back to Unix-style (cygpath)
57704      input_path=`$CYGPATH -u "$shortmode_path"`
57705      new_path="$input_path"
57706    fi
57707  fi
57708
57709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57710  if test "x$test_cygdrive_prefix" = x; then
57711    # As a simple fix, exclude /usr/bin since it's not a real path.
57712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57714      # a path prefixed by /cygdrive for fixpath to work.
57715      new_path="$CYGWIN_ROOT_PATH$input_path"
57716    fi
57717  fi
57718
57719
57720  if test "x$path" != "x$new_path"; then
57721    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57724  fi
57725
57726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57727
57728  path="$POTENTIAL_FREETYPE_LIB_PATH"
57729  has_colon=`$ECHO $path | $GREP ^.:`
57730  new_path="$path"
57731  if test "x$has_colon" = x; then
57732    # Not in mixed or Windows style, start by that.
57733    new_path=`cmd //c echo $path`
57734  fi
57735
57736
57737  input_path="$new_path"
57738  # Check if we need to convert this using DOS-style short mode. If the path
57739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57740  # take no chances and rewrite it.
57741  # Note: m4 eats our [], so we need to use [ and ] instead.
57742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57743  if test "x$has_forbidden_chars" != x; then
57744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57746  fi
57747
57748
57749  windows_path="$new_path"
57750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57751    unix_path=`$CYGPATH -u "$windows_path"`
57752    new_path="$unix_path"
57753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57755    new_path="$unix_path"
57756  fi
57757
57758  if test "x$path" != "x$new_path"; then
57759    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57762  fi
57763
57764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57766
57767    else
57768      # We're on a unix platform. Hooray! :)
57769      path="$POTENTIAL_FREETYPE_LIB_PATH"
57770      has_space=`$ECHO "$path" | $GREP " "`
57771      if test "x$has_space" != x; then
57772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57775      fi
57776
57777      # Use eval to expand a potential ~
57778      eval path="$path"
57779      if test ! -f "$path" && test ! -d "$path"; then
57780        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57781      fi
57782
57783      if test -d "$path"; then
57784        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57785      else
57786        dir="`$DIRNAME "$path"`"
57787        base="`$BASENAME "$path"`"
57788        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57789      fi
57790    fi
57791  fi
57792
57793
57794    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57796$as_echo_n "checking for freetype includes... " >&6; }
57797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57798$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57799    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57801$as_echo_n "checking for freetype libraries... " >&6; }
57802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57803$as_echo "$FREETYPE_LIB_PATH" >&6; }
57804  fi
57805
57806        if test "x$FOUND_FREETYPE" != xyes; then
57807          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57808        fi
57809      else
57810        # User specified only one of lib or include. This is an error.
57811        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57812          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57813$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57814          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57815        else
57816          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57817$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57818          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57819        fi
57820      fi
57821    else
57822      # User did not specify settings, but we need freetype. Try to locate it.
57823
57824      if test "x$BUNDLE_FREETYPE" = x; then
57825        # If not specified, default is to bundle freetype only on windows
57826        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57827          BUNDLE_FREETYPE=yes
57828        else
57829          BUNDLE_FREETYPE=no
57830        fi
57831      fi
57832
57833      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57834      if test "x$SYSROOT" = x; then
57835        if test "x$FOUND_FREETYPE" != xyes; then
57836          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57837          if test "x$PKG_CONFIG" != x; then
57838
57839pkg_failed=no
57840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57841$as_echo_n "checking for FREETYPE... " >&6; }
57842
57843if test -n "$FREETYPE_CFLAGS"; then
57844    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57845 elif test -n "$PKG_CONFIG"; then
57846    if test -n "$PKG_CONFIG" && \
57847    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57848  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57849  ac_status=$?
57850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57851  test $ac_status = 0; }; then
57852  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57853else
57854  pkg_failed=yes
57855fi
57856 else
57857    pkg_failed=untried
57858fi
57859if test -n "$FREETYPE_LIBS"; then
57860    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57861 elif test -n "$PKG_CONFIG"; then
57862    if test -n "$PKG_CONFIG" && \
57863    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57864  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57865  ac_status=$?
57866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57867  test $ac_status = 0; }; then
57868  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57869else
57870  pkg_failed=yes
57871fi
57872 else
57873    pkg_failed=untried
57874fi
57875
57876
57877
57878if test $pkg_failed = yes; then
57879
57880if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57881        _pkg_short_errors_supported=yes
57882else
57883        _pkg_short_errors_supported=no
57884fi
57885        if test $_pkg_short_errors_supported = yes; then
57886	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57887        else
57888	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57889        fi
57890	# Put the nasty error message in config.log where it belongs
57891	echo "$FREETYPE_PKG_ERRORS" >&5
57892
57893	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57894$as_echo "no" >&6; }
57895                FOUND_FREETYPE=no
57896elif test $pkg_failed = untried; then
57897	FOUND_FREETYPE=no
57898else
57899	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57900	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57902$as_echo "yes" >&6; }
57903	FOUND_FREETYPE=yes
57904fi
57905            if test "x$FOUND_FREETYPE" = xyes; then
57906              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57907              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57908              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57909              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57910                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57911              fi
57912              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57913              if test "x$BUNDLE_FREETYPE" = xyes; then
57914                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57915$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57916                FOUND_FREETYPE=no
57917              else
57918                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57919$as_echo_n "checking for freetype... " >&6; }
57920                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57921$as_echo "yes (using pkg-config)" >&6; }
57922              fi
57923            fi
57924          fi
57925        fi
57926      fi
57927
57928      if test "x$FOUND_FREETYPE" != xyes; then
57929        # Check in well-known locations
57930        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57931          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57932
57933  windows_path="$FREETYPE_BASE_DIR"
57934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57935    unix_path=`$CYGPATH -u "$windows_path"`
57936    FREETYPE_BASE_DIR="$unix_path"
57937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57939    FREETYPE_BASE_DIR="$unix_path"
57940  fi
57941
57942
57943  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57944  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57945  METHOD="well-known location"
57946
57947  # Let's start with an optimistic view of the world :-)
57948  FOUND_FREETYPE=yes
57949
57950  # First look for the canonical freetype main include file ft2build.h.
57951  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57952    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57953    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57954    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57955      # Fail.
57956      FOUND_FREETYPE=no
57957    fi
57958  fi
57959
57960  if test "x$FOUND_FREETYPE" = xyes; then
57961    # Include file found, let's continue the sanity check.
57962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57963$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57964
57965    # Reset to default value
57966    FREETYPE_BASE_NAME=freetype
57967    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57968    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57969      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57970          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57971        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57972        # for the .6 version explicitly.
57973        FREETYPE_BASE_NAME=freetype.6
57974        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57975        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57976$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57977      else
57978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57980        FOUND_FREETYPE=no
57981      fi
57982    else
57983      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57984        # On Windows, we will need both .lib and .dll file.
57985        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57986          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57987$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57988          FOUND_FREETYPE=no
57989        fi
57990      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57991          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57992        # Found lib in isa dir, use that instead.
57993        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57994        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57995$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57996      fi
57997    fi
57998  fi
57999
58000  if test "x$FOUND_FREETYPE" = xyes; then
58001
58002  # Only process if variable expands to non-empty
58003
58004  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58006
58007  # Input might be given as Windows format, start by converting to
58008  # unix format.
58009  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58010  new_path=`$CYGPATH -u "$path"`
58011
58012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58015  # "foo.exe" is OK but "foo" is an error.
58016  #
58017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58018  # It is also a way to make sure we got the proper file name for the real test later on.
58019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58020  if test "x$test_shortpath" = x; then
58021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58023    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58024  fi
58025
58026  # Call helper function which possibly converts this using DOS-style short mode.
58027  # If so, the updated path is stored in $new_path.
58028
58029  input_path="$new_path"
58030  # Check if we need to convert this using DOS-style short mode. If the path
58031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58032  # take no chances and rewrite it.
58033  # Note: m4 eats our [], so we need to use [ and ] instead.
58034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58035  if test "x$has_forbidden_chars" != x; then
58036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58040      # Going to short mode and back again did indeed matter. Since short mode is
58041      # case insensitive, let's make it lowercase to improve readability.
58042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58043      # Now convert it back to Unix-style (cygpath)
58044      input_path=`$CYGPATH -u "$shortmode_path"`
58045      new_path="$input_path"
58046    fi
58047  fi
58048
58049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58050  if test "x$test_cygdrive_prefix" = x; then
58051    # As a simple fix, exclude /usr/bin since it's not a real path.
58052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58054      # a path prefixed by /cygdrive for fixpath to work.
58055      new_path="$CYGWIN_ROOT_PATH$input_path"
58056    fi
58057  fi
58058
58059
58060  if test "x$path" != "x$new_path"; then
58061    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58064  fi
58065
58066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58067
58068  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58069  has_colon=`$ECHO $path | $GREP ^.:`
58070  new_path="$path"
58071  if test "x$has_colon" = x; then
58072    # Not in mixed or Windows style, start by that.
58073    new_path=`cmd //c echo $path`
58074  fi
58075
58076
58077  input_path="$new_path"
58078  # Check if we need to convert this using DOS-style short mode. If the path
58079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58080  # take no chances and rewrite it.
58081  # Note: m4 eats our [], so we need to use [ and ] instead.
58082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58083  if test "x$has_forbidden_chars" != x; then
58084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58086  fi
58087
58088
58089  windows_path="$new_path"
58090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58091    unix_path=`$CYGPATH -u "$windows_path"`
58092    new_path="$unix_path"
58093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58095    new_path="$unix_path"
58096  fi
58097
58098  if test "x$path" != "x$new_path"; then
58099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58102  fi
58103
58104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58106
58107    else
58108      # We're on a unix platform. Hooray! :)
58109      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58110      has_space=`$ECHO "$path" | $GREP " "`
58111      if test "x$has_space" != x; then
58112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58115      fi
58116
58117      # Use eval to expand a potential ~
58118      eval path="$path"
58119      if test ! -f "$path" && test ! -d "$path"; then
58120        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58121      fi
58122
58123      if test -d "$path"; then
58124        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58125      else
58126        dir="`$DIRNAME "$path"`"
58127        base="`$BASENAME "$path"`"
58128        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58129      fi
58130    fi
58131  fi
58132
58133
58134  # Only process if variable expands to non-empty
58135
58136  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58138
58139  # Input might be given as Windows format, start by converting to
58140  # unix format.
58141  path="$POTENTIAL_FREETYPE_LIB_PATH"
58142  new_path=`$CYGPATH -u "$path"`
58143
58144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58147  # "foo.exe" is OK but "foo" is an error.
58148  #
58149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58150  # It is also a way to make sure we got the proper file name for the real test later on.
58151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58152  if test "x$test_shortpath" = x; then
58153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58155    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58156  fi
58157
58158  # Call helper function which possibly converts this using DOS-style short mode.
58159  # If so, the updated path is stored in $new_path.
58160
58161  input_path="$new_path"
58162  # Check if we need to convert this using DOS-style short mode. If the path
58163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58164  # take no chances and rewrite it.
58165  # Note: m4 eats our [], so we need to use [ and ] instead.
58166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58167  if test "x$has_forbidden_chars" != x; then
58168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58172      # Going to short mode and back again did indeed matter. Since short mode is
58173      # case insensitive, let's make it lowercase to improve readability.
58174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58175      # Now convert it back to Unix-style (cygpath)
58176      input_path=`$CYGPATH -u "$shortmode_path"`
58177      new_path="$input_path"
58178    fi
58179  fi
58180
58181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58182  if test "x$test_cygdrive_prefix" = x; then
58183    # As a simple fix, exclude /usr/bin since it's not a real path.
58184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58186      # a path prefixed by /cygdrive for fixpath to work.
58187      new_path="$CYGWIN_ROOT_PATH$input_path"
58188    fi
58189  fi
58190
58191
58192  if test "x$path" != "x$new_path"; then
58193    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58195$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58196  fi
58197
58198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58199
58200  path="$POTENTIAL_FREETYPE_LIB_PATH"
58201  has_colon=`$ECHO $path | $GREP ^.:`
58202  new_path="$path"
58203  if test "x$has_colon" = x; then
58204    # Not in mixed or Windows style, start by that.
58205    new_path=`cmd //c echo $path`
58206  fi
58207
58208
58209  input_path="$new_path"
58210  # Check if we need to convert this using DOS-style short mode. If the path
58211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58212  # take no chances and rewrite it.
58213  # Note: m4 eats our [], so we need to use [ and ] instead.
58214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58215  if test "x$has_forbidden_chars" != x; then
58216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58218  fi
58219
58220
58221  windows_path="$new_path"
58222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58223    unix_path=`$CYGPATH -u "$windows_path"`
58224    new_path="$unix_path"
58225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58227    new_path="$unix_path"
58228  fi
58229
58230  if test "x$path" != "x$new_path"; then
58231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58234  fi
58235
58236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58238
58239    else
58240      # We're on a unix platform. Hooray! :)
58241      path="$POTENTIAL_FREETYPE_LIB_PATH"
58242      has_space=`$ECHO "$path" | $GREP " "`
58243      if test "x$has_space" != x; then
58244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58246        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58247      fi
58248
58249      # Use eval to expand a potential ~
58250      eval path="$path"
58251      if test ! -f "$path" && test ! -d "$path"; then
58252        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58253      fi
58254
58255      if test -d "$path"; then
58256        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58257      else
58258        dir="`$DIRNAME "$path"`"
58259        base="`$BASENAME "$path"`"
58260        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58261      fi
58262    fi
58263  fi
58264
58265
58266    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58268$as_echo_n "checking for freetype includes... " >&6; }
58269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58270$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58271    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58273$as_echo_n "checking for freetype libraries... " >&6; }
58274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58275$as_echo "$FREETYPE_LIB_PATH" >&6; }
58276  fi
58277
58278          if test "x$FOUND_FREETYPE" != xyes; then
58279            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58280
58281  windows_path="$FREETYPE_BASE_DIR"
58282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58283    unix_path=`$CYGPATH -u "$windows_path"`
58284    FREETYPE_BASE_DIR="$unix_path"
58285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58287    FREETYPE_BASE_DIR="$unix_path"
58288  fi
58289
58290
58291  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58292  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58293  METHOD="well-known location"
58294
58295  # Let's start with an optimistic view of the world :-)
58296  FOUND_FREETYPE=yes
58297
58298  # First look for the canonical freetype main include file ft2build.h.
58299  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58300    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58301    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58302    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58303      # Fail.
58304      FOUND_FREETYPE=no
58305    fi
58306  fi
58307
58308  if test "x$FOUND_FREETYPE" = xyes; then
58309    # Include file found, let's continue the sanity check.
58310    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58311$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58312
58313    # Reset to default value
58314    FREETYPE_BASE_NAME=freetype
58315    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58316    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58317      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58318          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58319        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58320        # for the .6 version explicitly.
58321        FREETYPE_BASE_NAME=freetype.6
58322        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58323        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58324$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58325      else
58326        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58327$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58328        FOUND_FREETYPE=no
58329      fi
58330    else
58331      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58332        # On Windows, we will need both .lib and .dll file.
58333        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58334          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58335$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58336          FOUND_FREETYPE=no
58337        fi
58338      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58339          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58340        # Found lib in isa dir, use that instead.
58341        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58342        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58343$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58344      fi
58345    fi
58346  fi
58347
58348  if test "x$FOUND_FREETYPE" = xyes; then
58349
58350  # Only process if variable expands to non-empty
58351
58352  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58354
58355  # Input might be given as Windows format, start by converting to
58356  # unix format.
58357  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58358  new_path=`$CYGPATH -u "$path"`
58359
58360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58363  # "foo.exe" is OK but "foo" is an error.
58364  #
58365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58366  # It is also a way to make sure we got the proper file name for the real test later on.
58367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58368  if test "x$test_shortpath" = x; then
58369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58371    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58372  fi
58373
58374  # Call helper function which possibly converts this using DOS-style short mode.
58375  # If so, the updated path is stored in $new_path.
58376
58377  input_path="$new_path"
58378  # Check if we need to convert this using DOS-style short mode. If the path
58379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58380  # take no chances and rewrite it.
58381  # Note: m4 eats our [], so we need to use [ and ] instead.
58382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58383  if test "x$has_forbidden_chars" != x; then
58384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58388      # Going to short mode and back again did indeed matter. Since short mode is
58389      # case insensitive, let's make it lowercase to improve readability.
58390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58391      # Now convert it back to Unix-style (cygpath)
58392      input_path=`$CYGPATH -u "$shortmode_path"`
58393      new_path="$input_path"
58394    fi
58395  fi
58396
58397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58398  if test "x$test_cygdrive_prefix" = x; then
58399    # As a simple fix, exclude /usr/bin since it's not a real path.
58400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58402      # a path prefixed by /cygdrive for fixpath to work.
58403      new_path="$CYGWIN_ROOT_PATH$input_path"
58404    fi
58405  fi
58406
58407
58408  if test "x$path" != "x$new_path"; then
58409    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58412  fi
58413
58414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58415
58416  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58417  has_colon=`$ECHO $path | $GREP ^.:`
58418  new_path="$path"
58419  if test "x$has_colon" = x; then
58420    # Not in mixed or Windows style, start by that.
58421    new_path=`cmd //c echo $path`
58422  fi
58423
58424
58425  input_path="$new_path"
58426  # Check if we need to convert this using DOS-style short mode. If the path
58427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58428  # take no chances and rewrite it.
58429  # Note: m4 eats our [], so we need to use [ and ] instead.
58430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58431  if test "x$has_forbidden_chars" != x; then
58432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58434  fi
58435
58436
58437  windows_path="$new_path"
58438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58439    unix_path=`$CYGPATH -u "$windows_path"`
58440    new_path="$unix_path"
58441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58443    new_path="$unix_path"
58444  fi
58445
58446  if test "x$path" != "x$new_path"; then
58447    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58450  fi
58451
58452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58454
58455    else
58456      # We're on a unix platform. Hooray! :)
58457      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58458      has_space=`$ECHO "$path" | $GREP " "`
58459      if test "x$has_space" != x; then
58460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58463      fi
58464
58465      # Use eval to expand a potential ~
58466      eval path="$path"
58467      if test ! -f "$path" && test ! -d "$path"; then
58468        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58469      fi
58470
58471      if test -d "$path"; then
58472        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58473      else
58474        dir="`$DIRNAME "$path"`"
58475        base="`$BASENAME "$path"`"
58476        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58477      fi
58478    fi
58479  fi
58480
58481
58482  # Only process if variable expands to non-empty
58483
58484  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58486
58487  # Input might be given as Windows format, start by converting to
58488  # unix format.
58489  path="$POTENTIAL_FREETYPE_LIB_PATH"
58490  new_path=`$CYGPATH -u "$path"`
58491
58492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58495  # "foo.exe" is OK but "foo" is an error.
58496  #
58497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58498  # It is also a way to make sure we got the proper file name for the real test later on.
58499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58500  if test "x$test_shortpath" = x; then
58501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58503    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58504  fi
58505
58506  # Call helper function which possibly converts this using DOS-style short mode.
58507  # If so, the updated path is stored in $new_path.
58508
58509  input_path="$new_path"
58510  # Check if we need to convert this using DOS-style short mode. If the path
58511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58512  # take no chances and rewrite it.
58513  # Note: m4 eats our [], so we need to use [ and ] instead.
58514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58515  if test "x$has_forbidden_chars" != x; then
58516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58520      # Going to short mode and back again did indeed matter. Since short mode is
58521      # case insensitive, let's make it lowercase to improve readability.
58522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58523      # Now convert it back to Unix-style (cygpath)
58524      input_path=`$CYGPATH -u "$shortmode_path"`
58525      new_path="$input_path"
58526    fi
58527  fi
58528
58529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58530  if test "x$test_cygdrive_prefix" = x; then
58531    # As a simple fix, exclude /usr/bin since it's not a real path.
58532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58534      # a path prefixed by /cygdrive for fixpath to work.
58535      new_path="$CYGWIN_ROOT_PATH$input_path"
58536    fi
58537  fi
58538
58539
58540  if test "x$path" != "x$new_path"; then
58541    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58544  fi
58545
58546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58547
58548  path="$POTENTIAL_FREETYPE_LIB_PATH"
58549  has_colon=`$ECHO $path | $GREP ^.:`
58550  new_path="$path"
58551  if test "x$has_colon" = x; then
58552    # Not in mixed or Windows style, start by that.
58553    new_path=`cmd //c echo $path`
58554  fi
58555
58556
58557  input_path="$new_path"
58558  # Check if we need to convert this using DOS-style short mode. If the path
58559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58560  # take no chances and rewrite it.
58561  # Note: m4 eats our [], so we need to use [ and ] instead.
58562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58563  if test "x$has_forbidden_chars" != x; then
58564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58566  fi
58567
58568
58569  windows_path="$new_path"
58570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58571    unix_path=`$CYGPATH -u "$windows_path"`
58572    new_path="$unix_path"
58573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58575    new_path="$unix_path"
58576  fi
58577
58578  if test "x$path" != "x$new_path"; then
58579    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58582  fi
58583
58584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58586
58587    else
58588      # We're on a unix platform. Hooray! :)
58589      path="$POTENTIAL_FREETYPE_LIB_PATH"
58590      has_space=`$ECHO "$path" | $GREP " "`
58591      if test "x$has_space" != x; then
58592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58595      fi
58596
58597      # Use eval to expand a potential ~
58598      eval path="$path"
58599      if test ! -f "$path" && test ! -d "$path"; then
58600        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58601      fi
58602
58603      if test -d "$path"; then
58604        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58605      else
58606        dir="`$DIRNAME "$path"`"
58607        base="`$BASENAME "$path"`"
58608        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58609      fi
58610    fi
58611  fi
58612
58613
58614    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58616$as_echo_n "checking for freetype includes... " >&6; }
58617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58618$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58619    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58621$as_echo_n "checking for freetype libraries... " >&6; }
58622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58623$as_echo "$FREETYPE_LIB_PATH" >&6; }
58624  fi
58625
58626          fi
58627          if test "x$FOUND_FREETYPE" != xyes; then
58628            FREETYPE_BASE_DIR="$HOME/freetype"
58629
58630  windows_path="$FREETYPE_BASE_DIR"
58631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58632    unix_path=`$CYGPATH -u "$windows_path"`
58633    FREETYPE_BASE_DIR="$unix_path"
58634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58636    FREETYPE_BASE_DIR="$unix_path"
58637  fi
58638
58639            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58640
58641  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58642  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58643  METHOD="well-known location"
58644
58645  # Let's start with an optimistic view of the world :-)
58646  FOUND_FREETYPE=yes
58647
58648  # First look for the canonical freetype main include file ft2build.h.
58649  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58650    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58651    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58652    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58653      # Fail.
58654      FOUND_FREETYPE=no
58655    fi
58656  fi
58657
58658  if test "x$FOUND_FREETYPE" = xyes; then
58659    # Include file found, let's continue the sanity check.
58660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58661$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58662
58663    # Reset to default value
58664    FREETYPE_BASE_NAME=freetype
58665    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58666    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58667      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58668          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58669        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58670        # for the .6 version explicitly.
58671        FREETYPE_BASE_NAME=freetype.6
58672        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58673        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58674$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58675      else
58676        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58677$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58678        FOUND_FREETYPE=no
58679      fi
58680    else
58681      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58682        # On Windows, we will need both .lib and .dll file.
58683        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58684          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58685$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58686          FOUND_FREETYPE=no
58687        fi
58688      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58690        # Found lib in isa dir, use that instead.
58691        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58692        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58693$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58694      fi
58695    fi
58696  fi
58697
58698  if test "x$FOUND_FREETYPE" = xyes; then
58699
58700  # Only process if variable expands to non-empty
58701
58702  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58704
58705  # Input might be given as Windows format, start by converting to
58706  # unix format.
58707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58708  new_path=`$CYGPATH -u "$path"`
58709
58710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58713  # "foo.exe" is OK but "foo" is an error.
58714  #
58715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58716  # It is also a way to make sure we got the proper file name for the real test later on.
58717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58718  if test "x$test_shortpath" = x; then
58719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58721    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58722  fi
58723
58724  # Call helper function which possibly converts this using DOS-style short mode.
58725  # If so, the updated path is stored in $new_path.
58726
58727  input_path="$new_path"
58728  # Check if we need to convert this using DOS-style short mode. If the path
58729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58730  # take no chances and rewrite it.
58731  # Note: m4 eats our [], so we need to use [ and ] instead.
58732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58733  if test "x$has_forbidden_chars" != x; then
58734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58738      # Going to short mode and back again did indeed matter. Since short mode is
58739      # case insensitive, let's make it lowercase to improve readability.
58740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58741      # Now convert it back to Unix-style (cygpath)
58742      input_path=`$CYGPATH -u "$shortmode_path"`
58743      new_path="$input_path"
58744    fi
58745  fi
58746
58747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58748  if test "x$test_cygdrive_prefix" = x; then
58749    # As a simple fix, exclude /usr/bin since it's not a real path.
58750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58752      # a path prefixed by /cygdrive for fixpath to work.
58753      new_path="$CYGWIN_ROOT_PATH$input_path"
58754    fi
58755  fi
58756
58757
58758  if test "x$path" != "x$new_path"; then
58759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58762  fi
58763
58764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58765
58766  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58767  has_colon=`$ECHO $path | $GREP ^.:`
58768  new_path="$path"
58769  if test "x$has_colon" = x; then
58770    # Not in mixed or Windows style, start by that.
58771    new_path=`cmd //c echo $path`
58772  fi
58773
58774
58775  input_path="$new_path"
58776  # Check if we need to convert this using DOS-style short mode. If the path
58777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58778  # take no chances and rewrite it.
58779  # Note: m4 eats our [], so we need to use [ and ] instead.
58780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58781  if test "x$has_forbidden_chars" != x; then
58782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58784  fi
58785
58786
58787  windows_path="$new_path"
58788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58789    unix_path=`$CYGPATH -u "$windows_path"`
58790    new_path="$unix_path"
58791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58793    new_path="$unix_path"
58794  fi
58795
58796  if test "x$path" != "x$new_path"; then
58797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58800  fi
58801
58802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58804
58805    else
58806      # We're on a unix platform. Hooray! :)
58807      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58808      has_space=`$ECHO "$path" | $GREP " "`
58809      if test "x$has_space" != x; then
58810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58813      fi
58814
58815      # Use eval to expand a potential ~
58816      eval path="$path"
58817      if test ! -f "$path" && test ! -d "$path"; then
58818        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58819      fi
58820
58821      if test -d "$path"; then
58822        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58823      else
58824        dir="`$DIRNAME "$path"`"
58825        base="`$BASENAME "$path"`"
58826        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58827      fi
58828    fi
58829  fi
58830
58831
58832  # Only process if variable expands to non-empty
58833
58834  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58836
58837  # Input might be given as Windows format, start by converting to
58838  # unix format.
58839  path="$POTENTIAL_FREETYPE_LIB_PATH"
58840  new_path=`$CYGPATH -u "$path"`
58841
58842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58845  # "foo.exe" is OK but "foo" is an error.
58846  #
58847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58848  # It is also a way to make sure we got the proper file name for the real test later on.
58849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58850  if test "x$test_shortpath" = x; then
58851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58853    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58854  fi
58855
58856  # Call helper function which possibly converts this using DOS-style short mode.
58857  # If so, the updated path is stored in $new_path.
58858
58859  input_path="$new_path"
58860  # Check if we need to convert this using DOS-style short mode. If the path
58861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58862  # take no chances and rewrite it.
58863  # Note: m4 eats our [], so we need to use [ and ] instead.
58864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58865  if test "x$has_forbidden_chars" != x; then
58866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58870      # Going to short mode and back again did indeed matter. Since short mode is
58871      # case insensitive, let's make it lowercase to improve readability.
58872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58873      # Now convert it back to Unix-style (cygpath)
58874      input_path=`$CYGPATH -u "$shortmode_path"`
58875      new_path="$input_path"
58876    fi
58877  fi
58878
58879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58880  if test "x$test_cygdrive_prefix" = x; then
58881    # As a simple fix, exclude /usr/bin since it's not a real path.
58882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58884      # a path prefixed by /cygdrive for fixpath to work.
58885      new_path="$CYGWIN_ROOT_PATH$input_path"
58886    fi
58887  fi
58888
58889
58890  if test "x$path" != "x$new_path"; then
58891    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58894  fi
58895
58896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58897
58898  path="$POTENTIAL_FREETYPE_LIB_PATH"
58899  has_colon=`$ECHO $path | $GREP ^.:`
58900  new_path="$path"
58901  if test "x$has_colon" = x; then
58902    # Not in mixed or Windows style, start by that.
58903    new_path=`cmd //c echo $path`
58904  fi
58905
58906
58907  input_path="$new_path"
58908  # Check if we need to convert this using DOS-style short mode. If the path
58909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58910  # take no chances and rewrite it.
58911  # Note: m4 eats our [], so we need to use [ and ] instead.
58912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58913  if test "x$has_forbidden_chars" != x; then
58914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58916  fi
58917
58918
58919  windows_path="$new_path"
58920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58921    unix_path=`$CYGPATH -u "$windows_path"`
58922    new_path="$unix_path"
58923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58925    new_path="$unix_path"
58926  fi
58927
58928  if test "x$path" != "x$new_path"; then
58929    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58932  fi
58933
58934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58936
58937    else
58938      # We're on a unix platform. Hooray! :)
58939      path="$POTENTIAL_FREETYPE_LIB_PATH"
58940      has_space=`$ECHO "$path" | $GREP " "`
58941      if test "x$has_space" != x; then
58942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58945      fi
58946
58947      # Use eval to expand a potential ~
58948      eval path="$path"
58949      if test ! -f "$path" && test ! -d "$path"; then
58950        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58951      fi
58952
58953      if test -d "$path"; then
58954        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58955      else
58956        dir="`$DIRNAME "$path"`"
58957        base="`$BASENAME "$path"`"
58958        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58959      fi
58960    fi
58961  fi
58962
58963
58964    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58966$as_echo_n "checking for freetype includes... " >&6; }
58967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58968$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58969    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58971$as_echo_n "checking for freetype libraries... " >&6; }
58972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58973$as_echo "$FREETYPE_LIB_PATH" >&6; }
58974  fi
58975
58976            else
58977
58978  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58979  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58980  METHOD="well-known location"
58981
58982  # Let's start with an optimistic view of the world :-)
58983  FOUND_FREETYPE=yes
58984
58985  # First look for the canonical freetype main include file ft2build.h.
58986  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58987    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58988    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58989    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58990      # Fail.
58991      FOUND_FREETYPE=no
58992    fi
58993  fi
58994
58995  if test "x$FOUND_FREETYPE" = xyes; then
58996    # Include file found, let's continue the sanity check.
58997    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58998$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58999
59000    # Reset to default value
59001    FREETYPE_BASE_NAME=freetype
59002    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59003    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59004      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59005          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59006        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59007        # for the .6 version explicitly.
59008        FREETYPE_BASE_NAME=freetype.6
59009        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59010        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59011$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59012      else
59013        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59014$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59015        FOUND_FREETYPE=no
59016      fi
59017    else
59018      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59019        # On Windows, we will need both .lib and .dll file.
59020        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59021          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59022$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59023          FOUND_FREETYPE=no
59024        fi
59025      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59026          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59027        # Found lib in isa dir, use that instead.
59028        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59029        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59030$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59031      fi
59032    fi
59033  fi
59034
59035  if test "x$FOUND_FREETYPE" = xyes; then
59036
59037  # Only process if variable expands to non-empty
59038
59039  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59041
59042  # Input might be given as Windows format, start by converting to
59043  # unix format.
59044  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59045  new_path=`$CYGPATH -u "$path"`
59046
59047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59050  # "foo.exe" is OK but "foo" is an error.
59051  #
59052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59053  # It is also a way to make sure we got the proper file name for the real test later on.
59054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59055  if test "x$test_shortpath" = x; then
59056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59058    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59059  fi
59060
59061  # Call helper function which possibly converts this using DOS-style short mode.
59062  # If so, the updated path is stored in $new_path.
59063
59064  input_path="$new_path"
59065  # Check if we need to convert this using DOS-style short mode. If the path
59066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59067  # take no chances and rewrite it.
59068  # Note: m4 eats our [], so we need to use [ and ] instead.
59069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59070  if test "x$has_forbidden_chars" != x; then
59071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59075      # Going to short mode and back again did indeed matter. Since short mode is
59076      # case insensitive, let's make it lowercase to improve readability.
59077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59078      # Now convert it back to Unix-style (cygpath)
59079      input_path=`$CYGPATH -u "$shortmode_path"`
59080      new_path="$input_path"
59081    fi
59082  fi
59083
59084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59085  if test "x$test_cygdrive_prefix" = x; then
59086    # As a simple fix, exclude /usr/bin since it's not a real path.
59087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59089      # a path prefixed by /cygdrive for fixpath to work.
59090      new_path="$CYGWIN_ROOT_PATH$input_path"
59091    fi
59092  fi
59093
59094
59095  if test "x$path" != "x$new_path"; then
59096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59099  fi
59100
59101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59102
59103  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59104  has_colon=`$ECHO $path | $GREP ^.:`
59105  new_path="$path"
59106  if test "x$has_colon" = x; then
59107    # Not in mixed or Windows style, start by that.
59108    new_path=`cmd //c echo $path`
59109  fi
59110
59111
59112  input_path="$new_path"
59113  # Check if we need to convert this using DOS-style short mode. If the path
59114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59115  # take no chances and rewrite it.
59116  # Note: m4 eats our [], so we need to use [ and ] instead.
59117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59118  if test "x$has_forbidden_chars" != x; then
59119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59121  fi
59122
59123
59124  windows_path="$new_path"
59125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59126    unix_path=`$CYGPATH -u "$windows_path"`
59127    new_path="$unix_path"
59128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59130    new_path="$unix_path"
59131  fi
59132
59133  if test "x$path" != "x$new_path"; then
59134    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59136$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59137  fi
59138
59139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59141
59142    else
59143      # We're on a unix platform. Hooray! :)
59144      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59145      has_space=`$ECHO "$path" | $GREP " "`
59146      if test "x$has_space" != x; then
59147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59150      fi
59151
59152      # Use eval to expand a potential ~
59153      eval path="$path"
59154      if test ! -f "$path" && test ! -d "$path"; then
59155        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59156      fi
59157
59158      if test -d "$path"; then
59159        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59160      else
59161        dir="`$DIRNAME "$path"`"
59162        base="`$BASENAME "$path"`"
59163        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59164      fi
59165    fi
59166  fi
59167
59168
59169  # Only process if variable expands to non-empty
59170
59171  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59173
59174  # Input might be given as Windows format, start by converting to
59175  # unix format.
59176  path="$POTENTIAL_FREETYPE_LIB_PATH"
59177  new_path=`$CYGPATH -u "$path"`
59178
59179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59182  # "foo.exe" is OK but "foo" is an error.
59183  #
59184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59185  # It is also a way to make sure we got the proper file name for the real test later on.
59186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59187  if test "x$test_shortpath" = x; then
59188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59190    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59191  fi
59192
59193  # Call helper function which possibly converts this using DOS-style short mode.
59194  # If so, the updated path is stored in $new_path.
59195
59196  input_path="$new_path"
59197  # Check if we need to convert this using DOS-style short mode. If the path
59198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59199  # take no chances and rewrite it.
59200  # Note: m4 eats our [], so we need to use [ and ] instead.
59201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59202  if test "x$has_forbidden_chars" != x; then
59203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59207      # Going to short mode and back again did indeed matter. Since short mode is
59208      # case insensitive, let's make it lowercase to improve readability.
59209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59210      # Now convert it back to Unix-style (cygpath)
59211      input_path=`$CYGPATH -u "$shortmode_path"`
59212      new_path="$input_path"
59213    fi
59214  fi
59215
59216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59217  if test "x$test_cygdrive_prefix" = x; then
59218    # As a simple fix, exclude /usr/bin since it's not a real path.
59219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59221      # a path prefixed by /cygdrive for fixpath to work.
59222      new_path="$CYGWIN_ROOT_PATH$input_path"
59223    fi
59224  fi
59225
59226
59227  if test "x$path" != "x$new_path"; then
59228    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59231  fi
59232
59233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59234
59235  path="$POTENTIAL_FREETYPE_LIB_PATH"
59236  has_colon=`$ECHO $path | $GREP ^.:`
59237  new_path="$path"
59238  if test "x$has_colon" = x; then
59239    # Not in mixed or Windows style, start by that.
59240    new_path=`cmd //c echo $path`
59241  fi
59242
59243
59244  input_path="$new_path"
59245  # Check if we need to convert this using DOS-style short mode. If the path
59246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59247  # take no chances and rewrite it.
59248  # Note: m4 eats our [], so we need to use [ and ] instead.
59249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59250  if test "x$has_forbidden_chars" != x; then
59251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59253  fi
59254
59255
59256  windows_path="$new_path"
59257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59258    unix_path=`$CYGPATH -u "$windows_path"`
59259    new_path="$unix_path"
59260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59262    new_path="$unix_path"
59263  fi
59264
59265  if test "x$path" != "x$new_path"; then
59266    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59269  fi
59270
59271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59273
59274    else
59275      # We're on a unix platform. Hooray! :)
59276      path="$POTENTIAL_FREETYPE_LIB_PATH"
59277      has_space=`$ECHO "$path" | $GREP " "`
59278      if test "x$has_space" != x; then
59279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59282      fi
59283
59284      # Use eval to expand a potential ~
59285      eval path="$path"
59286      if test ! -f "$path" && test ! -d "$path"; then
59287        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59288      fi
59289
59290      if test -d "$path"; then
59291        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59292      else
59293        dir="`$DIRNAME "$path"`"
59294        base="`$BASENAME "$path"`"
59295        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59296      fi
59297    fi
59298  fi
59299
59300
59301    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59303$as_echo_n "checking for freetype includes... " >&6; }
59304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59305$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59306    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59308$as_echo_n "checking for freetype libraries... " >&6; }
59309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59310$as_echo "$FREETYPE_LIB_PATH" >&6; }
59311  fi
59312
59313            fi
59314            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59315                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59316              # Source is available, as a last resort try to build freetype in default location
59317
59318  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59319  BUILD_FREETYPE=yes
59320
59321  # Check if the freetype sources are acessible..
59322  if ! test -d $FREETYPE_SRC_PATH; then
59323    { $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
59324$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59325    BUILD_FREETYPE=no
59326  fi
59327  # ..and contain a vc2010 project file
59328  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59329  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59330    { $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
59331$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59332    BUILD_FREETYPE=no
59333  fi
59334  # Now check if configure found a version of 'msbuild.exe'
59335  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59336    { $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
59337$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;}
59338    BUILD_FREETYPE=no
59339  fi
59340
59341  # Ready to go..
59342  if test "x$BUILD_FREETYPE" = xyes; then
59343    # msbuild requires trailing slashes for output directories
59344    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59345    freetype_lib_path_unix="$freetype_lib_path"
59346    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59347
59348  unix_path="$vcxproj_path"
59349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59350    windows_path=`$CYGPATH -m "$unix_path"`
59351    vcxproj_path="$windows_path"
59352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59353    windows_path=`cmd //c echo $unix_path`
59354    vcxproj_path="$windows_path"
59355  fi
59356
59357
59358  unix_path="$freetype_lib_path"
59359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59360    windows_path=`$CYGPATH -m "$unix_path"`
59361    freetype_lib_path="$windows_path"
59362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59363    windows_path=`cmd //c echo $unix_path`
59364    freetype_lib_path="$windows_path"
59365  fi
59366
59367
59368  unix_path="$freetype_obj_path"
59369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59370    windows_path=`$CYGPATH -m "$unix_path"`
59371    freetype_obj_path="$windows_path"
59372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59373    windows_path=`cmd //c echo $unix_path`
59374    freetype_obj_path="$windows_path"
59375  fi
59376
59377    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59378      freetype_platform=x64
59379    else
59380      freetype_platform=win32
59381    fi
59382
59383    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59384    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59385    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59386    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59387    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59388$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59389
59390    # First we try to build the freetype.dll
59391    $ECHO -e "@echo off\n"\
59392        "$MSBUILD $vcxproj_path "\
59393        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59394        "/p:Configuration=\"Release Multithreaded\" "\
59395        "/p:Platform=$freetype_platform "\
59396        "/p:ConfigurationType=DynamicLibrary "\
59397        "/p:TargetName=freetype "\
59398        "/p:OutDir=\"$freetype_lib_path\" "\
59399        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59400    cmd /c freetype.bat
59401
59402    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59403      # If that succeeds we also build freetype.lib
59404      $ECHO -e "@echo off\n"\
59405          "$MSBUILD $vcxproj_path "\
59406          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59407          "/p:Configuration=\"Release Multithreaded\" "\
59408          "/p:Platform=$freetype_platform "\
59409          "/p:ConfigurationType=StaticLibrary "\
59410          "/p:TargetName=freetype "\
59411          "/p:OutDir=\"$freetype_lib_path\" "\
59412          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59413      cmd /c freetype.bat
59414
59415      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59416        # Once we build both, lib and dll, set freetype lib and include path appropriately
59417        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59418        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59419        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59420$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59421      else
59422        BUILD_FREETYPE=no
59423      fi
59424    else
59425      BUILD_FREETYPE=no
59426    fi
59427  fi
59428
59429              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59430
59431  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59432  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59433  METHOD="well-known location"
59434
59435  # Let's start with an optimistic view of the world :-)
59436  FOUND_FREETYPE=yes
59437
59438  # First look for the canonical freetype main include file ft2build.h.
59439  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59440    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59441    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59442    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59443      # Fail.
59444      FOUND_FREETYPE=no
59445    fi
59446  fi
59447
59448  if test "x$FOUND_FREETYPE" = xyes; then
59449    # Include file found, let's continue the sanity check.
59450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59451$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59452
59453    # Reset to default value
59454    FREETYPE_BASE_NAME=freetype
59455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59457      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59459        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59460        # for the .6 version explicitly.
59461        FREETYPE_BASE_NAME=freetype.6
59462        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59463        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59464$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59465      else
59466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59468        FOUND_FREETYPE=no
59469      fi
59470    else
59471      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59472        # On Windows, we will need both .lib and .dll file.
59473        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59474          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59476          FOUND_FREETYPE=no
59477        fi
59478      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59480        # Found lib in isa dir, use that instead.
59481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59482        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59483$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59484      fi
59485    fi
59486  fi
59487
59488  if test "x$FOUND_FREETYPE" = xyes; then
59489
59490  # Only process if variable expands to non-empty
59491
59492  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59494
59495  # Input might be given as Windows format, start by converting to
59496  # unix format.
59497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59498  new_path=`$CYGPATH -u "$path"`
59499
59500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59503  # "foo.exe" is OK but "foo" is an error.
59504  #
59505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59506  # It is also a way to make sure we got the proper file name for the real test later on.
59507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59508  if test "x$test_shortpath" = x; then
59509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59512  fi
59513
59514  # Call helper function which possibly converts this using DOS-style short mode.
59515  # If so, the updated path is stored in $new_path.
59516
59517  input_path="$new_path"
59518  # Check if we need to convert this using DOS-style short mode. If the path
59519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59520  # take no chances and rewrite it.
59521  # Note: m4 eats our [], so we need to use [ and ] instead.
59522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59523  if test "x$has_forbidden_chars" != x; then
59524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59528      # Going to short mode and back again did indeed matter. Since short mode is
59529      # case insensitive, let's make it lowercase to improve readability.
59530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59531      # Now convert it back to Unix-style (cygpath)
59532      input_path=`$CYGPATH -u "$shortmode_path"`
59533      new_path="$input_path"
59534    fi
59535  fi
59536
59537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59538  if test "x$test_cygdrive_prefix" = x; then
59539    # As a simple fix, exclude /usr/bin since it's not a real path.
59540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59542      # a path prefixed by /cygdrive for fixpath to work.
59543      new_path="$CYGWIN_ROOT_PATH$input_path"
59544    fi
59545  fi
59546
59547
59548  if test "x$path" != "x$new_path"; then
59549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59552  fi
59553
59554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59555
59556  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59557  has_colon=`$ECHO $path | $GREP ^.:`
59558  new_path="$path"
59559  if test "x$has_colon" = x; then
59560    # Not in mixed or Windows style, start by that.
59561    new_path=`cmd //c echo $path`
59562  fi
59563
59564
59565  input_path="$new_path"
59566  # Check if we need to convert this using DOS-style short mode. If the path
59567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59568  # take no chances and rewrite it.
59569  # Note: m4 eats our [], so we need to use [ and ] instead.
59570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59571  if test "x$has_forbidden_chars" != x; then
59572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59574  fi
59575
59576
59577  windows_path="$new_path"
59578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59579    unix_path=`$CYGPATH -u "$windows_path"`
59580    new_path="$unix_path"
59581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59583    new_path="$unix_path"
59584  fi
59585
59586  if test "x$path" != "x$new_path"; then
59587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59590  fi
59591
59592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59594
59595    else
59596      # We're on a unix platform. Hooray! :)
59597      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59598      has_space=`$ECHO "$path" | $GREP " "`
59599      if test "x$has_space" != x; then
59600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59603      fi
59604
59605      # Use eval to expand a potential ~
59606      eval path="$path"
59607      if test ! -f "$path" && test ! -d "$path"; then
59608        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59609      fi
59610
59611      if test -d "$path"; then
59612        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59613      else
59614        dir="`$DIRNAME "$path"`"
59615        base="`$BASENAME "$path"`"
59616        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59617      fi
59618    fi
59619  fi
59620
59621
59622  # Only process if variable expands to non-empty
59623
59624  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59626
59627  # Input might be given as Windows format, start by converting to
59628  # unix format.
59629  path="$POTENTIAL_FREETYPE_LIB_PATH"
59630  new_path=`$CYGPATH -u "$path"`
59631
59632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59635  # "foo.exe" is OK but "foo" is an error.
59636  #
59637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59638  # It is also a way to make sure we got the proper file name for the real test later on.
59639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59640  if test "x$test_shortpath" = x; then
59641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59643    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59644  fi
59645
59646  # Call helper function which possibly converts this using DOS-style short mode.
59647  # If so, the updated path is stored in $new_path.
59648
59649  input_path="$new_path"
59650  # Check if we need to convert this using DOS-style short mode. If the path
59651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59652  # take no chances and rewrite it.
59653  # Note: m4 eats our [], so we need to use [ and ] instead.
59654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59655  if test "x$has_forbidden_chars" != x; then
59656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59660      # Going to short mode and back again did indeed matter. Since short mode is
59661      # case insensitive, let's make it lowercase to improve readability.
59662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59663      # Now convert it back to Unix-style (cygpath)
59664      input_path=`$CYGPATH -u "$shortmode_path"`
59665      new_path="$input_path"
59666    fi
59667  fi
59668
59669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59670  if test "x$test_cygdrive_prefix" = x; then
59671    # As a simple fix, exclude /usr/bin since it's not a real path.
59672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59674      # a path prefixed by /cygdrive for fixpath to work.
59675      new_path="$CYGWIN_ROOT_PATH$input_path"
59676    fi
59677  fi
59678
59679
59680  if test "x$path" != "x$new_path"; then
59681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59684  fi
59685
59686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59687
59688  path="$POTENTIAL_FREETYPE_LIB_PATH"
59689  has_colon=`$ECHO $path | $GREP ^.:`
59690  new_path="$path"
59691  if test "x$has_colon" = x; then
59692    # Not in mixed or Windows style, start by that.
59693    new_path=`cmd //c echo $path`
59694  fi
59695
59696
59697  input_path="$new_path"
59698  # Check if we need to convert this using DOS-style short mode. If the path
59699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59700  # take no chances and rewrite it.
59701  # Note: m4 eats our [], so we need to use [ and ] instead.
59702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59703  if test "x$has_forbidden_chars" != x; then
59704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59706  fi
59707
59708
59709  windows_path="$new_path"
59710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59711    unix_path=`$CYGPATH -u "$windows_path"`
59712    new_path="$unix_path"
59713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59715    new_path="$unix_path"
59716  fi
59717
59718  if test "x$path" != "x$new_path"; then
59719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59722  fi
59723
59724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59726
59727    else
59728      # We're on a unix platform. Hooray! :)
59729      path="$POTENTIAL_FREETYPE_LIB_PATH"
59730      has_space=`$ECHO "$path" | $GREP " "`
59731      if test "x$has_space" != x; then
59732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59735      fi
59736
59737      # Use eval to expand a potential ~
59738      eval path="$path"
59739      if test ! -f "$path" && test ! -d "$path"; then
59740        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59741      fi
59742
59743      if test -d "$path"; then
59744        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59745      else
59746        dir="`$DIRNAME "$path"`"
59747        base="`$BASENAME "$path"`"
59748        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59749      fi
59750    fi
59751  fi
59752
59753
59754    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59756$as_echo_n "checking for freetype includes... " >&6; }
59757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59758$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59759    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59761$as_echo_n "checking for freetype libraries... " >&6; }
59762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59763$as_echo "$FREETYPE_LIB_PATH" >&6; }
59764  fi
59765
59766              else
59767
59768  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59769  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59770  METHOD="well-known location"
59771
59772  # Let's start with an optimistic view of the world :-)
59773  FOUND_FREETYPE=yes
59774
59775  # First look for the canonical freetype main include file ft2build.h.
59776  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59777    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59778    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59779    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59780      # Fail.
59781      FOUND_FREETYPE=no
59782    fi
59783  fi
59784
59785  if test "x$FOUND_FREETYPE" = xyes; then
59786    # Include file found, let's continue the sanity check.
59787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59788$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59789
59790    # Reset to default value
59791    FREETYPE_BASE_NAME=freetype
59792    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59793    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59794      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59795          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59796        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59797        # for the .6 version explicitly.
59798        FREETYPE_BASE_NAME=freetype.6
59799        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59800        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59801$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59802      else
59803        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59804$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59805        FOUND_FREETYPE=no
59806      fi
59807    else
59808      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59809        # On Windows, we will need both .lib and .dll file.
59810        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59811          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59812$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59813          FOUND_FREETYPE=no
59814        fi
59815      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59816          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59817        # Found lib in isa dir, use that instead.
59818        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59819        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59820$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59821      fi
59822    fi
59823  fi
59824
59825  if test "x$FOUND_FREETYPE" = xyes; then
59826
59827  # Only process if variable expands to non-empty
59828
59829  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59831
59832  # Input might be given as Windows format, start by converting to
59833  # unix format.
59834  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59835  new_path=`$CYGPATH -u "$path"`
59836
59837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59840  # "foo.exe" is OK but "foo" is an error.
59841  #
59842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59843  # It is also a way to make sure we got the proper file name for the real test later on.
59844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59845  if test "x$test_shortpath" = x; then
59846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59847$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59848    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59849  fi
59850
59851  # Call helper function which possibly converts this using DOS-style short mode.
59852  # If so, the updated path is stored in $new_path.
59853
59854  input_path="$new_path"
59855  # Check if we need to convert this using DOS-style short mode. If the path
59856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59857  # take no chances and rewrite it.
59858  # Note: m4 eats our [], so we need to use [ and ] instead.
59859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59860  if test "x$has_forbidden_chars" != x; then
59861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59865      # Going to short mode and back again did indeed matter. Since short mode is
59866      # case insensitive, let's make it lowercase to improve readability.
59867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59868      # Now convert it back to Unix-style (cygpath)
59869      input_path=`$CYGPATH -u "$shortmode_path"`
59870      new_path="$input_path"
59871    fi
59872  fi
59873
59874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59875  if test "x$test_cygdrive_prefix" = x; then
59876    # As a simple fix, exclude /usr/bin since it's not a real path.
59877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59879      # a path prefixed by /cygdrive for fixpath to work.
59880      new_path="$CYGWIN_ROOT_PATH$input_path"
59881    fi
59882  fi
59883
59884
59885  if test "x$path" != "x$new_path"; then
59886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59889  fi
59890
59891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59892
59893  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59894  has_colon=`$ECHO $path | $GREP ^.:`
59895  new_path="$path"
59896  if test "x$has_colon" = x; then
59897    # Not in mixed or Windows style, start by that.
59898    new_path=`cmd //c echo $path`
59899  fi
59900
59901
59902  input_path="$new_path"
59903  # Check if we need to convert this using DOS-style short mode. If the path
59904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59905  # take no chances and rewrite it.
59906  # Note: m4 eats our [], so we need to use [ and ] instead.
59907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59908  if test "x$has_forbidden_chars" != x; then
59909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59911  fi
59912
59913
59914  windows_path="$new_path"
59915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59916    unix_path=`$CYGPATH -u "$windows_path"`
59917    new_path="$unix_path"
59918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59920    new_path="$unix_path"
59921  fi
59922
59923  if test "x$path" != "x$new_path"; then
59924    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59926$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59927  fi
59928
59929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59931
59932    else
59933      # We're on a unix platform. Hooray! :)
59934      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59935      has_space=`$ECHO "$path" | $GREP " "`
59936      if test "x$has_space" != x; then
59937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59940      fi
59941
59942      # Use eval to expand a potential ~
59943      eval path="$path"
59944      if test ! -f "$path" && test ! -d "$path"; then
59945        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59946      fi
59947
59948      if test -d "$path"; then
59949        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59950      else
59951        dir="`$DIRNAME "$path"`"
59952        base="`$BASENAME "$path"`"
59953        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59954      fi
59955    fi
59956  fi
59957
59958
59959  # Only process if variable expands to non-empty
59960
59961  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59963
59964  # Input might be given as Windows format, start by converting to
59965  # unix format.
59966  path="$POTENTIAL_FREETYPE_LIB_PATH"
59967  new_path=`$CYGPATH -u "$path"`
59968
59969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59972  # "foo.exe" is OK but "foo" is an error.
59973  #
59974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59975  # It is also a way to make sure we got the proper file name for the real test later on.
59976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59977  if test "x$test_shortpath" = x; then
59978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59981  fi
59982
59983  # Call helper function which possibly converts this using DOS-style short mode.
59984  # If so, the updated path is stored in $new_path.
59985
59986  input_path="$new_path"
59987  # Check if we need to convert this using DOS-style short mode. If the path
59988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59989  # take no chances and rewrite it.
59990  # Note: m4 eats our [], so we need to use [ and ] instead.
59991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59992  if test "x$has_forbidden_chars" != x; then
59993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59997      # Going to short mode and back again did indeed matter. Since short mode is
59998      # case insensitive, let's make it lowercase to improve readability.
59999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60000      # Now convert it back to Unix-style (cygpath)
60001      input_path=`$CYGPATH -u "$shortmode_path"`
60002      new_path="$input_path"
60003    fi
60004  fi
60005
60006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60007  if test "x$test_cygdrive_prefix" = x; then
60008    # As a simple fix, exclude /usr/bin since it's not a real path.
60009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60011      # a path prefixed by /cygdrive for fixpath to work.
60012      new_path="$CYGWIN_ROOT_PATH$input_path"
60013    fi
60014  fi
60015
60016
60017  if test "x$path" != "x$new_path"; then
60018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60021  fi
60022
60023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60024
60025  path="$POTENTIAL_FREETYPE_LIB_PATH"
60026  has_colon=`$ECHO $path | $GREP ^.:`
60027  new_path="$path"
60028  if test "x$has_colon" = x; then
60029    # Not in mixed or Windows style, start by that.
60030    new_path=`cmd //c echo $path`
60031  fi
60032
60033
60034  input_path="$new_path"
60035  # Check if we need to convert this using DOS-style short mode. If the path
60036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60037  # take no chances and rewrite it.
60038  # Note: m4 eats our [], so we need to use [ and ] instead.
60039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60040  if test "x$has_forbidden_chars" != x; then
60041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60043  fi
60044
60045
60046  windows_path="$new_path"
60047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60048    unix_path=`$CYGPATH -u "$windows_path"`
60049    new_path="$unix_path"
60050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60052    new_path="$unix_path"
60053  fi
60054
60055  if test "x$path" != "x$new_path"; then
60056    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60059  fi
60060
60061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60063
60064    else
60065      # We're on a unix platform. Hooray! :)
60066      path="$POTENTIAL_FREETYPE_LIB_PATH"
60067      has_space=`$ECHO "$path" | $GREP " "`
60068      if test "x$has_space" != x; then
60069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60072      fi
60073
60074      # Use eval to expand a potential ~
60075      eval path="$path"
60076      if test ! -f "$path" && test ! -d "$path"; then
60077        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60078      fi
60079
60080      if test -d "$path"; then
60081        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60082      else
60083        dir="`$DIRNAME "$path"`"
60084        base="`$BASENAME "$path"`"
60085        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60086      fi
60087    fi
60088  fi
60089
60090
60091    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60093$as_echo_n "checking for freetype includes... " >&6; }
60094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60095$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60096    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60098$as_echo_n "checking for freetype libraries... " >&6; }
60099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60100$as_echo "$FREETYPE_LIB_PATH" >&6; }
60101  fi
60102
60103              fi
60104            fi
60105          fi
60106        else
60107          FREETYPE_BASE_DIR="$SYSROOT/usr"
60108
60109  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60110  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60111  METHOD="well-known location"
60112
60113  # Let's start with an optimistic view of the world :-)
60114  FOUND_FREETYPE=yes
60115
60116  # First look for the canonical freetype main include file ft2build.h.
60117  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60118    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60119    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60120    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60121      # Fail.
60122      FOUND_FREETYPE=no
60123    fi
60124  fi
60125
60126  if test "x$FOUND_FREETYPE" = xyes; then
60127    # Include file found, let's continue the sanity check.
60128    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60129$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60130
60131    # Reset to default value
60132    FREETYPE_BASE_NAME=freetype
60133    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60134    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60135      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60136          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60137        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60138        # for the .6 version explicitly.
60139        FREETYPE_BASE_NAME=freetype.6
60140        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60141        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60142$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60143      else
60144        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60145$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60146        FOUND_FREETYPE=no
60147      fi
60148    else
60149      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60150        # On Windows, we will need both .lib and .dll file.
60151        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60152          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60153$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60154          FOUND_FREETYPE=no
60155        fi
60156      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60157          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60158        # Found lib in isa dir, use that instead.
60159        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60160        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60161$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60162      fi
60163    fi
60164  fi
60165
60166  if test "x$FOUND_FREETYPE" = xyes; then
60167
60168  # Only process if variable expands to non-empty
60169
60170  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60172
60173  # Input might be given as Windows format, start by converting to
60174  # unix format.
60175  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60176  new_path=`$CYGPATH -u "$path"`
60177
60178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60181  # "foo.exe" is OK but "foo" is an error.
60182  #
60183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60184  # It is also a way to make sure we got the proper file name for the real test later on.
60185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60186  if test "x$test_shortpath" = x; then
60187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60188$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60189    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60190  fi
60191
60192  # Call helper function which possibly converts this using DOS-style short mode.
60193  # If so, the updated path is stored in $new_path.
60194
60195  input_path="$new_path"
60196  # Check if we need to convert this using DOS-style short mode. If the path
60197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60198  # take no chances and rewrite it.
60199  # Note: m4 eats our [], so we need to use [ and ] instead.
60200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60201  if test "x$has_forbidden_chars" != x; then
60202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60206      # Going to short mode and back again did indeed matter. Since short mode is
60207      # case insensitive, let's make it lowercase to improve readability.
60208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60209      # Now convert it back to Unix-style (cygpath)
60210      input_path=`$CYGPATH -u "$shortmode_path"`
60211      new_path="$input_path"
60212    fi
60213  fi
60214
60215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60216  if test "x$test_cygdrive_prefix" = x; then
60217    # As a simple fix, exclude /usr/bin since it's not a real path.
60218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60220      # a path prefixed by /cygdrive for fixpath to work.
60221      new_path="$CYGWIN_ROOT_PATH$input_path"
60222    fi
60223  fi
60224
60225
60226  if test "x$path" != "x$new_path"; then
60227    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60230  fi
60231
60232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60233
60234  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60235  has_colon=`$ECHO $path | $GREP ^.:`
60236  new_path="$path"
60237  if test "x$has_colon" = x; then
60238    # Not in mixed or Windows style, start by that.
60239    new_path=`cmd //c echo $path`
60240  fi
60241
60242
60243  input_path="$new_path"
60244  # Check if we need to convert this using DOS-style short mode. If the path
60245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60246  # take no chances and rewrite it.
60247  # Note: m4 eats our [], so we need to use [ and ] instead.
60248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60249  if test "x$has_forbidden_chars" != x; then
60250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60252  fi
60253
60254
60255  windows_path="$new_path"
60256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60257    unix_path=`$CYGPATH -u "$windows_path"`
60258    new_path="$unix_path"
60259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60261    new_path="$unix_path"
60262  fi
60263
60264  if test "x$path" != "x$new_path"; then
60265    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60268  fi
60269
60270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60272
60273    else
60274      # We're on a unix platform. Hooray! :)
60275      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60276      has_space=`$ECHO "$path" | $GREP " "`
60277      if test "x$has_space" != x; then
60278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60281      fi
60282
60283      # Use eval to expand a potential ~
60284      eval path="$path"
60285      if test ! -f "$path" && test ! -d "$path"; then
60286        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60287      fi
60288
60289      if test -d "$path"; then
60290        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60291      else
60292        dir="`$DIRNAME "$path"`"
60293        base="`$BASENAME "$path"`"
60294        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60295      fi
60296    fi
60297  fi
60298
60299
60300  # Only process if variable expands to non-empty
60301
60302  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60304
60305  # Input might be given as Windows format, start by converting to
60306  # unix format.
60307  path="$POTENTIAL_FREETYPE_LIB_PATH"
60308  new_path=`$CYGPATH -u "$path"`
60309
60310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60313  # "foo.exe" is OK but "foo" is an error.
60314  #
60315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60316  # It is also a way to make sure we got the proper file name for the real test later on.
60317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60318  if test "x$test_shortpath" = x; then
60319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60321    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60322  fi
60323
60324  # Call helper function which possibly converts this using DOS-style short mode.
60325  # If so, the updated path is stored in $new_path.
60326
60327  input_path="$new_path"
60328  # Check if we need to convert this using DOS-style short mode. If the path
60329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60330  # take no chances and rewrite it.
60331  # Note: m4 eats our [], so we need to use [ and ] instead.
60332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60333  if test "x$has_forbidden_chars" != x; then
60334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60338      # Going to short mode and back again did indeed matter. Since short mode is
60339      # case insensitive, let's make it lowercase to improve readability.
60340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60341      # Now convert it back to Unix-style (cygpath)
60342      input_path=`$CYGPATH -u "$shortmode_path"`
60343      new_path="$input_path"
60344    fi
60345  fi
60346
60347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60348  if test "x$test_cygdrive_prefix" = x; then
60349    # As a simple fix, exclude /usr/bin since it's not a real path.
60350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60352      # a path prefixed by /cygdrive for fixpath to work.
60353      new_path="$CYGWIN_ROOT_PATH$input_path"
60354    fi
60355  fi
60356
60357
60358  if test "x$path" != "x$new_path"; then
60359    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60362  fi
60363
60364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60365
60366  path="$POTENTIAL_FREETYPE_LIB_PATH"
60367  has_colon=`$ECHO $path | $GREP ^.:`
60368  new_path="$path"
60369  if test "x$has_colon" = x; then
60370    # Not in mixed or Windows style, start by that.
60371    new_path=`cmd //c echo $path`
60372  fi
60373
60374
60375  input_path="$new_path"
60376  # Check if we need to convert this using DOS-style short mode. If the path
60377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60378  # take no chances and rewrite it.
60379  # Note: m4 eats our [], so we need to use [ and ] instead.
60380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60381  if test "x$has_forbidden_chars" != x; then
60382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60384  fi
60385
60386
60387  windows_path="$new_path"
60388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60389    unix_path=`$CYGPATH -u "$windows_path"`
60390    new_path="$unix_path"
60391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60393    new_path="$unix_path"
60394  fi
60395
60396  if test "x$path" != "x$new_path"; then
60397    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60400  fi
60401
60402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60404
60405    else
60406      # We're on a unix platform. Hooray! :)
60407      path="$POTENTIAL_FREETYPE_LIB_PATH"
60408      has_space=`$ECHO "$path" | $GREP " "`
60409      if test "x$has_space" != x; then
60410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60413      fi
60414
60415      # Use eval to expand a potential ~
60416      eval path="$path"
60417      if test ! -f "$path" && test ! -d "$path"; then
60418        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60419      fi
60420
60421      if test -d "$path"; then
60422        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60423      else
60424        dir="`$DIRNAME "$path"`"
60425        base="`$BASENAME "$path"`"
60426        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60427      fi
60428    fi
60429  fi
60430
60431
60432    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60434$as_echo_n "checking for freetype includes... " >&6; }
60435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60436$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60437    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60439$as_echo_n "checking for freetype libraries... " >&6; }
60440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60441$as_echo "$FREETYPE_LIB_PATH" >&6; }
60442  fi
60443
60444
60445          if test "x$FOUND_FREETYPE" != xyes; then
60446            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60447
60448  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60449  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60450  METHOD="well-known location"
60451
60452  # Let's start with an optimistic view of the world :-)
60453  FOUND_FREETYPE=yes
60454
60455  # First look for the canonical freetype main include file ft2build.h.
60456  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60457    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60458    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60459    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60460      # Fail.
60461      FOUND_FREETYPE=no
60462    fi
60463  fi
60464
60465  if test "x$FOUND_FREETYPE" = xyes; then
60466    # Include file found, let's continue the sanity check.
60467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60468$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60469
60470    # Reset to default value
60471    FREETYPE_BASE_NAME=freetype
60472    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60473    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60474      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60475          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60476        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60477        # for the .6 version explicitly.
60478        FREETYPE_BASE_NAME=freetype.6
60479        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60480        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60481$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60482      else
60483        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60484$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60485        FOUND_FREETYPE=no
60486      fi
60487    else
60488      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60489        # On Windows, we will need both .lib and .dll file.
60490        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60491          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60493          FOUND_FREETYPE=no
60494        fi
60495      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60496          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60497        # Found lib in isa dir, use that instead.
60498        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60499        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60500$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60501      fi
60502    fi
60503  fi
60504
60505  if test "x$FOUND_FREETYPE" = xyes; then
60506
60507  # Only process if variable expands to non-empty
60508
60509  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60511
60512  # Input might be given as Windows format, start by converting to
60513  # unix format.
60514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60515  new_path=`$CYGPATH -u "$path"`
60516
60517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60520  # "foo.exe" is OK but "foo" is an error.
60521  #
60522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60523  # It is also a way to make sure we got the proper file name for the real test later on.
60524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60525  if test "x$test_shortpath" = x; then
60526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60529  fi
60530
60531  # Call helper function which possibly converts this using DOS-style short mode.
60532  # If so, the updated path is stored in $new_path.
60533
60534  input_path="$new_path"
60535  # Check if we need to convert this using DOS-style short mode. If the path
60536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60537  # take no chances and rewrite it.
60538  # Note: m4 eats our [], so we need to use [ and ] instead.
60539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60540  if test "x$has_forbidden_chars" != x; then
60541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60545      # Going to short mode and back again did indeed matter. Since short mode is
60546      # case insensitive, let's make it lowercase to improve readability.
60547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60548      # Now convert it back to Unix-style (cygpath)
60549      input_path=`$CYGPATH -u "$shortmode_path"`
60550      new_path="$input_path"
60551    fi
60552  fi
60553
60554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60555  if test "x$test_cygdrive_prefix" = x; then
60556    # As a simple fix, exclude /usr/bin since it's not a real path.
60557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60559      # a path prefixed by /cygdrive for fixpath to work.
60560      new_path="$CYGWIN_ROOT_PATH$input_path"
60561    fi
60562  fi
60563
60564
60565  if test "x$path" != "x$new_path"; then
60566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60569  fi
60570
60571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60572
60573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60574  has_colon=`$ECHO $path | $GREP ^.:`
60575  new_path="$path"
60576  if test "x$has_colon" = x; then
60577    # Not in mixed or Windows style, start by that.
60578    new_path=`cmd //c echo $path`
60579  fi
60580
60581
60582  input_path="$new_path"
60583  # Check if we need to convert this using DOS-style short mode. If the path
60584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60585  # take no chances and rewrite it.
60586  # Note: m4 eats our [], so we need to use [ and ] instead.
60587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60588  if test "x$has_forbidden_chars" != x; then
60589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60591  fi
60592
60593
60594  windows_path="$new_path"
60595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60596    unix_path=`$CYGPATH -u "$windows_path"`
60597    new_path="$unix_path"
60598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60600    new_path="$unix_path"
60601  fi
60602
60603  if test "x$path" != "x$new_path"; then
60604    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60607  fi
60608
60609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60611
60612    else
60613      # We're on a unix platform. Hooray! :)
60614      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60615      has_space=`$ECHO "$path" | $GREP " "`
60616      if test "x$has_space" != x; then
60617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60620      fi
60621
60622      # Use eval to expand a potential ~
60623      eval path="$path"
60624      if test ! -f "$path" && test ! -d "$path"; then
60625        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60626      fi
60627
60628      if test -d "$path"; then
60629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60630      else
60631        dir="`$DIRNAME "$path"`"
60632        base="`$BASENAME "$path"`"
60633        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60634      fi
60635    fi
60636  fi
60637
60638
60639  # Only process if variable expands to non-empty
60640
60641  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60643
60644  # Input might be given as Windows format, start by converting to
60645  # unix format.
60646  path="$POTENTIAL_FREETYPE_LIB_PATH"
60647  new_path=`$CYGPATH -u "$path"`
60648
60649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60652  # "foo.exe" is OK but "foo" is an error.
60653  #
60654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60655  # It is also a way to make sure we got the proper file name for the real test later on.
60656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60657  if test "x$test_shortpath" = x; then
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60660    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60661  fi
60662
60663  # Call helper function which possibly converts this using DOS-style short mode.
60664  # If so, the updated path is stored in $new_path.
60665
60666  input_path="$new_path"
60667  # Check if we need to convert this using DOS-style short mode. If the path
60668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60669  # take no chances and rewrite it.
60670  # Note: m4 eats our [], so we need to use [ and ] instead.
60671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60672  if test "x$has_forbidden_chars" != x; then
60673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60677      # Going to short mode and back again did indeed matter. Since short mode is
60678      # case insensitive, let's make it lowercase to improve readability.
60679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60680      # Now convert it back to Unix-style (cygpath)
60681      input_path=`$CYGPATH -u "$shortmode_path"`
60682      new_path="$input_path"
60683    fi
60684  fi
60685
60686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60687  if test "x$test_cygdrive_prefix" = x; then
60688    # As a simple fix, exclude /usr/bin since it's not a real path.
60689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60691      # a path prefixed by /cygdrive for fixpath to work.
60692      new_path="$CYGWIN_ROOT_PATH$input_path"
60693    fi
60694  fi
60695
60696
60697  if test "x$path" != "x$new_path"; then
60698    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60701  fi
60702
60703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60704
60705  path="$POTENTIAL_FREETYPE_LIB_PATH"
60706  has_colon=`$ECHO $path | $GREP ^.:`
60707  new_path="$path"
60708  if test "x$has_colon" = x; then
60709    # Not in mixed or Windows style, start by that.
60710    new_path=`cmd //c echo $path`
60711  fi
60712
60713
60714  input_path="$new_path"
60715  # Check if we need to convert this using DOS-style short mode. If the path
60716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60717  # take no chances and rewrite it.
60718  # Note: m4 eats our [], so we need to use [ and ] instead.
60719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60720  if test "x$has_forbidden_chars" != x; then
60721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60723  fi
60724
60725
60726  windows_path="$new_path"
60727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60728    unix_path=`$CYGPATH -u "$windows_path"`
60729    new_path="$unix_path"
60730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60732    new_path="$unix_path"
60733  fi
60734
60735  if test "x$path" != "x$new_path"; then
60736    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60738$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60739  fi
60740
60741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60743
60744    else
60745      # We're on a unix platform. Hooray! :)
60746      path="$POTENTIAL_FREETYPE_LIB_PATH"
60747      has_space=`$ECHO "$path" | $GREP " "`
60748      if test "x$has_space" != x; then
60749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60752      fi
60753
60754      # Use eval to expand a potential ~
60755      eval path="$path"
60756      if test ! -f "$path" && test ! -d "$path"; then
60757        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60758      fi
60759
60760      if test -d "$path"; then
60761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60762      else
60763        dir="`$DIRNAME "$path"`"
60764        base="`$BASENAME "$path"`"
60765        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60766      fi
60767    fi
60768  fi
60769
60770
60771    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60773$as_echo_n "checking for freetype includes... " >&6; }
60774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60775$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60776    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60778$as_echo_n "checking for freetype libraries... " >&6; }
60779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60780$as_echo "$FREETYPE_LIB_PATH" >&6; }
60781  fi
60782
60783          fi
60784          if test "x$FOUND_FREETYPE" != xyes; then
60785            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60786
60787  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60788  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60789  METHOD="well-known location"
60790
60791  # Let's start with an optimistic view of the world :-)
60792  FOUND_FREETYPE=yes
60793
60794  # First look for the canonical freetype main include file ft2build.h.
60795  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60796    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60797    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60798    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60799      # Fail.
60800      FOUND_FREETYPE=no
60801    fi
60802  fi
60803
60804  if test "x$FOUND_FREETYPE" = xyes; then
60805    # Include file found, let's continue the sanity check.
60806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60807$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60808
60809    # Reset to default value
60810    FREETYPE_BASE_NAME=freetype
60811    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60812    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60813      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60815        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60816        # for the .6 version explicitly.
60817        FREETYPE_BASE_NAME=freetype.6
60818        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60819        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60820$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60821      else
60822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60823$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60824        FOUND_FREETYPE=no
60825      fi
60826    else
60827      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60828        # On Windows, we will need both .lib and .dll file.
60829        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60830          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60831$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60832          FOUND_FREETYPE=no
60833        fi
60834      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60835          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60836        # Found lib in isa dir, use that instead.
60837        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60838        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60839$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60840      fi
60841    fi
60842  fi
60843
60844  if test "x$FOUND_FREETYPE" = xyes; then
60845
60846  # Only process if variable expands to non-empty
60847
60848  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60850
60851  # Input might be given as Windows format, start by converting to
60852  # unix format.
60853  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60854  new_path=`$CYGPATH -u "$path"`
60855
60856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60859  # "foo.exe" is OK but "foo" is an error.
60860  #
60861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60862  # It is also a way to make sure we got the proper file name for the real test later on.
60863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60864  if test "x$test_shortpath" = x; then
60865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60868  fi
60869
60870  # Call helper function which possibly converts this using DOS-style short mode.
60871  # If so, the updated path is stored in $new_path.
60872
60873  input_path="$new_path"
60874  # Check if we need to convert this using DOS-style short mode. If the path
60875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60876  # take no chances and rewrite it.
60877  # Note: m4 eats our [], so we need to use [ and ] instead.
60878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60879  if test "x$has_forbidden_chars" != x; then
60880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60884      # Going to short mode and back again did indeed matter. Since short mode is
60885      # case insensitive, let's make it lowercase to improve readability.
60886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60887      # Now convert it back to Unix-style (cygpath)
60888      input_path=`$CYGPATH -u "$shortmode_path"`
60889      new_path="$input_path"
60890    fi
60891  fi
60892
60893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60894  if test "x$test_cygdrive_prefix" = x; then
60895    # As a simple fix, exclude /usr/bin since it's not a real path.
60896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60898      # a path prefixed by /cygdrive for fixpath to work.
60899      new_path="$CYGWIN_ROOT_PATH$input_path"
60900    fi
60901  fi
60902
60903
60904  if test "x$path" != "x$new_path"; then
60905    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60908  fi
60909
60910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60911
60912  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60913  has_colon=`$ECHO $path | $GREP ^.:`
60914  new_path="$path"
60915  if test "x$has_colon" = x; then
60916    # Not in mixed or Windows style, start by that.
60917    new_path=`cmd //c echo $path`
60918  fi
60919
60920
60921  input_path="$new_path"
60922  # Check if we need to convert this using DOS-style short mode. If the path
60923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60924  # take no chances and rewrite it.
60925  # Note: m4 eats our [], so we need to use [ and ] instead.
60926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60927  if test "x$has_forbidden_chars" != x; then
60928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60930  fi
60931
60932
60933  windows_path="$new_path"
60934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60935    unix_path=`$CYGPATH -u "$windows_path"`
60936    new_path="$unix_path"
60937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60939    new_path="$unix_path"
60940  fi
60941
60942  if test "x$path" != "x$new_path"; then
60943    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60946  fi
60947
60948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60950
60951    else
60952      # We're on a unix platform. Hooray! :)
60953      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60954      has_space=`$ECHO "$path" | $GREP " "`
60955      if test "x$has_space" != x; then
60956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60959      fi
60960
60961      # Use eval to expand a potential ~
60962      eval path="$path"
60963      if test ! -f "$path" && test ! -d "$path"; then
60964        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60965      fi
60966
60967      if test -d "$path"; then
60968        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60969      else
60970        dir="`$DIRNAME "$path"`"
60971        base="`$BASENAME "$path"`"
60972        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60973      fi
60974    fi
60975  fi
60976
60977
60978  # Only process if variable expands to non-empty
60979
60980  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60982
60983  # Input might be given as Windows format, start by converting to
60984  # unix format.
60985  path="$POTENTIAL_FREETYPE_LIB_PATH"
60986  new_path=`$CYGPATH -u "$path"`
60987
60988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60991  # "foo.exe" is OK but "foo" is an error.
60992  #
60993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60994  # It is also a way to make sure we got the proper file name for the real test later on.
60995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60996  if test "x$test_shortpath" = x; then
60997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60998$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60999    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61000  fi
61001
61002  # Call helper function which possibly converts this using DOS-style short mode.
61003  # If so, the updated path is stored in $new_path.
61004
61005  input_path="$new_path"
61006  # Check if we need to convert this using DOS-style short mode. If the path
61007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61008  # take no chances and rewrite it.
61009  # Note: m4 eats our [], so we need to use [ and ] instead.
61010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61011  if test "x$has_forbidden_chars" != x; then
61012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61016      # Going to short mode and back again did indeed matter. Since short mode is
61017      # case insensitive, let's make it lowercase to improve readability.
61018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61019      # Now convert it back to Unix-style (cygpath)
61020      input_path=`$CYGPATH -u "$shortmode_path"`
61021      new_path="$input_path"
61022    fi
61023  fi
61024
61025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61026  if test "x$test_cygdrive_prefix" = x; then
61027    # As a simple fix, exclude /usr/bin since it's not a real path.
61028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61030      # a path prefixed by /cygdrive for fixpath to work.
61031      new_path="$CYGWIN_ROOT_PATH$input_path"
61032    fi
61033  fi
61034
61035
61036  if test "x$path" != "x$new_path"; then
61037    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61040  fi
61041
61042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61043
61044  path="$POTENTIAL_FREETYPE_LIB_PATH"
61045  has_colon=`$ECHO $path | $GREP ^.:`
61046  new_path="$path"
61047  if test "x$has_colon" = x; then
61048    # Not in mixed or Windows style, start by that.
61049    new_path=`cmd //c echo $path`
61050  fi
61051
61052
61053  input_path="$new_path"
61054  # Check if we need to convert this using DOS-style short mode. If the path
61055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61056  # take no chances and rewrite it.
61057  # Note: m4 eats our [], so we need to use [ and ] instead.
61058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61059  if test "x$has_forbidden_chars" != x; then
61060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61062  fi
61063
61064
61065  windows_path="$new_path"
61066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61067    unix_path=`$CYGPATH -u "$windows_path"`
61068    new_path="$unix_path"
61069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61071    new_path="$unix_path"
61072  fi
61073
61074  if test "x$path" != "x$new_path"; then
61075    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61077$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61078  fi
61079
61080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61082
61083    else
61084      # We're on a unix platform. Hooray! :)
61085      path="$POTENTIAL_FREETYPE_LIB_PATH"
61086      has_space=`$ECHO "$path" | $GREP " "`
61087      if test "x$has_space" != x; then
61088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61089$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61091      fi
61092
61093      # Use eval to expand a potential ~
61094      eval path="$path"
61095      if test ! -f "$path" && test ! -d "$path"; then
61096        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61097      fi
61098
61099      if test -d "$path"; then
61100        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61101      else
61102        dir="`$DIRNAME "$path"`"
61103        base="`$BASENAME "$path"`"
61104        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61105      fi
61106    fi
61107  fi
61108
61109
61110    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61112$as_echo_n "checking for freetype includes... " >&6; }
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61114$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61115    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61117$as_echo_n "checking for freetype libraries... " >&6; }
61118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61119$as_echo "$FREETYPE_LIB_PATH" >&6; }
61120  fi
61121
61122          fi
61123
61124          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61125            if test "x$FOUND_FREETYPE" != xyes; then
61126              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61127              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61128
61129  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61130  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61131  METHOD="well-known location"
61132
61133  # Let's start with an optimistic view of the world :-)
61134  FOUND_FREETYPE=yes
61135
61136  # First look for the canonical freetype main include file ft2build.h.
61137  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61138    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61139    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61140    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61141      # Fail.
61142      FOUND_FREETYPE=no
61143    fi
61144  fi
61145
61146  if test "x$FOUND_FREETYPE" = xyes; then
61147    # Include file found, let's continue the sanity check.
61148    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61149$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61150
61151    # Reset to default value
61152    FREETYPE_BASE_NAME=freetype
61153    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61154    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61155      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61157        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61158        # for the .6 version explicitly.
61159        FREETYPE_BASE_NAME=freetype.6
61160        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61161        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61162$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61163      else
61164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61166        FOUND_FREETYPE=no
61167      fi
61168    else
61169      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61170        # On Windows, we will need both .lib and .dll file.
61171        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61172          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61173$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61174          FOUND_FREETYPE=no
61175        fi
61176      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61177          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61178        # Found lib in isa dir, use that instead.
61179        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61180        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61181$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61182      fi
61183    fi
61184  fi
61185
61186  if test "x$FOUND_FREETYPE" = xyes; then
61187
61188  # Only process if variable expands to non-empty
61189
61190  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61192
61193  # Input might be given as Windows format, start by converting to
61194  # unix format.
61195  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61196  new_path=`$CYGPATH -u "$path"`
61197
61198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61201  # "foo.exe" is OK but "foo" is an error.
61202  #
61203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61204  # It is also a way to make sure we got the proper file name for the real test later on.
61205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61206  if test "x$test_shortpath" = x; then
61207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61209    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61210  fi
61211
61212  # Call helper function which possibly converts this using DOS-style short mode.
61213  # If so, the updated path is stored in $new_path.
61214
61215  input_path="$new_path"
61216  # Check if we need to convert this using DOS-style short mode. If the path
61217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61218  # take no chances and rewrite it.
61219  # Note: m4 eats our [], so we need to use [ and ] instead.
61220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61221  if test "x$has_forbidden_chars" != x; then
61222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61226      # Going to short mode and back again did indeed matter. Since short mode is
61227      # case insensitive, let's make it lowercase to improve readability.
61228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61229      # Now convert it back to Unix-style (cygpath)
61230      input_path=`$CYGPATH -u "$shortmode_path"`
61231      new_path="$input_path"
61232    fi
61233  fi
61234
61235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61236  if test "x$test_cygdrive_prefix" = x; then
61237    # As a simple fix, exclude /usr/bin since it's not a real path.
61238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61240      # a path prefixed by /cygdrive for fixpath to work.
61241      new_path="$CYGWIN_ROOT_PATH$input_path"
61242    fi
61243  fi
61244
61245
61246  if test "x$path" != "x$new_path"; then
61247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61250  fi
61251
61252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61253
61254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61255  has_colon=`$ECHO $path | $GREP ^.:`
61256  new_path="$path"
61257  if test "x$has_colon" = x; then
61258    # Not in mixed or Windows style, start by that.
61259    new_path=`cmd //c echo $path`
61260  fi
61261
61262
61263  input_path="$new_path"
61264  # Check if we need to convert this using DOS-style short mode. If the path
61265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61266  # take no chances and rewrite it.
61267  # Note: m4 eats our [], so we need to use [ and ] instead.
61268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61269  if test "x$has_forbidden_chars" != x; then
61270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61272  fi
61273
61274
61275  windows_path="$new_path"
61276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61277    unix_path=`$CYGPATH -u "$windows_path"`
61278    new_path="$unix_path"
61279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61281    new_path="$unix_path"
61282  fi
61283
61284  if test "x$path" != "x$new_path"; then
61285    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61288  fi
61289
61290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61292
61293    else
61294      # We're on a unix platform. Hooray! :)
61295      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61296      has_space=`$ECHO "$path" | $GREP " "`
61297      if test "x$has_space" != x; then
61298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61301      fi
61302
61303      # Use eval to expand a potential ~
61304      eval path="$path"
61305      if test ! -f "$path" && test ! -d "$path"; then
61306        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61307      fi
61308
61309      if test -d "$path"; then
61310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61311      else
61312        dir="`$DIRNAME "$path"`"
61313        base="`$BASENAME "$path"`"
61314        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61315      fi
61316    fi
61317  fi
61318
61319
61320  # Only process if variable expands to non-empty
61321
61322  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61324
61325  # Input might be given as Windows format, start by converting to
61326  # unix format.
61327  path="$POTENTIAL_FREETYPE_LIB_PATH"
61328  new_path=`$CYGPATH -u "$path"`
61329
61330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61333  # "foo.exe" is OK but "foo" is an error.
61334  #
61335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61336  # It is also a way to make sure we got the proper file name for the real test later on.
61337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61338  if test "x$test_shortpath" = x; then
61339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61342  fi
61343
61344  # Call helper function which possibly converts this using DOS-style short mode.
61345  # If so, the updated path is stored in $new_path.
61346
61347  input_path="$new_path"
61348  # Check if we need to convert this using DOS-style short mode. If the path
61349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61350  # take no chances and rewrite it.
61351  # Note: m4 eats our [], so we need to use [ and ] instead.
61352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61353  if test "x$has_forbidden_chars" != x; then
61354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61358      # Going to short mode and back again did indeed matter. Since short mode is
61359      # case insensitive, let's make it lowercase to improve readability.
61360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61361      # Now convert it back to Unix-style (cygpath)
61362      input_path=`$CYGPATH -u "$shortmode_path"`
61363      new_path="$input_path"
61364    fi
61365  fi
61366
61367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61368  if test "x$test_cygdrive_prefix" = x; then
61369    # As a simple fix, exclude /usr/bin since it's not a real path.
61370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61372      # a path prefixed by /cygdrive for fixpath to work.
61373      new_path="$CYGWIN_ROOT_PATH$input_path"
61374    fi
61375  fi
61376
61377
61378  if test "x$path" != "x$new_path"; then
61379    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61382  fi
61383
61384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61385
61386  path="$POTENTIAL_FREETYPE_LIB_PATH"
61387  has_colon=`$ECHO $path | $GREP ^.:`
61388  new_path="$path"
61389  if test "x$has_colon" = x; then
61390    # Not in mixed or Windows style, start by that.
61391    new_path=`cmd //c echo $path`
61392  fi
61393
61394
61395  input_path="$new_path"
61396  # Check if we need to convert this using DOS-style short mode. If the path
61397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61398  # take no chances and rewrite it.
61399  # Note: m4 eats our [], so we need to use [ and ] instead.
61400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61401  if test "x$has_forbidden_chars" != x; then
61402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61404  fi
61405
61406
61407  windows_path="$new_path"
61408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61409    unix_path=`$CYGPATH -u "$windows_path"`
61410    new_path="$unix_path"
61411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61413    new_path="$unix_path"
61414  fi
61415
61416  if test "x$path" != "x$new_path"; then
61417    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61420  fi
61421
61422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61424
61425    else
61426      # We're on a unix platform. Hooray! :)
61427      path="$POTENTIAL_FREETYPE_LIB_PATH"
61428      has_space=`$ECHO "$path" | $GREP " "`
61429      if test "x$has_space" != x; then
61430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61433      fi
61434
61435      # Use eval to expand a potential ~
61436      eval path="$path"
61437      if test ! -f "$path" && test ! -d "$path"; then
61438        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61439      fi
61440
61441      if test -d "$path"; then
61442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61443      else
61444        dir="`$DIRNAME "$path"`"
61445        base="`$BASENAME "$path"`"
61446        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61447      fi
61448    fi
61449  fi
61450
61451
61452    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61454$as_echo_n "checking for freetype includes... " >&6; }
61455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61456$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61457    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61459$as_echo_n "checking for freetype libraries... " >&6; }
61460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61461$as_echo "$FREETYPE_LIB_PATH" >&6; }
61462  fi
61463
61464            fi
61465          fi
61466
61467          if test "x$FOUND_FREETYPE" != xyes; then
61468            FREETYPE_BASE_DIR="$SYSROOT/usr"
61469            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61470
61471  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61472  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61473  METHOD="well-known location"
61474
61475  # Let's start with an optimistic view of the world :-)
61476  FOUND_FREETYPE=yes
61477
61478  # First look for the canonical freetype main include file ft2build.h.
61479  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61480    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61481    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61482    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61483      # Fail.
61484      FOUND_FREETYPE=no
61485    fi
61486  fi
61487
61488  if test "x$FOUND_FREETYPE" = xyes; then
61489    # Include file found, let's continue the sanity check.
61490    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61491$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61492
61493    # Reset to default value
61494    FREETYPE_BASE_NAME=freetype
61495    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61496    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61497      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61498          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61499        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61500        # for the .6 version explicitly.
61501        FREETYPE_BASE_NAME=freetype.6
61502        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61503        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61504$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61505      else
61506        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61507$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61508        FOUND_FREETYPE=no
61509      fi
61510    else
61511      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61512        # On Windows, we will need both .lib and .dll file.
61513        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61514          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61516          FOUND_FREETYPE=no
61517        fi
61518      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61520        # Found lib in isa dir, use that instead.
61521        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61522        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61523$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61524      fi
61525    fi
61526  fi
61527
61528  if test "x$FOUND_FREETYPE" = xyes; then
61529
61530  # Only process if variable expands to non-empty
61531
61532  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61534
61535  # Input might be given as Windows format, start by converting to
61536  # unix format.
61537  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61538  new_path=`$CYGPATH -u "$path"`
61539
61540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61543  # "foo.exe" is OK but "foo" is an error.
61544  #
61545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61546  # It is also a way to make sure we got the proper file name for the real test later on.
61547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61548  if test "x$test_shortpath" = x; then
61549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61551    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61552  fi
61553
61554  # Call helper function which possibly converts this using DOS-style short mode.
61555  # If so, the updated path is stored in $new_path.
61556
61557  input_path="$new_path"
61558  # Check if we need to convert this using DOS-style short mode. If the path
61559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61560  # take no chances and rewrite it.
61561  # Note: m4 eats our [], so we need to use [ and ] instead.
61562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61563  if test "x$has_forbidden_chars" != x; then
61564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61568      # Going to short mode and back again did indeed matter. Since short mode is
61569      # case insensitive, let's make it lowercase to improve readability.
61570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61571      # Now convert it back to Unix-style (cygpath)
61572      input_path=`$CYGPATH -u "$shortmode_path"`
61573      new_path="$input_path"
61574    fi
61575  fi
61576
61577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61578  if test "x$test_cygdrive_prefix" = x; then
61579    # As a simple fix, exclude /usr/bin since it's not a real path.
61580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61582      # a path prefixed by /cygdrive for fixpath to work.
61583      new_path="$CYGWIN_ROOT_PATH$input_path"
61584    fi
61585  fi
61586
61587
61588  if test "x$path" != "x$new_path"; then
61589    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61592  fi
61593
61594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61595
61596  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61597  has_colon=`$ECHO $path | $GREP ^.:`
61598  new_path="$path"
61599  if test "x$has_colon" = x; then
61600    # Not in mixed or Windows style, start by that.
61601    new_path=`cmd //c echo $path`
61602  fi
61603
61604
61605  input_path="$new_path"
61606  # Check if we need to convert this using DOS-style short mode. If the path
61607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61608  # take no chances and rewrite it.
61609  # Note: m4 eats our [], so we need to use [ and ] instead.
61610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61611  if test "x$has_forbidden_chars" != x; then
61612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61614  fi
61615
61616
61617  windows_path="$new_path"
61618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61619    unix_path=`$CYGPATH -u "$windows_path"`
61620    new_path="$unix_path"
61621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61623    new_path="$unix_path"
61624  fi
61625
61626  if test "x$path" != "x$new_path"; then
61627    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61630  fi
61631
61632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61634
61635    else
61636      # We're on a unix platform. Hooray! :)
61637      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61638      has_space=`$ECHO "$path" | $GREP " "`
61639      if test "x$has_space" != x; then
61640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61643      fi
61644
61645      # Use eval to expand a potential ~
61646      eval path="$path"
61647      if test ! -f "$path" && test ! -d "$path"; then
61648        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61649      fi
61650
61651      if test -d "$path"; then
61652        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61653      else
61654        dir="`$DIRNAME "$path"`"
61655        base="`$BASENAME "$path"`"
61656        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61657      fi
61658    fi
61659  fi
61660
61661
61662  # Only process if variable expands to non-empty
61663
61664  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61666
61667  # Input might be given as Windows format, start by converting to
61668  # unix format.
61669  path="$POTENTIAL_FREETYPE_LIB_PATH"
61670  new_path=`$CYGPATH -u "$path"`
61671
61672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61675  # "foo.exe" is OK but "foo" is an error.
61676  #
61677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61678  # It is also a way to make sure we got the proper file name for the real test later on.
61679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61680  if test "x$test_shortpath" = x; then
61681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61684  fi
61685
61686  # Call helper function which possibly converts this using DOS-style short mode.
61687  # If so, the updated path is stored in $new_path.
61688
61689  input_path="$new_path"
61690  # Check if we need to convert this using DOS-style short mode. If the path
61691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61692  # take no chances and rewrite it.
61693  # Note: m4 eats our [], so we need to use [ and ] instead.
61694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61695  if test "x$has_forbidden_chars" != x; then
61696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61700      # Going to short mode and back again did indeed matter. Since short mode is
61701      # case insensitive, let's make it lowercase to improve readability.
61702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61703      # Now convert it back to Unix-style (cygpath)
61704      input_path=`$CYGPATH -u "$shortmode_path"`
61705      new_path="$input_path"
61706    fi
61707  fi
61708
61709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61710  if test "x$test_cygdrive_prefix" = x; then
61711    # As a simple fix, exclude /usr/bin since it's not a real path.
61712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61714      # a path prefixed by /cygdrive for fixpath to work.
61715      new_path="$CYGWIN_ROOT_PATH$input_path"
61716    fi
61717  fi
61718
61719
61720  if test "x$path" != "x$new_path"; then
61721    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61724  fi
61725
61726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61727
61728  path="$POTENTIAL_FREETYPE_LIB_PATH"
61729  has_colon=`$ECHO $path | $GREP ^.:`
61730  new_path="$path"
61731  if test "x$has_colon" = x; then
61732    # Not in mixed or Windows style, start by that.
61733    new_path=`cmd //c echo $path`
61734  fi
61735
61736
61737  input_path="$new_path"
61738  # Check if we need to convert this using DOS-style short mode. If the path
61739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61740  # take no chances and rewrite it.
61741  # Note: m4 eats our [], so we need to use [ and ] instead.
61742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61743  if test "x$has_forbidden_chars" != x; then
61744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61746  fi
61747
61748
61749  windows_path="$new_path"
61750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61751    unix_path=`$CYGPATH -u "$windows_path"`
61752    new_path="$unix_path"
61753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61755    new_path="$unix_path"
61756  fi
61757
61758  if test "x$path" != "x$new_path"; then
61759    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61762  fi
61763
61764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61766
61767    else
61768      # We're on a unix platform. Hooray! :)
61769      path="$POTENTIAL_FREETYPE_LIB_PATH"
61770      has_space=`$ECHO "$path" | $GREP " "`
61771      if test "x$has_space" != x; then
61772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61775      fi
61776
61777      # Use eval to expand a potential ~
61778      eval path="$path"
61779      if test ! -f "$path" && test ! -d "$path"; then
61780        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61781      fi
61782
61783      if test -d "$path"; then
61784        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61785      else
61786        dir="`$DIRNAME "$path"`"
61787        base="`$BASENAME "$path"`"
61788        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61789      fi
61790    fi
61791  fi
61792
61793
61794    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61796$as_echo_n "checking for freetype includes... " >&6; }
61797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61798$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61799    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61801$as_echo_n "checking for freetype libraries... " >&6; }
61802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61803$as_echo "$FREETYPE_LIB_PATH" >&6; }
61804  fi
61805
61806            else
61807
61808  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61809  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61810  METHOD="well-known location"
61811
61812  # Let's start with an optimistic view of the world :-)
61813  FOUND_FREETYPE=yes
61814
61815  # First look for the canonical freetype main include file ft2build.h.
61816  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61817    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61818    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61819    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61820      # Fail.
61821      FOUND_FREETYPE=no
61822    fi
61823  fi
61824
61825  if test "x$FOUND_FREETYPE" = xyes; then
61826    # Include file found, let's continue the sanity check.
61827    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61828$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61829
61830    # Reset to default value
61831    FREETYPE_BASE_NAME=freetype
61832    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61833    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61834      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61835          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61836        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61837        # for the .6 version explicitly.
61838        FREETYPE_BASE_NAME=freetype.6
61839        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61840        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61841$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61842      else
61843        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61845        FOUND_FREETYPE=no
61846      fi
61847    else
61848      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61849        # On Windows, we will need both .lib and .dll file.
61850        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61851          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61852$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61853          FOUND_FREETYPE=no
61854        fi
61855      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61856          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61857        # Found lib in isa dir, use that instead.
61858        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61859        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61860$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61861      fi
61862    fi
61863  fi
61864
61865  if test "x$FOUND_FREETYPE" = xyes; then
61866
61867  # Only process if variable expands to non-empty
61868
61869  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61871
61872  # Input might be given as Windows format, start by converting to
61873  # unix format.
61874  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61875  new_path=`$CYGPATH -u "$path"`
61876
61877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61880  # "foo.exe" is OK but "foo" is an error.
61881  #
61882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61883  # It is also a way to make sure we got the proper file name for the real test later on.
61884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61885  if test "x$test_shortpath" = x; then
61886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61888    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61889  fi
61890
61891  # Call helper function which possibly converts this using DOS-style short mode.
61892  # If so, the updated path is stored in $new_path.
61893
61894  input_path="$new_path"
61895  # Check if we need to convert this using DOS-style short mode. If the path
61896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61897  # take no chances and rewrite it.
61898  # Note: m4 eats our [], so we need to use [ and ] instead.
61899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61900  if test "x$has_forbidden_chars" != x; then
61901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61905      # Going to short mode and back again did indeed matter. Since short mode is
61906      # case insensitive, let's make it lowercase to improve readability.
61907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61908      # Now convert it back to Unix-style (cygpath)
61909      input_path=`$CYGPATH -u "$shortmode_path"`
61910      new_path="$input_path"
61911    fi
61912  fi
61913
61914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61915  if test "x$test_cygdrive_prefix" = x; then
61916    # As a simple fix, exclude /usr/bin since it's not a real path.
61917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61919      # a path prefixed by /cygdrive for fixpath to work.
61920      new_path="$CYGWIN_ROOT_PATH$input_path"
61921    fi
61922  fi
61923
61924
61925  if test "x$path" != "x$new_path"; then
61926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61929  fi
61930
61931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61932
61933  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61934  has_colon=`$ECHO $path | $GREP ^.:`
61935  new_path="$path"
61936  if test "x$has_colon" = x; then
61937    # Not in mixed or Windows style, start by that.
61938    new_path=`cmd //c echo $path`
61939  fi
61940
61941
61942  input_path="$new_path"
61943  # Check if we need to convert this using DOS-style short mode. If the path
61944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61945  # take no chances and rewrite it.
61946  # Note: m4 eats our [], so we need to use [ and ] instead.
61947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61948  if test "x$has_forbidden_chars" != x; then
61949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61951  fi
61952
61953
61954  windows_path="$new_path"
61955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61956    unix_path=`$CYGPATH -u "$windows_path"`
61957    new_path="$unix_path"
61958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61960    new_path="$unix_path"
61961  fi
61962
61963  if test "x$path" != "x$new_path"; then
61964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61967  fi
61968
61969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61971
61972    else
61973      # We're on a unix platform. Hooray! :)
61974      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61975      has_space=`$ECHO "$path" | $GREP " "`
61976      if test "x$has_space" != x; then
61977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61980      fi
61981
61982      # Use eval to expand a potential ~
61983      eval path="$path"
61984      if test ! -f "$path" && test ! -d "$path"; then
61985        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61986      fi
61987
61988      if test -d "$path"; then
61989        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61990      else
61991        dir="`$DIRNAME "$path"`"
61992        base="`$BASENAME "$path"`"
61993        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61994      fi
61995    fi
61996  fi
61997
61998
61999  # Only process if variable expands to non-empty
62000
62001  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62003
62004  # Input might be given as Windows format, start by converting to
62005  # unix format.
62006  path="$POTENTIAL_FREETYPE_LIB_PATH"
62007  new_path=`$CYGPATH -u "$path"`
62008
62009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62012  # "foo.exe" is OK but "foo" is an error.
62013  #
62014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62015  # It is also a way to make sure we got the proper file name for the real test later on.
62016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62017  if test "x$test_shortpath" = x; then
62018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62021  fi
62022
62023  # Call helper function which possibly converts this using DOS-style short mode.
62024  # If so, the updated path is stored in $new_path.
62025
62026  input_path="$new_path"
62027  # Check if we need to convert this using DOS-style short mode. If the path
62028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62029  # take no chances and rewrite it.
62030  # Note: m4 eats our [], so we need to use [ and ] instead.
62031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62032  if test "x$has_forbidden_chars" != x; then
62033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62037      # Going to short mode and back again did indeed matter. Since short mode is
62038      # case insensitive, let's make it lowercase to improve readability.
62039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62040      # Now convert it back to Unix-style (cygpath)
62041      input_path=`$CYGPATH -u "$shortmode_path"`
62042      new_path="$input_path"
62043    fi
62044  fi
62045
62046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62047  if test "x$test_cygdrive_prefix" = x; then
62048    # As a simple fix, exclude /usr/bin since it's not a real path.
62049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62051      # a path prefixed by /cygdrive for fixpath to work.
62052      new_path="$CYGWIN_ROOT_PATH$input_path"
62053    fi
62054  fi
62055
62056
62057  if test "x$path" != "x$new_path"; then
62058    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62061  fi
62062
62063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62064
62065  path="$POTENTIAL_FREETYPE_LIB_PATH"
62066  has_colon=`$ECHO $path | $GREP ^.:`
62067  new_path="$path"
62068  if test "x$has_colon" = x; then
62069    # Not in mixed or Windows style, start by that.
62070    new_path=`cmd //c echo $path`
62071  fi
62072
62073
62074  input_path="$new_path"
62075  # Check if we need to convert this using DOS-style short mode. If the path
62076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62077  # take no chances and rewrite it.
62078  # Note: m4 eats our [], so we need to use [ and ] instead.
62079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62080  if test "x$has_forbidden_chars" != x; then
62081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62083  fi
62084
62085
62086  windows_path="$new_path"
62087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62088    unix_path=`$CYGPATH -u "$windows_path"`
62089    new_path="$unix_path"
62090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62092    new_path="$unix_path"
62093  fi
62094
62095  if test "x$path" != "x$new_path"; then
62096    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62099  fi
62100
62101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62103
62104    else
62105      # We're on a unix platform. Hooray! :)
62106      path="$POTENTIAL_FREETYPE_LIB_PATH"
62107      has_space=`$ECHO "$path" | $GREP " "`
62108      if test "x$has_space" != x; then
62109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62112      fi
62113
62114      # Use eval to expand a potential ~
62115      eval path="$path"
62116      if test ! -f "$path" && test ! -d "$path"; then
62117        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62118      fi
62119
62120      if test -d "$path"; then
62121        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62122      else
62123        dir="`$DIRNAME "$path"`"
62124        base="`$BASENAME "$path"`"
62125        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62126      fi
62127    fi
62128  fi
62129
62130
62131    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62133$as_echo_n "checking for freetype includes... " >&6; }
62134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62135$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62136    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62138$as_echo_n "checking for freetype libraries... " >&6; }
62139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62140$as_echo "$FREETYPE_LIB_PATH" >&6; }
62141  fi
62142
62143              if test "x$FOUND_FREETYPE" != xyes; then
62144
62145  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62146  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62147  METHOD="well-known location"
62148
62149  # Let's start with an optimistic view of the world :-)
62150  FOUND_FREETYPE=yes
62151
62152  # First look for the canonical freetype main include file ft2build.h.
62153  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62154    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62155    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62156    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62157      # Fail.
62158      FOUND_FREETYPE=no
62159    fi
62160  fi
62161
62162  if test "x$FOUND_FREETYPE" = xyes; then
62163    # Include file found, let's continue the sanity check.
62164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62166
62167    # Reset to default value
62168    FREETYPE_BASE_NAME=freetype
62169    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62170    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62171      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62173        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62174        # for the .6 version explicitly.
62175        FREETYPE_BASE_NAME=freetype.6
62176        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62177        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62178$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62179      else
62180        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62182        FOUND_FREETYPE=no
62183      fi
62184    else
62185      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62186        # On Windows, we will need both .lib and .dll file.
62187        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62188          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62190          FOUND_FREETYPE=no
62191        fi
62192      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62194        # Found lib in isa dir, use that instead.
62195        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62196        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62197$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62198      fi
62199    fi
62200  fi
62201
62202  if test "x$FOUND_FREETYPE" = xyes; then
62203
62204  # Only process if variable expands to non-empty
62205
62206  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62208
62209  # Input might be given as Windows format, start by converting to
62210  # unix format.
62211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62212  new_path=`$CYGPATH -u "$path"`
62213
62214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62217  # "foo.exe" is OK but "foo" is an error.
62218  #
62219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62220  # It is also a way to make sure we got the proper file name for the real test later on.
62221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62222  if test "x$test_shortpath" = x; then
62223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62226  fi
62227
62228  # Call helper function which possibly converts this using DOS-style short mode.
62229  # If so, the updated path is stored in $new_path.
62230
62231  input_path="$new_path"
62232  # Check if we need to convert this using DOS-style short mode. If the path
62233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62234  # take no chances and rewrite it.
62235  # Note: m4 eats our [], so we need to use [ and ] instead.
62236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62237  if test "x$has_forbidden_chars" != x; then
62238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62242      # Going to short mode and back again did indeed matter. Since short mode is
62243      # case insensitive, let's make it lowercase to improve readability.
62244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62245      # Now convert it back to Unix-style (cygpath)
62246      input_path=`$CYGPATH -u "$shortmode_path"`
62247      new_path="$input_path"
62248    fi
62249  fi
62250
62251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62252  if test "x$test_cygdrive_prefix" = x; then
62253    # As a simple fix, exclude /usr/bin since it's not a real path.
62254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62256      # a path prefixed by /cygdrive for fixpath to work.
62257      new_path="$CYGWIN_ROOT_PATH$input_path"
62258    fi
62259  fi
62260
62261
62262  if test "x$path" != "x$new_path"; then
62263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62266  fi
62267
62268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62269
62270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62271  has_colon=`$ECHO $path | $GREP ^.:`
62272  new_path="$path"
62273  if test "x$has_colon" = x; then
62274    # Not in mixed or Windows style, start by that.
62275    new_path=`cmd //c echo $path`
62276  fi
62277
62278
62279  input_path="$new_path"
62280  # Check if we need to convert this using DOS-style short mode. If the path
62281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62282  # take no chances and rewrite it.
62283  # Note: m4 eats our [], so we need to use [ and ] instead.
62284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62285  if test "x$has_forbidden_chars" != x; then
62286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62288  fi
62289
62290
62291  windows_path="$new_path"
62292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62293    unix_path=`$CYGPATH -u "$windows_path"`
62294    new_path="$unix_path"
62295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62297    new_path="$unix_path"
62298  fi
62299
62300  if test "x$path" != "x$new_path"; then
62301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62304  fi
62305
62306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62308
62309    else
62310      # We're on a unix platform. Hooray! :)
62311      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62312      has_space=`$ECHO "$path" | $GREP " "`
62313      if test "x$has_space" != x; then
62314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62317      fi
62318
62319      # Use eval to expand a potential ~
62320      eval path="$path"
62321      if test ! -f "$path" && test ! -d "$path"; then
62322        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62323      fi
62324
62325      if test -d "$path"; then
62326        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62327      else
62328        dir="`$DIRNAME "$path"`"
62329        base="`$BASENAME "$path"`"
62330        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62331      fi
62332    fi
62333  fi
62334
62335
62336  # Only process if variable expands to non-empty
62337
62338  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62340
62341  # Input might be given as Windows format, start by converting to
62342  # unix format.
62343  path="$POTENTIAL_FREETYPE_LIB_PATH"
62344  new_path=`$CYGPATH -u "$path"`
62345
62346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62349  # "foo.exe" is OK but "foo" is an error.
62350  #
62351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62352  # It is also a way to make sure we got the proper file name for the real test later on.
62353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62354  if test "x$test_shortpath" = x; then
62355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62358  fi
62359
62360  # Call helper function which possibly converts this using DOS-style short mode.
62361  # If so, the updated path is stored in $new_path.
62362
62363  input_path="$new_path"
62364  # Check if we need to convert this using DOS-style short mode. If the path
62365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62366  # take no chances and rewrite it.
62367  # Note: m4 eats our [], so we need to use [ and ] instead.
62368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62369  if test "x$has_forbidden_chars" != x; then
62370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62374      # Going to short mode and back again did indeed matter. Since short mode is
62375      # case insensitive, let's make it lowercase to improve readability.
62376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62377      # Now convert it back to Unix-style (cygpath)
62378      input_path=`$CYGPATH -u "$shortmode_path"`
62379      new_path="$input_path"
62380    fi
62381  fi
62382
62383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62384  if test "x$test_cygdrive_prefix" = x; then
62385    # As a simple fix, exclude /usr/bin since it's not a real path.
62386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62388      # a path prefixed by /cygdrive for fixpath to work.
62389      new_path="$CYGWIN_ROOT_PATH$input_path"
62390    fi
62391  fi
62392
62393
62394  if test "x$path" != "x$new_path"; then
62395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62398  fi
62399
62400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62401
62402  path="$POTENTIAL_FREETYPE_LIB_PATH"
62403  has_colon=`$ECHO $path | $GREP ^.:`
62404  new_path="$path"
62405  if test "x$has_colon" = x; then
62406    # Not in mixed or Windows style, start by that.
62407    new_path=`cmd //c echo $path`
62408  fi
62409
62410
62411  input_path="$new_path"
62412  # Check if we need to convert this using DOS-style short mode. If the path
62413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62414  # take no chances and rewrite it.
62415  # Note: m4 eats our [], so we need to use [ and ] instead.
62416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62417  if test "x$has_forbidden_chars" != x; then
62418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62420  fi
62421
62422
62423  windows_path="$new_path"
62424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62425    unix_path=`$CYGPATH -u "$windows_path"`
62426    new_path="$unix_path"
62427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62429    new_path="$unix_path"
62430  fi
62431
62432  if test "x$path" != "x$new_path"; then
62433    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62436  fi
62437
62438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62440
62441    else
62442      # We're on a unix platform. Hooray! :)
62443      path="$POTENTIAL_FREETYPE_LIB_PATH"
62444      has_space=`$ECHO "$path" | $GREP " "`
62445      if test "x$has_space" != x; then
62446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62449      fi
62450
62451      # Use eval to expand a potential ~
62452      eval path="$path"
62453      if test ! -f "$path" && test ! -d "$path"; then
62454        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62455      fi
62456
62457      if test -d "$path"; then
62458        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62459      else
62460        dir="`$DIRNAME "$path"`"
62461        base="`$BASENAME "$path"`"
62462        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62463      fi
62464    fi
62465  fi
62466
62467
62468    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62470$as_echo_n "checking for freetype includes... " >&6; }
62471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62472$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62473    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62475$as_echo_n "checking for freetype libraries... " >&6; }
62476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62477$as_echo "$FREETYPE_LIB_PATH" >&6; }
62478  fi
62479
62480              fi
62481            fi
62482          fi
62483        fi
62484      fi # end check in well-known locations
62485
62486      if test "x$FOUND_FREETYPE" != xyes; then
62487
62488  # Print a helpful message on how to acquire the necessary build dependency.
62489  # freetype is the help tag: freetype, cups, alsa etc
62490  MISSING_DEPENDENCY=freetype
62491
62492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62493    cygwin_help $MISSING_DEPENDENCY
62494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62495    msys_help $MISSING_DEPENDENCY
62496  else
62497    PKGHANDLER_COMMAND=
62498
62499    case $PKGHANDLER in
62500      apt-get)
62501        apt_help     $MISSING_DEPENDENCY ;;
62502      yum)
62503        yum_help     $MISSING_DEPENDENCY ;;
62504      brew)
62505        brew_help    $MISSING_DEPENDENCY ;;
62506      port)
62507        port_help    $MISSING_DEPENDENCY ;;
62508      pkgutil)
62509        pkgutil_help $MISSING_DEPENDENCY ;;
62510      pkgadd)
62511        pkgadd_help  $MISSING_DEPENDENCY ;;
62512    esac
62513
62514    if test "x$PKGHANDLER_COMMAND" != x; then
62515      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62516    fi
62517  fi
62518
62519        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62520      fi
62521    fi # end user specified settings
62522
62523    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62524    if test "x$FREETYPE_CFLAGS" = x; then
62525
62526  # Only process if variable expands to non-empty
62527
62528  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62530
62531  # Input might be given as Windows format, start by converting to
62532  # unix format.
62533  path="$FREETYPE_INCLUDE_PATH"
62534  new_path=`$CYGPATH -u "$path"`
62535
62536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62539  # "foo.exe" is OK but "foo" is an error.
62540  #
62541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62542  # It is also a way to make sure we got the proper file name for the real test later on.
62543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62544  if test "x$test_shortpath" = x; then
62545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62546$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62547    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62548  fi
62549
62550  # Call helper function which possibly converts this using DOS-style short mode.
62551  # If so, the updated path is stored in $new_path.
62552
62553  input_path="$new_path"
62554  # Check if we need to convert this using DOS-style short mode. If the path
62555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62556  # take no chances and rewrite it.
62557  # Note: m4 eats our [], so we need to use [ and ] instead.
62558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62559  if test "x$has_forbidden_chars" != x; then
62560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62564      # Going to short mode and back again did indeed matter. Since short mode is
62565      # case insensitive, let's make it lowercase to improve readability.
62566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62567      # Now convert it back to Unix-style (cygpath)
62568      input_path=`$CYGPATH -u "$shortmode_path"`
62569      new_path="$input_path"
62570    fi
62571  fi
62572
62573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62574  if test "x$test_cygdrive_prefix" = x; then
62575    # As a simple fix, exclude /usr/bin since it's not a real path.
62576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62578      # a path prefixed by /cygdrive for fixpath to work.
62579      new_path="$CYGWIN_ROOT_PATH$input_path"
62580    fi
62581  fi
62582
62583
62584  if test "x$path" != "x$new_path"; then
62585    FREETYPE_INCLUDE_PATH="$new_path"
62586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62587$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62588  fi
62589
62590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62591
62592  path="$FREETYPE_INCLUDE_PATH"
62593  has_colon=`$ECHO $path | $GREP ^.:`
62594  new_path="$path"
62595  if test "x$has_colon" = x; then
62596    # Not in mixed or Windows style, start by that.
62597    new_path=`cmd //c echo $path`
62598  fi
62599
62600
62601  input_path="$new_path"
62602  # Check if we need to convert this using DOS-style short mode. If the path
62603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62604  # take no chances and rewrite it.
62605  # Note: m4 eats our [], so we need to use [ and ] instead.
62606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62607  if test "x$has_forbidden_chars" != x; then
62608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62610  fi
62611
62612
62613  windows_path="$new_path"
62614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62615    unix_path=`$CYGPATH -u "$windows_path"`
62616    new_path="$unix_path"
62617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62619    new_path="$unix_path"
62620  fi
62621
62622  if test "x$path" != "x$new_path"; then
62623    FREETYPE_INCLUDE_PATH="$new_path"
62624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62625$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62626  fi
62627
62628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62630
62631    else
62632      # We're on a unix platform. Hooray! :)
62633      path="$FREETYPE_INCLUDE_PATH"
62634      has_space=`$ECHO "$path" | $GREP " "`
62635      if test "x$has_space" != x; then
62636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62637$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62639      fi
62640
62641      # Use eval to expand a potential ~
62642      eval path="$path"
62643      if test ! -f "$path" && test ! -d "$path"; then
62644        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62645      fi
62646
62647      if test -d "$path"; then
62648        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62649      else
62650        dir="`$DIRNAME "$path"`"
62651        base="`$BASENAME "$path"`"
62652        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62653      fi
62654    fi
62655  fi
62656
62657      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62658        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62659      else
62660        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62661      fi
62662    fi
62663
62664    if test "x$FREETYPE_LIBS" = x; then
62665
62666  # Only process if variable expands to non-empty
62667
62668  if test "x$FREETYPE_LIB_PATH" != x; then
62669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62670
62671  # Input might be given as Windows format, start by converting to
62672  # unix format.
62673  path="$FREETYPE_LIB_PATH"
62674  new_path=`$CYGPATH -u "$path"`
62675
62676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62679  # "foo.exe" is OK but "foo" is an error.
62680  #
62681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62682  # It is also a way to make sure we got the proper file name for the real test later on.
62683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62684  if test "x$test_shortpath" = x; then
62685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62686$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62687    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62688  fi
62689
62690  # Call helper function which possibly converts this using DOS-style short mode.
62691  # If so, the updated path is stored in $new_path.
62692
62693  input_path="$new_path"
62694  # Check if we need to convert this using DOS-style short mode. If the path
62695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62696  # take no chances and rewrite it.
62697  # Note: m4 eats our [], so we need to use [ and ] instead.
62698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62699  if test "x$has_forbidden_chars" != x; then
62700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62704      # Going to short mode and back again did indeed matter. Since short mode is
62705      # case insensitive, let's make it lowercase to improve readability.
62706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62707      # Now convert it back to Unix-style (cygpath)
62708      input_path=`$CYGPATH -u "$shortmode_path"`
62709      new_path="$input_path"
62710    fi
62711  fi
62712
62713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62714  if test "x$test_cygdrive_prefix" = x; then
62715    # As a simple fix, exclude /usr/bin since it's not a real path.
62716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62718      # a path prefixed by /cygdrive for fixpath to work.
62719      new_path="$CYGWIN_ROOT_PATH$input_path"
62720    fi
62721  fi
62722
62723
62724  if test "x$path" != "x$new_path"; then
62725    FREETYPE_LIB_PATH="$new_path"
62726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62727$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62728  fi
62729
62730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62731
62732  path="$FREETYPE_LIB_PATH"
62733  has_colon=`$ECHO $path | $GREP ^.:`
62734  new_path="$path"
62735  if test "x$has_colon" = x; then
62736    # Not in mixed or Windows style, start by that.
62737    new_path=`cmd //c echo $path`
62738  fi
62739
62740
62741  input_path="$new_path"
62742  # Check if we need to convert this using DOS-style short mode. If the path
62743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62744  # take no chances and rewrite it.
62745  # Note: m4 eats our [], so we need to use [ and ] instead.
62746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62747  if test "x$has_forbidden_chars" != x; then
62748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62750  fi
62751
62752
62753  windows_path="$new_path"
62754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62755    unix_path=`$CYGPATH -u "$windows_path"`
62756    new_path="$unix_path"
62757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62759    new_path="$unix_path"
62760  fi
62761
62762  if test "x$path" != "x$new_path"; then
62763    FREETYPE_LIB_PATH="$new_path"
62764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62765$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62766  fi
62767
62768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62770
62771    else
62772      # We're on a unix platform. Hooray! :)
62773      path="$FREETYPE_LIB_PATH"
62774      has_space=`$ECHO "$path" | $GREP " "`
62775      if test "x$has_space" != x; then
62776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62777$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62779      fi
62780
62781      # Use eval to expand a potential ~
62782      eval path="$path"
62783      if test ! -f "$path" && test ! -d "$path"; then
62784        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62785      fi
62786
62787      if test -d "$path"; then
62788        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62789      else
62790        dir="`$DIRNAME "$path"`"
62791        base="`$BASENAME "$path"`"
62792        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62793      fi
62794    fi
62795  fi
62796
62797      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62798        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62799      else
62800        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62801      fi
62802    fi
62803
62804    # Try to compile it
62805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62806$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62807    ac_ext=cpp
62808ac_cpp='$CXXCPP $CPPFLAGS'
62809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62812
62813    PREV_CXXCFLAGS="$CXXFLAGS"
62814    PREV_LIBS="$LIBS"
62815    PREV_CXX="$CXX"
62816    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62817    LIBS="$LIBS $FREETYPE_LIBS"
62818    CXX="$FIXPATH $CXX"
62819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62820/* end confdefs.h.  */
62821
62822          #include<ft2build.h>
62823          #include FT_FREETYPE_H
62824          int main () {
62825            FT_Init_FreeType(NULL);
62826            return 0;
62827          }
62828
62829_ACEOF
62830if ac_fn_cxx_try_link "$LINENO"; then :
62831
62832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62833$as_echo "yes" >&6; }
62834
62835else
62836
62837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62838$as_echo "no" >&6; }
62839          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62840$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62841          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62842$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62843
62844
62845  # Print a helpful message on how to acquire the necessary build dependency.
62846  # freetype is the help tag: freetype, cups, alsa etc
62847  MISSING_DEPENDENCY=freetype
62848
62849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62850    cygwin_help $MISSING_DEPENDENCY
62851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62852    msys_help $MISSING_DEPENDENCY
62853  else
62854    PKGHANDLER_COMMAND=
62855
62856    case $PKGHANDLER in
62857      apt-get)
62858        apt_help     $MISSING_DEPENDENCY ;;
62859      yum)
62860        yum_help     $MISSING_DEPENDENCY ;;
62861      brew)
62862        brew_help    $MISSING_DEPENDENCY ;;
62863      port)
62864        port_help    $MISSING_DEPENDENCY ;;
62865      pkgutil)
62866        pkgutil_help $MISSING_DEPENDENCY ;;
62867      pkgadd)
62868        pkgadd_help  $MISSING_DEPENDENCY ;;
62869    esac
62870
62871    if test "x$PKGHANDLER_COMMAND" != x; then
62872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62873    fi
62874  fi
62875
62876
62877          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62878
62879
62880fi
62881rm -f core conftest.err conftest.$ac_objext \
62882    conftest$ac_exeext conftest.$ac_ext
62883    CXXCFLAGS="$PREV_CXXFLAGS"
62884    LIBS="$PREV_LIBS"
62885    CXX="$PREV_CXX"
62886    ac_ext=cpp
62887ac_cpp='$CXXCPP $CPPFLAGS'
62888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62891
62892
62893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62894$as_echo_n "checking if we should bundle freetype... " >&6; }
62895    if test "x$BUNDLE_FREETYPE" = xyes; then
62896      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62897    fi
62898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62899$as_echo "$BUNDLE_FREETYPE" >&6; }
62900
62901  fi # end freetype needed
62902
62903
62904
62905
62906
62907
62908
62909# Check whether --with-alsa was given.
62910if test "${with_alsa+set}" = set; then :
62911  withval=$with_alsa;
62912fi
62913
62914
62915# Check whether --with-alsa-include was given.
62916if test "${with_alsa_include+set}" = set; then :
62917  withval=$with_alsa_include;
62918fi
62919
62920
62921# Check whether --with-alsa-lib was given.
62922if test "${with_alsa_lib+set}" = set; then :
62923  withval=$with_alsa_lib;
62924fi
62925
62926
62927  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62928    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62929        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62930        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62931      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62932$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62933    fi
62934    ALSA_CFLAGS=
62935    ALSA_LIBS=
62936  else
62937    ALSA_FOUND=no
62938
62939    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62940      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62941    fi
62942
62943    if test "x${with_alsa}" != x; then
62944      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62945      ALSA_CFLAGS="-I${with_alsa}/include"
62946      ALSA_FOUND=yes
62947    fi
62948    if test "x${with_alsa_include}" != x; then
62949      ALSA_CFLAGS="-I${with_alsa_include}"
62950      ALSA_FOUND=yes
62951    fi
62952    if test "x${with_alsa_lib}" != x; then
62953      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62954      ALSA_FOUND=yes
62955    fi
62956    # Do not try pkg-config if we have a sysroot set.
62957    if test "x$SYSROOT" = x; then
62958      if test "x$ALSA_FOUND" = xno; then
62959
62960pkg_failed=no
62961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62962$as_echo_n "checking for ALSA... " >&6; }
62963
62964if test -n "$ALSA_CFLAGS"; then
62965    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62966 elif test -n "$PKG_CONFIG"; then
62967    if test -n "$PKG_CONFIG" && \
62968    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62969  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62970  ac_status=$?
62971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62972  test $ac_status = 0; }; then
62973  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62974else
62975  pkg_failed=yes
62976fi
62977 else
62978    pkg_failed=untried
62979fi
62980if test -n "$ALSA_LIBS"; then
62981    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62982 elif test -n "$PKG_CONFIG"; then
62983    if test -n "$PKG_CONFIG" && \
62984    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62985  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62986  ac_status=$?
62987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62988  test $ac_status = 0; }; then
62989  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62990else
62991  pkg_failed=yes
62992fi
62993 else
62994    pkg_failed=untried
62995fi
62996
62997
62998
62999if test $pkg_failed = yes; then
63000
63001if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63002        _pkg_short_errors_supported=yes
63003else
63004        _pkg_short_errors_supported=no
63005fi
63006        if test $_pkg_short_errors_supported = yes; then
63007	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63008        else
63009	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63010        fi
63011	# Put the nasty error message in config.log where it belongs
63012	echo "$ALSA_PKG_ERRORS" >&5
63013
63014	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63015$as_echo "no" >&6; }
63016                ALSA_FOUND=no
63017elif test $pkg_failed = untried; then
63018	ALSA_FOUND=no
63019else
63020	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63021	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63023$as_echo "yes" >&6; }
63024	ALSA_FOUND=yes
63025fi
63026      fi
63027    fi
63028    if test "x$ALSA_FOUND" = xno; then
63029      for ac_header in alsa/asoundlib.h
63030do :
63031  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63032if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63033  cat >>confdefs.h <<_ACEOF
63034#define HAVE_ALSA_ASOUNDLIB_H 1
63035_ACEOF
63036
63037            ALSA_FOUND=yes
63038            ALSA_CFLAGS=-Iignoreme
63039            ALSA_LIBS=-lasound
63040            DEFAULT_ALSA=yes
63041
63042else
63043  ALSA_FOUND=no
63044
63045fi
63046
63047done
63048
63049    fi
63050    if test "x$ALSA_FOUND" = xno; then
63051
63052  # Print a helpful message on how to acquire the necessary build dependency.
63053  # alsa is the help tag: freetype, cups, alsa etc
63054  MISSING_DEPENDENCY=alsa
63055
63056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63057    cygwin_help $MISSING_DEPENDENCY
63058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63059    msys_help $MISSING_DEPENDENCY
63060  else
63061    PKGHANDLER_COMMAND=
63062
63063    case $PKGHANDLER in
63064      apt-get)
63065        apt_help     $MISSING_DEPENDENCY ;;
63066      yum)
63067        yum_help     $MISSING_DEPENDENCY ;;
63068      brew)
63069        brew_help    $MISSING_DEPENDENCY ;;
63070      port)
63071        port_help    $MISSING_DEPENDENCY ;;
63072      pkgutil)
63073        pkgutil_help $MISSING_DEPENDENCY ;;
63074      pkgadd)
63075        pkgadd_help  $MISSING_DEPENDENCY ;;
63076    esac
63077
63078    if test "x$PKGHANDLER_COMMAND" != x; then
63079      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63080    fi
63081  fi
63082
63083      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63084    fi
63085  fi
63086
63087
63088
63089
63090
63091
63092# Check whether --with-libffi was given.
63093if test "${with_libffi+set}" = set; then :
63094  withval=$with_libffi;
63095fi
63096
63097
63098# Check whether --with-libffi-include was given.
63099if test "${with_libffi_include+set}" = set; then :
63100  withval=$with_libffi_include;
63101fi
63102
63103
63104# Check whether --with-libffi-lib was given.
63105if test "${with_libffi_lib+set}" = set; then :
63106  withval=$with_libffi_lib;
63107fi
63108
63109  # Check whether --enable-libffi-bundling was given.
63110if test "${enable_libffi_bundling+set}" = set; then :
63111  enableval=$enable_libffi_bundling;
63112fi
63113
63114
63115  if test "x$NEEDS_LIB_FFI" = xfalse; then
63116    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63117        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63118        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63119      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63120$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63121    fi
63122    LIBFFI_CFLAGS=
63123    LIBFFI_LIBS=
63124  else
63125    LIBFFI_FOUND=no
63126
63127    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63128      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63129    fi
63130
63131    if test "x${with_libffi}" != x; then
63132      LIBFFI_LIB_PATH="${with_libffi}/lib"
63133      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63134      LIBFFI_CFLAGS="-I${with_libffi}/include"
63135      LIBFFI_FOUND=yes
63136    fi
63137    if test "x${with_libffi_include}" != x; then
63138      LIBFFI_CFLAGS="-I${with_libffi_include}"
63139      LIBFFI_FOUND=yes
63140    fi
63141    if test "x${with_libffi_lib}" != x; then
63142      LIBFFI_LIB_PATH="${with_libffi_lib}"
63143      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63144      LIBFFI_FOUND=yes
63145    fi
63146    # Do not try pkg-config if we have a sysroot set.
63147    if test "x$SYSROOT" = x; then
63148      if test "x$LIBFFI_FOUND" = xno; then
63149        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63150
63151pkg_failed=no
63152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63153$as_echo_n "checking for LIBFFI... " >&6; }
63154
63155if test -n "$LIBFFI_CFLAGS"; then
63156    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63157 elif test -n "$PKG_CONFIG"; then
63158    if test -n "$PKG_CONFIG" && \
63159    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63160  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63161  ac_status=$?
63162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63163  test $ac_status = 0; }; then
63164  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63165else
63166  pkg_failed=yes
63167fi
63168 else
63169    pkg_failed=untried
63170fi
63171if test -n "$LIBFFI_LIBS"; then
63172    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63173 elif test -n "$PKG_CONFIG"; then
63174    if test -n "$PKG_CONFIG" && \
63175    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63176  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63177  ac_status=$?
63178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63179  test $ac_status = 0; }; then
63180  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63181else
63182  pkg_failed=yes
63183fi
63184 else
63185    pkg_failed=untried
63186fi
63187
63188
63189
63190if test $pkg_failed = yes; then
63191
63192if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63193        _pkg_short_errors_supported=yes
63194else
63195        _pkg_short_errors_supported=no
63196fi
63197        if test $_pkg_short_errors_supported = yes; then
63198	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63199        else
63200	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63201        fi
63202	# Put the nasty error message in config.log where it belongs
63203	echo "$LIBFFI_PKG_ERRORS" >&5
63204
63205	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63206$as_echo "no" >&6; }
63207                LIBFFI_FOUND=no
63208elif test $pkg_failed = untried; then
63209	LIBFFI_FOUND=no
63210else
63211	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63212	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63214$as_echo "yes" >&6; }
63215	LIBFFI_FOUND=yes
63216fi
63217      fi
63218    fi
63219    if test "x$LIBFFI_FOUND" = xno; then
63220      for ac_header in ffi.h
63221do :
63222  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63223if test "x$ac_cv_header_ffi_h" = xyes; then :
63224  cat >>confdefs.h <<_ACEOF
63225#define HAVE_FFI_H 1
63226_ACEOF
63227
63228            LIBFFI_FOUND=yes
63229            LIBFFI_CFLAGS=
63230            LIBFFI_LIBS=-lffi
63231
63232else
63233  LIBFFI_FOUND=no
63234
63235fi
63236
63237done
63238
63239    fi
63240    if test "x$LIBFFI_FOUND" = xno; then
63241
63242  # Print a helpful message on how to acquire the necessary build dependency.
63243  # ffi is the help tag: freetype, cups, alsa etc
63244  MISSING_DEPENDENCY=ffi
63245
63246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63247    cygwin_help $MISSING_DEPENDENCY
63248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63249    msys_help $MISSING_DEPENDENCY
63250  else
63251    PKGHANDLER_COMMAND=
63252
63253    case $PKGHANDLER in
63254      apt-get)
63255        apt_help     $MISSING_DEPENDENCY ;;
63256      yum)
63257        yum_help     $MISSING_DEPENDENCY ;;
63258      brew)
63259        brew_help    $MISSING_DEPENDENCY ;;
63260      port)
63261        port_help    $MISSING_DEPENDENCY ;;
63262      pkgutil)
63263        pkgutil_help $MISSING_DEPENDENCY ;;
63264      pkgadd)
63265        pkgadd_help  $MISSING_DEPENDENCY ;;
63266    esac
63267
63268    if test "x$PKGHANDLER_COMMAND" != x; then
63269      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63270    fi
63271  fi
63272
63273      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63274    fi
63275
63276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63277$as_echo_n "checking if libffi works... " >&6; }
63278    ac_ext=c
63279ac_cpp='$CPP $CPPFLAGS'
63280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63282ac_compiler_gnu=$ac_cv_c_compiler_gnu
63283
63284    OLD_CFLAGS="$CFLAGS"
63285    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63286    OLD_LIBS="$LIBS"
63287    LIBS="$LIBS $LIBFFI_LIBS"
63288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63289/* end confdefs.h.  */
63290#include <ffi.h>
63291int
63292main ()
63293{
63294
63295          ffi_call(NULL, NULL, NULL, NULL);
63296          return 0;
63297
63298  ;
63299  return 0;
63300}
63301_ACEOF
63302if ac_fn_c_try_link "$LINENO"; then :
63303  LIBFFI_WORKS=yes
63304else
63305  LIBFFI_WORKS=no
63306
63307fi
63308rm -f core conftest.err conftest.$ac_objext \
63309    conftest$ac_exeext conftest.$ac_ext
63310    CFLAGS="$OLD_CFLAGS"
63311    LIBS="$OLD_LIBS"
63312    ac_ext=cpp
63313ac_cpp='$CXXCPP $CPPFLAGS'
63314ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63315ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63316ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63317
63318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63319$as_echo "$LIBFFI_WORKS" >&6; }
63320
63321    if test "x$LIBFFI_WORKS" = xno; then
63322
63323  # Print a helpful message on how to acquire the necessary build dependency.
63324  # ffi is the help tag: freetype, cups, alsa etc
63325  MISSING_DEPENDENCY=ffi
63326
63327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63328    cygwin_help $MISSING_DEPENDENCY
63329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63330    msys_help $MISSING_DEPENDENCY
63331  else
63332    PKGHANDLER_COMMAND=
63333
63334    case $PKGHANDLER in
63335      apt-get)
63336        apt_help     $MISSING_DEPENDENCY ;;
63337      yum)
63338        yum_help     $MISSING_DEPENDENCY ;;
63339      brew)
63340        brew_help    $MISSING_DEPENDENCY ;;
63341      port)
63342        port_help    $MISSING_DEPENDENCY ;;
63343      pkgutil)
63344        pkgutil_help $MISSING_DEPENDENCY ;;
63345      pkgadd)
63346        pkgadd_help  $MISSING_DEPENDENCY ;;
63347    esac
63348
63349    if test "x$PKGHANDLER_COMMAND" != x; then
63350      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63351    fi
63352  fi
63353
63354      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63355    fi
63356
63357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63358$as_echo_n "checking if libffi should be bundled... " >&6; }
63359    if test "x$enable_libffi_bundling" = "x"; then
63360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63361$as_echo "no" >&6; }
63362      ENABLE_LIBFFI_BUNDLING=false
63363    elif  test "x$enable_libffi_bundling" = "xno"; then
63364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63365$as_echo "no, forced" >&6; }
63366      ENABLE_LIBFFI_BUNDLING=false
63367    elif  test "x$enable_libffi_bundling" = "xyes"; then
63368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63369$as_echo "yes, forced" >&6; }
63370      ENABLE_LIBFFI_BUNDLING=true
63371    else
63372      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63373    fi
63374
63375    # Find the libffi.so.X to bundle
63376    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63378$as_echo_n "checking for libffi lib file location... " >&6; }
63379      if test "x${LIBFFI_LIB_PATH}" != x; then
63380        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63381          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63382        else
63383          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63384        fi
63385      else
63386        # If we don't have an explicit path, look in a few obvious places
63387        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63388          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63389            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63390          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63391            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63392          else
63393            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63394          fi
63395        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63396          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63397            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63398          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63399            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63400          else
63401            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63402          fi
63403        else
63404          # Fallback on the default /usr/lib dir
63405          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63406            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63407          else
63408            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63409          fi
63410        fi
63411      fi
63412      # Make sure the wildcard is evaluated
63413      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63415$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63416    fi
63417  fi
63418
63419
63420
63421
63422
63423
63424
63425  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63426    # Extract the first word of "llvm-config", so it can be a program name with args.
63427set dummy llvm-config; ac_word=$2
63428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63429$as_echo_n "checking for $ac_word... " >&6; }
63430if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63431  $as_echo_n "(cached) " >&6
63432else
63433  if test -n "$LLVM_CONFIG"; then
63434  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63435else
63436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63437for as_dir in $PATH
63438do
63439  IFS=$as_save_IFS
63440  test -z "$as_dir" && as_dir=.
63441    for ac_exec_ext in '' $ac_executable_extensions; do
63442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63443    ac_cv_prog_LLVM_CONFIG="llvm-config"
63444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63445    break 2
63446  fi
63447done
63448  done
63449IFS=$as_save_IFS
63450
63451fi
63452fi
63453LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63454if test -n "$LLVM_CONFIG"; then
63455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63456$as_echo "$LLVM_CONFIG" >&6; }
63457else
63458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63459$as_echo "no" >&6; }
63460fi
63461
63462
63463
63464    if test "x$LLVM_CONFIG" != xllvm-config; then
63465      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63466    fi
63467
63468    llvm_components="jit mcjit engine nativecodegen native"
63469    unset LLVM_CFLAGS
63470    for flag in $("$LLVM_CONFIG" --cxxflags); do
63471      if echo "${flag}" | grep -q '^-[ID]'; then
63472        if test "${flag}" != "-D_DEBUG" ; then
63473          if test "${LLVM_CFLAGS}" != "" ; then
63474            LLVM_CFLAGS="${LLVM_CFLAGS} "
63475          fi
63476          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63477        fi
63478      fi
63479    done
63480    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63481    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63482
63483    unset LLVM_LDFLAGS
63484    for flag in $("${LLVM_CONFIG}" --ldflags); do
63485      if echo "${flag}" | grep -q '^-L'; then
63486        if test "${LLVM_LDFLAGS}" != ""; then
63487          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63488        fi
63489        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63490      fi
63491    done
63492
63493    unset LLVM_LIBS
63494    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63495      if echo "${flag}" | grep -q '^-l'; then
63496        if test "${LLVM_LIBS}" != ""; then
63497          LLVM_LIBS="${LLVM_LIBS} "
63498        fi
63499        LLVM_LIBS="${LLVM_LIBS}${flag}"
63500      fi
63501    done
63502
63503    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63504    # always properly detect -ltinfo
63505    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63506
63507
63508
63509
63510  fi
63511
63512
63513
63514# Check whether --with-libjpeg was given.
63515if test "${with_libjpeg+set}" = set; then :
63516  withval=$with_libjpeg;
63517fi
63518
63519
63520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63521$as_echo_n "checking for which libjpeg to use... " >&6; }
63522  # default is bundled
63523  DEFAULT_LIBJPEG=bundled
63524  # if user didn't specify, use DEFAULT_LIBJPEG
63525  if test "x${with_libjpeg}" = "x"; then
63526    with_libjpeg=${DEFAULT_LIBJPEG}
63527  fi
63528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63529$as_echo "${with_libjpeg}" >&6; }
63530
63531  if test "x${with_libjpeg}" = "xbundled"; then
63532    USE_EXTERNAL_LIBJPEG=false
63533  elif test "x${with_libjpeg}" = "xsystem"; then
63534    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63535if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63536
63537else
63538   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63539fi
63540
63541
63542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63543$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63544if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63545  $as_echo_n "(cached) " >&6
63546else
63547  ac_check_lib_save_LIBS=$LIBS
63548LIBS="-ljpeg  $LIBS"
63549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63550/* end confdefs.h.  */
63551
63552/* Override any GCC internal prototype to avoid an error.
63553   Use char because int might match the return type of a GCC
63554   builtin and then its argument prototype would still apply.  */
63555#ifdef __cplusplus
63556extern "C"
63557#endif
63558char jpeg_CreateDecompress ();
63559int
63560main ()
63561{
63562return jpeg_CreateDecompress ();
63563  ;
63564  return 0;
63565}
63566_ACEOF
63567if ac_fn_cxx_try_link "$LINENO"; then :
63568  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63569else
63570  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63571fi
63572rm -f core conftest.err conftest.$ac_objext \
63573    conftest$ac_exeext conftest.$ac_ext
63574LIBS=$ac_check_lib_save_LIBS
63575fi
63576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63577$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63578if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63579  cat >>confdefs.h <<_ACEOF
63580#define HAVE_LIBJPEG 1
63581_ACEOF
63582
63583  LIBS="-ljpeg $LIBS"
63584
63585else
63586   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63587fi
63588
63589
63590    USE_EXTERNAL_LIBJPEG=true
63591  else
63592    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63593  fi
63594
63595
63596
63597
63598
63599# Check whether --with-giflib was given.
63600if test "${with_giflib+set}" = set; then :
63601  withval=$with_giflib;
63602fi
63603
63604
63605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63606$as_echo_n "checking for which giflib to use... " >&6; }
63607  # default is bundled
63608  DEFAULT_GIFLIB=bundled
63609  # if user didn't specify, use DEFAULT_GIFLIB
63610  if test "x${with_giflib}" = "x"; then
63611    with_giflib=${DEFAULT_GIFLIB}
63612  fi
63613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63614$as_echo "${with_giflib}" >&6; }
63615
63616  if test "x${with_giflib}" = "xbundled"; then
63617    USE_EXTERNAL_LIBGIF=false
63618  elif test "x${with_giflib}" = "xsystem"; then
63619    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63620if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63621
63622else
63623   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63624fi
63625
63626
63627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63628$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63629if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63630  $as_echo_n "(cached) " >&6
63631else
63632  ac_check_lib_save_LIBS=$LIBS
63633LIBS="-lgif  $LIBS"
63634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63635/* end confdefs.h.  */
63636
63637/* Override any GCC internal prototype to avoid an error.
63638   Use char because int might match the return type of a GCC
63639   builtin and then its argument prototype would still apply.  */
63640#ifdef __cplusplus
63641extern "C"
63642#endif
63643char DGifGetCode ();
63644int
63645main ()
63646{
63647return DGifGetCode ();
63648  ;
63649  return 0;
63650}
63651_ACEOF
63652if ac_fn_cxx_try_link "$LINENO"; then :
63653  ac_cv_lib_gif_DGifGetCode=yes
63654else
63655  ac_cv_lib_gif_DGifGetCode=no
63656fi
63657rm -f core conftest.err conftest.$ac_objext \
63658    conftest$ac_exeext conftest.$ac_ext
63659LIBS=$ac_check_lib_save_LIBS
63660fi
63661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63662$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63663if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63664  cat >>confdefs.h <<_ACEOF
63665#define HAVE_LIBGIF 1
63666_ACEOF
63667
63668  LIBS="-lgif $LIBS"
63669
63670else
63671   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63672fi
63673
63674
63675    USE_EXTERNAL_LIBGIF=true
63676  else
63677    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63678  fi
63679
63680
63681
63682
63683
63684# Check whether --with-libpng was given.
63685if test "${with_libpng+set}" = set; then :
63686  withval=$with_libpng;
63687fi
63688
63689
63690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63691$as_echo_n "checking for which libpng to use... " >&6; }
63692
63693  # default is bundled
63694  DEFAULT_LIBPNG=bundled
63695  # if user didn't specify, use DEFAULT_LIBPNG
63696  if test "x${with_libpng}" = "x"; then
63697      with_libpng=${DEFAULT_LIBPNG}
63698  fi
63699
63700  if test "x${with_libpng}" = "xbundled"; then
63701      USE_EXTERNAL_LIBPNG=false
63702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63703$as_echo "bundled" >&6; }
63704  elif test "x${with_libpng}" = "xsystem"; then
63705
63706pkg_failed=no
63707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63708$as_echo_n "checking for PNG... " >&6; }
63709
63710if test -n "$PNG_CFLAGS"; then
63711    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63712 elif test -n "$PKG_CONFIG"; then
63713    if test -n "$PKG_CONFIG" && \
63714    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63715  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63716  ac_status=$?
63717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63718  test $ac_status = 0; }; then
63719  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63720else
63721  pkg_failed=yes
63722fi
63723 else
63724    pkg_failed=untried
63725fi
63726if test -n "$PNG_LIBS"; then
63727    pkg_cv_PNG_LIBS="$PNG_LIBS"
63728 elif test -n "$PKG_CONFIG"; then
63729    if test -n "$PKG_CONFIG" && \
63730    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63731  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63732  ac_status=$?
63733  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63734  test $ac_status = 0; }; then
63735  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63736else
63737  pkg_failed=yes
63738fi
63739 else
63740    pkg_failed=untried
63741fi
63742
63743
63744
63745if test $pkg_failed = yes; then
63746
63747if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63748        _pkg_short_errors_supported=yes
63749else
63750        _pkg_short_errors_supported=no
63751fi
63752        if test $_pkg_short_errors_supported = yes; then
63753	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63754        else
63755	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63756        fi
63757	# Put the nasty error message in config.log where it belongs
63758	echo "$PNG_PKG_ERRORS" >&5
63759
63760	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63761$as_echo "no" >&6; }
63762                 LIBPNG_FOUND=no
63763elif test $pkg_failed = untried; then
63764	 LIBPNG_FOUND=no
63765else
63766	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63767	PNG_LIBS=$pkg_cv_PNG_LIBS
63768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63769$as_echo "yes" >&6; }
63770	 LIBPNG_FOUND=yes
63771fi
63772      if test "x${LIBPNG_FOUND}" = "xyes"; then
63773          USE_EXTERNAL_LIBPNG=true
63774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63775$as_echo "system" >&6; }
63776      else
63777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63778$as_echo "system not found" >&6; }
63779          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63780      fi
63781  else
63782      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63783  fi
63784
63785
63786
63787
63788
63789# Check whether --with-zlib was given.
63790if test "${with_zlib+set}" = set; then :
63791  withval=$with_zlib;
63792fi
63793
63794
63795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63796$as_echo_n "checking for compress in -lz... " >&6; }
63797if ${ac_cv_lib_z_compress+:} false; then :
63798  $as_echo_n "(cached) " >&6
63799else
63800  ac_check_lib_save_LIBS=$LIBS
63801LIBS="-lz  $LIBS"
63802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63803/* end confdefs.h.  */
63804
63805/* Override any GCC internal prototype to avoid an error.
63806   Use char because int might match the return type of a GCC
63807   builtin and then its argument prototype would still apply.  */
63808#ifdef __cplusplus
63809extern "C"
63810#endif
63811char compress ();
63812int
63813main ()
63814{
63815return compress ();
63816  ;
63817  return 0;
63818}
63819_ACEOF
63820if ac_fn_cxx_try_link "$LINENO"; then :
63821  ac_cv_lib_z_compress=yes
63822else
63823  ac_cv_lib_z_compress=no
63824fi
63825rm -f core conftest.err conftest.$ac_objext \
63826    conftest$ac_exeext conftest.$ac_ext
63827LIBS=$ac_check_lib_save_LIBS
63828fi
63829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63830$as_echo "$ac_cv_lib_z_compress" >&6; }
63831if test "x$ac_cv_lib_z_compress" = xyes; then :
63832   ZLIB_FOUND=yes
63833else
63834   ZLIB_FOUND=no
63835fi
63836
63837
63838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63839$as_echo_n "checking for which zlib to use... " >&6; }
63840
63841  DEFAULT_ZLIB=system
63842  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63843    # On windows default is bundled...on others default is system
63844    DEFAULT_ZLIB=bundled
63845  fi
63846
63847  if test "x${ZLIB_FOUND}" != "xyes"; then
63848    # If we don't find any system...set default to bundled
63849    DEFAULT_ZLIB=bundled
63850  fi
63851
63852  # If user didn't specify, use DEFAULT_ZLIB
63853  if test "x${with_zlib}" = "x"; then
63854    with_zlib=${DEFAULT_ZLIB}
63855  fi
63856
63857  if test "x${with_zlib}" = "xbundled"; then
63858    USE_EXTERNAL_LIBZ=false
63859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63860$as_echo "bundled" >&6; }
63861  elif test "x${with_zlib}" = "xsystem"; then
63862    if test "x${ZLIB_FOUND}" = "xyes"; then
63863      USE_EXTERNAL_LIBZ=true
63864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63865$as_echo "system" >&6; }
63866    else
63867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63868$as_echo "system not found" >&6; }
63869      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63870    fi
63871  else
63872    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63873  fi
63874
63875
63876
63877
63878
63879# Check whether --with-lcms was given.
63880if test "${with_lcms+set}" = set; then :
63881  withval=$with_lcms;
63882fi
63883
63884
63885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63886$as_echo_n "checking for which lcms to use... " >&6; }
63887
63888  DEFAULT_LCMS=bundled
63889  # If user didn't specify, use DEFAULT_LCMS
63890  if test "x${with_lcms}" = "x"; then
63891      with_lcms=${DEFAULT_LCMS}
63892  fi
63893
63894  if test "x${with_lcms}" = "xbundled"; then
63895    USE_EXTERNAL_LCMS=false
63896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63897$as_echo "bundled" >&6; }
63898  elif test "x${with_lcms}" = "xsystem"; then
63899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63900$as_echo "system" >&6; }
63901
63902pkg_failed=no
63903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63904$as_echo_n "checking for LCMS... " >&6; }
63905
63906if test -n "$LCMS_CFLAGS"; then
63907    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63908 elif test -n "$PKG_CONFIG"; then
63909    if test -n "$PKG_CONFIG" && \
63910    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63911  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63912  ac_status=$?
63913  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63914  test $ac_status = 0; }; then
63915  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63916else
63917  pkg_failed=yes
63918fi
63919 else
63920    pkg_failed=untried
63921fi
63922if test -n "$LCMS_LIBS"; then
63923    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63924 elif test -n "$PKG_CONFIG"; then
63925    if test -n "$PKG_CONFIG" && \
63926    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63927  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63928  ac_status=$?
63929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63930  test $ac_status = 0; }; then
63931  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63932else
63933  pkg_failed=yes
63934fi
63935 else
63936    pkg_failed=untried
63937fi
63938
63939
63940
63941if test $pkg_failed = yes; then
63942
63943if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63944        _pkg_short_errors_supported=yes
63945else
63946        _pkg_short_errors_supported=no
63947fi
63948        if test $_pkg_short_errors_supported = yes; then
63949	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63950        else
63951	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63952        fi
63953	# Put the nasty error message in config.log where it belongs
63954	echo "$LCMS_PKG_ERRORS" >&5
63955
63956	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63957$as_echo "no" >&6; }
63958                LCMS_FOUND=no
63959elif test $pkg_failed = untried; then
63960	LCMS_FOUND=no
63961else
63962	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63963	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63965$as_echo "yes" >&6; }
63966	LCMS_FOUND=yes
63967fi
63968    if test "x${LCMS_FOUND}" = "xyes"; then
63969      USE_EXTERNAL_LCMS=true
63970    else
63971      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63972    fi
63973  else
63974    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63975  fi
63976
63977
63978
63979
63980
63981
63982
63983
63984
63985
63986
63987  # Setup libm (the maths library)
63988  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63990$as_echo_n "checking for cos in -lm... " >&6; }
63991if ${ac_cv_lib_m_cos+:} false; then :
63992  $as_echo_n "(cached) " >&6
63993else
63994  ac_check_lib_save_LIBS=$LIBS
63995LIBS="-lm  $LIBS"
63996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63997/* end confdefs.h.  */
63998
63999/* Override any GCC internal prototype to avoid an error.
64000   Use char because int might match the return type of a GCC
64001   builtin and then its argument prototype would still apply.  */
64002#ifdef __cplusplus
64003extern "C"
64004#endif
64005char cos ();
64006int
64007main ()
64008{
64009return cos ();
64010  ;
64011  return 0;
64012}
64013_ACEOF
64014if ac_fn_cxx_try_link "$LINENO"; then :
64015  ac_cv_lib_m_cos=yes
64016else
64017  ac_cv_lib_m_cos=no
64018fi
64019rm -f core conftest.err conftest.$ac_objext \
64020    conftest$ac_exeext conftest.$ac_ext
64021LIBS=$ac_check_lib_save_LIBS
64022fi
64023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64024$as_echo "$ac_cv_lib_m_cos" >&6; }
64025if test "x$ac_cv_lib_m_cos" = xyes; then :
64026  cat >>confdefs.h <<_ACEOF
64027#define HAVE_LIBM 1
64028_ACEOF
64029
64030  LIBS="-lm $LIBS"
64031
64032else
64033
64034        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64035$as_echo "$as_me: Maths library was not found" >&6;}
64036
64037fi
64038
64039    LIBM="-lm"
64040  else
64041    LIBM=""
64042  fi
64043
64044
64045  # Setup libdl (for dynamic library loading)
64046  save_LIBS="$LIBS"
64047  LIBS=""
64048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64049$as_echo_n "checking for dlopen in -ldl... " >&6; }
64050if ${ac_cv_lib_dl_dlopen+:} false; then :
64051  $as_echo_n "(cached) " >&6
64052else
64053  ac_check_lib_save_LIBS=$LIBS
64054LIBS="-ldl  $LIBS"
64055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64056/* end confdefs.h.  */
64057
64058/* Override any GCC internal prototype to avoid an error.
64059   Use char because int might match the return type of a GCC
64060   builtin and then its argument prototype would still apply.  */
64061#ifdef __cplusplus
64062extern "C"
64063#endif
64064char dlopen ();
64065int
64066main ()
64067{
64068return dlopen ();
64069  ;
64070  return 0;
64071}
64072_ACEOF
64073if ac_fn_cxx_try_link "$LINENO"; then :
64074  ac_cv_lib_dl_dlopen=yes
64075else
64076  ac_cv_lib_dl_dlopen=no
64077fi
64078rm -f core conftest.err conftest.$ac_objext \
64079    conftest$ac_exeext conftest.$ac_ext
64080LIBS=$ac_check_lib_save_LIBS
64081fi
64082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64083$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64084if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64085  cat >>confdefs.h <<_ACEOF
64086#define HAVE_LIBDL 1
64087_ACEOF
64088
64089  LIBS="-ldl $LIBS"
64090
64091fi
64092
64093  LIBDL="$LIBS"
64094
64095  LIBS="$save_LIBS"
64096
64097  # Deprecated libraries, keep the flags for backwards compatibility
64098  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64099
64100
64101# Check whether --with-dxsdk was given.
64102if test "${with_dxsdk+set}" = set; then :
64103  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64104$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64105fi
64106
64107
64108
64109
64110# Check whether --with-dxsdk-lib was given.
64111if test "${with_dxsdk_lib+set}" = set; then :
64112  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64113$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64114fi
64115
64116
64117
64118
64119# Check whether --with-dxsdk-include was given.
64120if test "${with_dxsdk_include+set}" = set; then :
64121  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64122$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64123fi
64124
64125
64126  fi
64127
64128  # Control if libzip can use mmap. Available for purposes of overriding.
64129  LIBZIP_CAN_USE_MMAP=true
64130
64131
64132
64133  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64134    # Find the root of the Solaris Studio installation from the compiler path
64135    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64136    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64138$as_echo_n "checking for libstlport.so.1... " >&6; }
64139    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64140      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64141      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64142    fi
64143    if test -f "$STLPORT_LIB"; then
64144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64145$as_echo "yes, $STLPORT_LIB" >&6; }
64146
64147  # Only process if variable expands to non-empty
64148
64149  if test "x$STLPORT_LIB" != x; then
64150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64151
64152  # Input might be given as Windows format, start by converting to
64153  # unix format.
64154  path="$STLPORT_LIB"
64155  new_path=`$CYGPATH -u "$path"`
64156
64157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64160  # "foo.exe" is OK but "foo" is an error.
64161  #
64162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64163  # It is also a way to make sure we got the proper file name for the real test later on.
64164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64165  if test "x$test_shortpath" = x; then
64166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64167$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64168    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64169  fi
64170
64171  # Call helper function which possibly converts this using DOS-style short mode.
64172  # If so, the updated path is stored in $new_path.
64173
64174  input_path="$new_path"
64175  # Check if we need to convert this using DOS-style short mode. If the path
64176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64177  # take no chances and rewrite it.
64178  # Note: m4 eats our [], so we need to use [ and ] instead.
64179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64180  if test "x$has_forbidden_chars" != x; then
64181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64185      # Going to short mode and back again did indeed matter. Since short mode is
64186      # case insensitive, let's make it lowercase to improve readability.
64187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64188      # Now convert it back to Unix-style (cygpath)
64189      input_path=`$CYGPATH -u "$shortmode_path"`
64190      new_path="$input_path"
64191    fi
64192  fi
64193
64194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64195  if test "x$test_cygdrive_prefix" = x; then
64196    # As a simple fix, exclude /usr/bin since it's not a real path.
64197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64199      # a path prefixed by /cygdrive for fixpath to work.
64200      new_path="$CYGWIN_ROOT_PATH$input_path"
64201    fi
64202  fi
64203
64204
64205  if test "x$path" != "x$new_path"; then
64206    STLPORT_LIB="$new_path"
64207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64208$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64209  fi
64210
64211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64212
64213  path="$STLPORT_LIB"
64214  has_colon=`$ECHO $path | $GREP ^.:`
64215  new_path="$path"
64216  if test "x$has_colon" = x; then
64217    # Not in mixed or Windows style, start by that.
64218    new_path=`cmd //c echo $path`
64219  fi
64220
64221
64222  input_path="$new_path"
64223  # Check if we need to convert this using DOS-style short mode. If the path
64224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64225  # take no chances and rewrite it.
64226  # Note: m4 eats our [], so we need to use [ and ] instead.
64227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64228  if test "x$has_forbidden_chars" != x; then
64229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64231  fi
64232
64233
64234  windows_path="$new_path"
64235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64236    unix_path=`$CYGPATH -u "$windows_path"`
64237    new_path="$unix_path"
64238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64240    new_path="$unix_path"
64241  fi
64242
64243  if test "x$path" != "x$new_path"; then
64244    STLPORT_LIB="$new_path"
64245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64246$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64247  fi
64248
64249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64251
64252    else
64253      # We're on a unix platform. Hooray! :)
64254      path="$STLPORT_LIB"
64255      has_space=`$ECHO "$path" | $GREP " "`
64256      if test "x$has_space" != x; then
64257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64258$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64260      fi
64261
64262      # Use eval to expand a potential ~
64263      eval path="$path"
64264      if test ! -f "$path" && test ! -d "$path"; then
64265        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64266      fi
64267
64268      if test -d "$path"; then
64269        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64270      else
64271        dir="`$DIRNAME "$path"`"
64272        base="`$BASENAME "$path"`"
64273        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64274      fi
64275    fi
64276  fi
64277
64278    else
64279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64280$as_echo "no, not found at $STLPORT_LIB" >&6; }
64281      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64282    fi
64283
64284  fi
64285
64286
64287
64288# Check whether --with-libelf was given.
64289if test "${with_libelf+set}" = set; then :
64290  withval=$with_libelf;
64291fi
64292
64293
64294# Check whether --with-libelf-include was given.
64295if test "${with_libelf_include+set}" = set; then :
64296  withval=$with_libelf_include;
64297fi
64298
64299
64300# Check whether --with-libelf-lib was given.
64301if test "${with_libelf_lib+set}" = set; then :
64302  withval=$with_libelf_lib;
64303fi
64304
64305
64306  if test "x$ENABLE_AOT" = xfalse; then
64307    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64308        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64309        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64310      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64311$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64312    fi
64313    LIBELF_CFLAGS=
64314    LIBELF_LIBS=
64315  else
64316    LIBELF_FOUND=no
64317
64318    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64319      ENABLE_AOT="false"
64320      if test "x${enable_aot}" = xyes; then
64321        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64322      fi
64323    else
64324      if test "x${with_libelf}" != x; then
64325        ELF_LIBS="-L${with_libelf}/lib -lelf"
64326        ELF_CFLAGS="-I${with_libelf}/include"
64327        LIBELF_FOUND=yes
64328      fi
64329      if test "x${with_libelf_include}" != x; then
64330        ELF_CFLAGS="-I${with_libelf_include}"
64331        LIBELF_FOUND=yes
64332      fi
64333      if test "x${with_libelf_lib}" != x; then
64334        ELF_LIBS="-L${with_libelf_lib} -lelf"
64335        LIBELF_FOUND=yes
64336      fi
64337      # Do not try pkg-config if we have a sysroot set.
64338      if test "x$SYSROOT" = x; then
64339        if test "x$LIBELF_FOUND" = xno; then
64340          # Figure out ELF_CFLAGS and ELF_LIBS
64341
64342pkg_failed=no
64343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64344$as_echo_n "checking for ELF... " >&6; }
64345
64346if test -n "$ELF_CFLAGS"; then
64347    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64348 elif test -n "$PKG_CONFIG"; then
64349    if test -n "$PKG_CONFIG" && \
64350    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64351  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64352  ac_status=$?
64353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64354  test $ac_status = 0; }; then
64355  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64356else
64357  pkg_failed=yes
64358fi
64359 else
64360    pkg_failed=untried
64361fi
64362if test -n "$ELF_LIBS"; then
64363    pkg_cv_ELF_LIBS="$ELF_LIBS"
64364 elif test -n "$PKG_CONFIG"; then
64365    if test -n "$PKG_CONFIG" && \
64366    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64367  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64368  ac_status=$?
64369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64370  test $ac_status = 0; }; then
64371  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64372else
64373  pkg_failed=yes
64374fi
64375 else
64376    pkg_failed=untried
64377fi
64378
64379
64380
64381if test $pkg_failed = yes; then
64382
64383if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64384        _pkg_short_errors_supported=yes
64385else
64386        _pkg_short_errors_supported=no
64387fi
64388        if test $_pkg_short_errors_supported = yes; then
64389	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64390        else
64391	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64392        fi
64393	# Put the nasty error message in config.log where it belongs
64394	echo "$ELF_PKG_ERRORS" >&5
64395
64396	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64397$as_echo "no" >&6; }
64398                LIBELF_FOUND=no
64399elif test $pkg_failed = untried; then
64400	LIBELF_FOUND=no
64401else
64402	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64403	ELF_LIBS=$pkg_cv_ELF_LIBS
64404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64405$as_echo "yes" >&6; }
64406	LIBELF_FOUND=yes
64407fi
64408        fi
64409      fi
64410      if test "x$LIBELF_FOUND" = xno; then
64411        for ac_header in libelf.h
64412do :
64413  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64414if test "x$ac_cv_header_libelf_h" = xyes; then :
64415  cat >>confdefs.h <<_ACEOF
64416#define HAVE_LIBELF_H 1
64417_ACEOF
64418
64419              LIBELF_FOUND=yes
64420              ELF_CFLAGS=
64421              ELF_LIBS=-lelf
64422
64423else
64424  LIBELF_FOUND=no
64425
64426fi
64427
64428done
64429
64430      fi
64431      if test "x$LIBELF_FOUND" = xno; then
64432        ENABLE_AOT="false"
64433
64434  # Print a helpful message on how to acquire the necessary build dependency.
64435  # elf is the help tag: freetype, cups, alsa etc
64436  MISSING_DEPENDENCY=elf
64437
64438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64439    cygwin_help $MISSING_DEPENDENCY
64440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64441    msys_help $MISSING_DEPENDENCY
64442  else
64443    PKGHANDLER_COMMAND=
64444
64445    case $PKGHANDLER in
64446      apt-get)
64447        apt_help     $MISSING_DEPENDENCY ;;
64448      yum)
64449        yum_help     $MISSING_DEPENDENCY ;;
64450      brew)
64451        brew_help    $MISSING_DEPENDENCY ;;
64452      port)
64453        port_help    $MISSING_DEPENDENCY ;;
64454      pkgutil)
64455        pkgutil_help $MISSING_DEPENDENCY ;;
64456      pkgadd)
64457        pkgadd_help  $MISSING_DEPENDENCY ;;
64458    esac
64459
64460    if test "x$PKGHANDLER_COMMAND" != x; then
64461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64462    fi
64463  fi
64464
64465        if test "x${enable_aot}" = xyes; then
64466          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64467        else
64468          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64469$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64470        fi
64471      else
64472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64473$as_echo_n "checking if libelf works... " >&6; }
64474        ac_ext=c
64475ac_cpp='$CPP $CPPFLAGS'
64476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64478ac_compiler_gnu=$ac_cv_c_compiler_gnu
64479
64480        OLD_CFLAGS="$CFLAGS"
64481        CFLAGS="$CFLAGS $ELF_CFLAGS"
64482        OLD_LIBS="$LIBS"
64483        LIBS="$LIBS $ELF_LIBS"
64484        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64485/* end confdefs.h.  */
64486#include <libelf.h>
64487int
64488main ()
64489{
64490
64491              elf_version(0);
64492              return 0;
64493
64494  ;
64495  return 0;
64496}
64497_ACEOF
64498if ac_fn_c_try_link "$LINENO"; then :
64499  LIBELF_WORKS=yes
64500else
64501  LIBELF_WORKS=no
64502
64503fi
64504rm -f core conftest.err conftest.$ac_objext \
64505    conftest$ac_exeext conftest.$ac_ext
64506        CFLAGS="$OLD_CFLAGS"
64507        LIBS="$OLD_LIBS"
64508        ac_ext=cpp
64509ac_cpp='$CXXCPP $CPPFLAGS'
64510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64513
64514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64515$as_echo "$LIBELF_WORKS" >&6; }
64516
64517        if test "x$LIBELF_WORKS" = xno; then
64518          ENABLE_AOT="false"
64519
64520  # Print a helpful message on how to acquire the necessary build dependency.
64521  # elf is the help tag: freetype, cups, alsa etc
64522  MISSING_DEPENDENCY=elf
64523
64524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64525    cygwin_help $MISSING_DEPENDENCY
64526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64527    msys_help $MISSING_DEPENDENCY
64528  else
64529    PKGHANDLER_COMMAND=
64530
64531    case $PKGHANDLER in
64532      apt-get)
64533        apt_help     $MISSING_DEPENDENCY ;;
64534      yum)
64535        yum_help     $MISSING_DEPENDENCY ;;
64536      brew)
64537        brew_help    $MISSING_DEPENDENCY ;;
64538      port)
64539        port_help    $MISSING_DEPENDENCY ;;
64540      pkgutil)
64541        pkgutil_help $MISSING_DEPENDENCY ;;
64542      pkgadd)
64543        pkgadd_help  $MISSING_DEPENDENCY ;;
64544    esac
64545
64546    if test "x$PKGHANDLER_COMMAND" != x; then
64547      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64548    fi
64549  fi
64550
64551          if test "x$enable_aot" = "xyes"; then
64552            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64553          else
64554            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64555$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64556          fi
64557        fi
64558      fi
64559    fi
64560  fi
64561
64562
64563
64564
64565
64566
64567
64568
64569
64570
64571
64572
64573
64574
64575
64576
64577
64578
64579# Hotspot setup depends on lib checks (AOT needs libelf).
64580
64581
64582  # The user can in some cases supply additional jvm features. For the custom
64583  # variant, this defines the entire variant.
64584
64585# Check whether --with-jvm-features was given.
64586if test "${with_jvm_features+set}" = set; then :
64587  withval=$with_jvm_features;
64588fi
64589
64590  if test "x$with_jvm_features" != x; then
64591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64592$as_echo_n "checking additional JVM features... " >&6; }
64593    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64595$as_echo "$JVM_FEATURES" >&6; }
64596  fi
64597
64598  # Override hotspot cpu definitions for ARM platforms
64599  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64600    HOTSPOT_TARGET_CPU=arm_32
64601    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64602    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64603    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64604  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64605    HOTSPOT_TARGET_CPU=arm_64
64606    HOTSPOT_TARGET_CPU_ARCH=arm
64607    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64608    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64609  fi
64610
64611  # Verify that dependencies are met for explicitly set features.
64612  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64613    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64614  fi
64615
64616  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64617    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64618  fi
64619
64620  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64621    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64622  fi
64623
64624  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64625    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64626  fi
64627
64628  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64629    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64630  fi
64631
64632  # Turn on additional features based on other parts of configure
64633  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64634    JVM_FEATURES="$JVM_FEATURES dtrace"
64635  else
64636    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64637      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64638    fi
64639  fi
64640
64641  if test "x$STATIC_BUILD" = "xtrue"; then
64642    JVM_FEATURES="$JVM_FEATURES static-build"
64643  else
64644    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64645      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64646    fi
64647  fi
64648
64649  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64650    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64651      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64652    fi
64653  fi
64654
64655  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64656    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64657      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64658    fi
64659  fi
64660
64661  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64662  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64663     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64664     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64665    JVM_FEATURES_jvmci="jvmci"
64666  else
64667    JVM_FEATURES_jvmci=""
64668  fi
64669
64670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64671$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64672  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64674$as_echo "yes, forced" >&6; }
64675    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64676      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64677    fi
64678    INCLUDE_GRAAL="true"
64679  else
64680    # By default enable graal build where AOT is available
64681    if test "x$ENABLE_AOT" = "xtrue"; then
64682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64683$as_echo "yes" >&6; }
64684      JVM_FEATURES_graal="graal"
64685      INCLUDE_GRAAL="true"
64686    else
64687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64688$as_echo "no" >&6; }
64689      JVM_FEATURES_graal=""
64690      INCLUDE_GRAAL="false"
64691    fi
64692  fi
64693
64694
64695
64696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64697$as_echo_n "checking if aot should be enabled... " >&6; }
64698  if test "x$ENABLE_AOT" = "xtrue"; then
64699    if test "x$enable_aot" = "xyes"; then
64700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64701$as_echo "yes, forced" >&6; }
64702    else
64703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64704$as_echo "yes" >&6; }
64705    fi
64706    JVM_FEATURES_aot="aot"
64707  else
64708    if test "x$enable_aot" = "xno"; then
64709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64710$as_echo "no, forced" >&6; }
64711    else
64712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64713$as_echo "no" >&6; }
64714    fi
64715    JVM_FEATURES_aot=""
64716  fi
64717
64718  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64719    # Default to use link time optimizations on minimal on arm
64720    JVM_FEATURES_link_time_opt="link-time-opt"
64721  else
64722    JVM_FEATURES_link_time_opt=""
64723  fi
64724
64725  # All variants but minimal (and custom) get these features
64726  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64727
64728  # Enable features depending on variant.
64729  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64730  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64731  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64732  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64733  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64734  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64735  JVM_FEATURES_custom="$JVM_FEATURES"
64736
64737
64738
64739
64740
64741
64742
64743
64744
64745  # Used for verification of Makefiles by check-jvm-feature
64746
64747
64748  # We don't support --with-jvm-interpreter anymore, use zero instead.
64749
64750
64751# Check whether --with-jvm-interpreter was given.
64752if test "${with_jvm_interpreter+set}" = set; then :
64753  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64754$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64755fi
64756
64757
64758
64759
64760###############################################################################
64761#
64762# We need to do some final tweaking, when everything else is done.
64763#
64764###############################################################################
64765
64766
64767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64768$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64769
64770  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64771    ENABLE_INTREE_EC=yes
64772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64773$as_echo "yes" >&6; }
64774  else
64775    ENABLE_INTREE_EC=no
64776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64777$as_echo "no" >&6; }
64778  fi
64779
64780
64781
64782
64783  # Check whether --enable-jtreg-failure-handler was given.
64784if test "${enable_jtreg_failure_handler+set}" = set; then :
64785  enableval=$enable_jtreg_failure_handler;
64786fi
64787
64788
64789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64790$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64791
64792  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64793    if test "x$JT_HOME" = "x"; then
64794      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64795    else
64796      BUILD_FAILURE_HANDLER=true
64797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64798$as_echo "yes, forced" >&6; }
64799    fi
64800  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64801    BUILD_FAILURE_HANDLER=false
64802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64803$as_echo "no, forced" >&6; }
64804  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64805      || test "x$enable_jtreg_failure_handler" = "x"; then
64806    if test "x$JT_HOME" = "x"; then
64807      BUILD_FAILURE_HANDLER=false
64808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64809$as_echo "no, missing jtreg" >&6; }
64810    else
64811      BUILD_FAILURE_HANDLER=true
64812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64813$as_echo "yes, jtreg present" >&6; }
64814    fi
64815  else
64816    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64817  fi
64818
64819
64820
64821
64822  # Check whether --enable-generate-classlist was given.
64823if test "${enable_generate_classlist+set}" = set; then :
64824  enableval=$enable_generate_classlist;
64825fi
64826
64827
64828  # Check if it's likely that it's possible to generate the classlist. Depending
64829  # on exact jvm configuration it could be possible anyway.
64830  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64831    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64832  else
64833    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64834  fi
64835
64836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64837$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64838  if test "x$enable_generate_classlist" = "xyes"; then
64839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64840$as_echo "yes, forced" >&6; }
64841    ENABLE_GENERATE_CLASSLIST="true"
64842    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64843      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64844$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64845    fi
64846  elif test "x$enable_generate_classlist" = "xno"; then
64847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64848$as_echo "no, forced" >&6; }
64849    ENABLE_GENERATE_CLASSLIST="false"
64850  elif test "x$enable_generate_classlist" = "x"; then
64851    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64853$as_echo "yes" >&6; }
64854      ENABLE_GENERATE_CLASSLIST="true"
64855    else
64856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64857$as_echo "no" >&6; }
64858      ENABLE_GENERATE_CLASSLIST="false"
64859    fi
64860  else
64861    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64862  fi
64863
64864
64865
64866
64867###############################################################################
64868#
64869# Configure parts of the build that only affect the build performance,
64870# not the result.
64871#
64872###############################################################################
64873
64874
64875  # How many cores do we have on this build system?
64876
64877# Check whether --with-num-cores was given.
64878if test "${with_num_cores+set}" = set; then :
64879  withval=$with_num_cores;
64880fi
64881
64882  if test "x$with_num_cores" = x; then
64883    # The number of cores were not specified, try to probe them.
64884
64885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64886$as_echo_n "checking for number of cores... " >&6; }
64887  NUM_CORES=1
64888  FOUND_CORES=no
64889
64890  if test -f /proc/cpuinfo; then
64891    # Looks like a Linux (or cygwin) system
64892    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64893    FOUND_CORES=yes
64894  elif test -x /usr/sbin/psrinfo; then
64895    # Looks like a Solaris system
64896    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64897    FOUND_CORES=yes
64898  elif test -x /usr/sbin/sysctl; then
64899    # Looks like a MacOSX system
64900    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64901    FOUND_CORES=yes
64902  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64903    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64904    FOUND_CORES=yes
64905  elif test -n "$NUMBER_OF_PROCESSORS"; then
64906    # On windows, look in the env
64907    NUM_CORES=$NUMBER_OF_PROCESSORS
64908    FOUND_CORES=yes
64909  fi
64910
64911  if test "x$FOUND_CORES" = xyes; then
64912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64913$as_echo "$NUM_CORES" >&6; }
64914  else
64915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64916$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64917    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64918$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64919  fi
64920
64921  else
64922    NUM_CORES=$with_num_cores
64923  fi
64924
64925
64926
64927  # How much memory do we have on this build system?
64928
64929# Check whether --with-memory-size was given.
64930if test "${with_memory_size+set}" = set; then :
64931  withval=$with_memory_size;
64932fi
64933
64934  if test "x$with_memory_size" = x; then
64935    # The memory size was not specified, try to probe it.
64936
64937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64938$as_echo_n "checking for memory size... " >&6; }
64939  # Default to 1024 MB
64940  MEMORY_SIZE=1024
64941  FOUND_MEM=no
64942
64943  if test -f /proc/meminfo; then
64944    # Looks like a Linux (or cygwin) system
64945    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64946    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64947    FOUND_MEM=yes
64948  elif test -x /usr/sbin/prtconf; then
64949    # Looks like a Solaris or AIX system
64950    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64951    FOUND_MEM=yes
64952  elif test -x /usr/sbin/sysctl; then
64953    # Looks like a MacOSX system
64954    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64955    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64956    FOUND_MEM=yes
64957  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64958    # Windows, but without cygwin
64959    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64960    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64961    FOUND_MEM=yes
64962  fi
64963
64964  if test "x$FOUND_MEM" = xyes; then
64965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64966$as_echo "$MEMORY_SIZE MB" >&6; }
64967  else
64968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64969$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64970    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64971$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64972  fi
64973
64974  else
64975    MEMORY_SIZE=$with_memory_size
64976  fi
64977
64978
64979
64980  # Provide a decent default number of parallel jobs for make depending on
64981  # number of cores, amount of memory and machine architecture.
64982
64983# Check whether --with-jobs was given.
64984if test "${with_jobs+set}" = set; then :
64985  withval=$with_jobs;
64986fi
64987
64988  if test "x$with_jobs" = x; then
64989    # Number of jobs was not specified, calculate.
64990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64991$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64992    # Approximate memory in GB.
64993    memory_gb=`expr $MEMORY_SIZE / 1024`
64994    # Pick the lowest of memory in gb and number of cores.
64995    if test "$memory_gb" -lt "$NUM_CORES"; then
64996      JOBS="$memory_gb"
64997    else
64998      JOBS="$NUM_CORES"
64999    fi
65000    if test "$JOBS" -eq "0"; then
65001      JOBS=1
65002    fi
65003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65004$as_echo "$JOBS" >&6; }
65005  else
65006    JOBS=$with_jobs
65007  fi
65008
65009
65010
65011  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65012
65013# Check whether --with-test-jobs was given.
65014if test "${with_test_jobs+set}" = set; then :
65015  withval=$with_test_jobs;
65016fi
65017
65018  if test "x$with_test_jobs" = x; then
65019      TEST_JOBS=0
65020  else
65021      TEST_JOBS=$with_test_jobs
65022  fi
65023
65024
65025
65026# Setup arguments for the boot jdk (after cores and memory have been setup)
65027
65028  ##############################################################################
65029  #
65030  # Specify jvm options for anything that is run with the Boot JDK.
65031  # Not all JVM:s accept the same arguments on the command line.
65032  #
65033
65034# Check whether --with-boot-jdk-jvmargs was given.
65035if test "${with_boot_jdk_jvmargs+set}" = set; then :
65036  withval=$with_boot_jdk_jvmargs;
65037fi
65038
65039
65040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65041$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65042
65043  # Disable special log output when a debug build is used as Boot JDK...
65044
65045  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65046  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65047  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65048  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65049  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65050  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65051    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65052    JVM_ARG_OK=true
65053  else
65054    $ECHO "Arg failed:" >&5
65055    $ECHO "$OUTPUT" >&5
65056    JVM_ARG_OK=false
65057  fi
65058
65059
65060  # Force en-US environment
65061
65062  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65063  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65064  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65065  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65066  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65067  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65068    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65069    JVM_ARG_OK=true
65070  else
65071    $ECHO "Arg failed:" >&5
65072    $ECHO "$OUTPUT" >&5
65073    JVM_ARG_OK=false
65074  fi
65075
65076
65077  # Apply user provided options.
65078
65079  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65080  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65081  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65082  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65083  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65084  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65085    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65086    JVM_ARG_OK=true
65087  else
65088    $ECHO "Arg failed:" >&5
65089    $ECHO "$OUTPUT" >&5
65090    JVM_ARG_OK=false
65091  fi
65092
65093
65094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65095$as_echo "$boot_jdk_jvmargs" >&6; }
65096
65097  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65098  JAVA_FLAGS=$boot_jdk_jvmargs
65099
65100
65101
65102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65103$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65104
65105  # Starting amount of heap memory.
65106
65107  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65108  $ECHO "Command: $JAVA -Xms64M -version" >&5
65109  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65110  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65111  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65113    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65114    JVM_ARG_OK=true
65115  else
65116    $ECHO "Arg failed:" >&5
65117    $ECHO "$OUTPUT" >&5
65118    JVM_ARG_OK=false
65119  fi
65120
65121  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65122
65123  # Maximum amount of heap memory and stack size.
65124  JVM_HEAP_LIMIT_32="1024"
65125  # Running a 64 bit JVM allows for and requires a bigger heap
65126  JVM_HEAP_LIMIT_64="1600"
65127  STACK_SIZE_32=768
65128  STACK_SIZE_64=1536
65129  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65130  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65131    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65132  fi
65133  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65134    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65135  fi
65136  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65137    JVM_HEAP_LIMIT_32=512
65138    JVM_HEAP_LIMIT_64=512
65139  fi
65140
65141  if test "x$BOOT_JDK_BITS" = "x32"; then
65142    STACK_SIZE=$STACK_SIZE_32
65143    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65144  else
65145    STACK_SIZE=$STACK_SIZE_64
65146    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65147  fi
65148
65149  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65150  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65151  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65152  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65153  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65155    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65156    JVM_ARG_OK=true
65157  else
65158    $ECHO "Arg failed:" >&5
65159    $ECHO "$OUTPUT" >&5
65160    JVM_ARG_OK=false
65161  fi
65162
65163
65164  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65165  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65166  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65167  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65168  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65169  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65170    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65171    JVM_ARG_OK=true
65172  else
65173    $ECHO "Arg failed:" >&5
65174    $ECHO "$OUTPUT" >&5
65175    JVM_ARG_OK=false
65176  fi
65177
65178
65179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65180$as_echo "$boot_jdk_jvmargs_big" >&6; }
65181
65182  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65183
65184
65185  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65186    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65187    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65188  else
65189    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65190    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65191  fi
65192  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65193  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65195$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65197$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65198
65199
65200  # By default, the main javac compilations use big
65201  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65202
65203
65204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65205$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65206
65207  # Use serial gc for small short lived tools if possible
65208
65209  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65210  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65211  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65212  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65213  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65214  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65215    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65216    JVM_ARG_OK=true
65217  else
65218    $ECHO "Arg failed:" >&5
65219    $ECHO "$OUTPUT" >&5
65220    JVM_ARG_OK=false
65221  fi
65222
65223
65224  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65225  $ECHO "Command: $JAVA -Xms32M -version" >&5
65226  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65227  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65228  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65229  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65230    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65231    JVM_ARG_OK=true
65232  else
65233    $ECHO "Arg failed:" >&5
65234    $ECHO "$OUTPUT" >&5
65235    JVM_ARG_OK=false
65236  fi
65237
65238
65239  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65240  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65241  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65242  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65243  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65244  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65245    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65246    JVM_ARG_OK=true
65247  else
65248    $ECHO "Arg failed:" >&5
65249    $ECHO "$OUTPUT" >&5
65250    JVM_ARG_OK=false
65251  fi
65252
65253
65254  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65255  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65256  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65257  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65258  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65259  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65260    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65261    JVM_ARG_OK=true
65262  else
65263    $ECHO "Arg failed:" >&5
65264    $ECHO "$OUTPUT" >&5
65265    JVM_ARG_OK=false
65266  fi
65267
65268
65269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65270$as_echo "$boot_jdk_jvmargs_small" >&6; }
65271
65272  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65273
65274
65275  JAVA_TOOL_FLAGS_SMALL=""
65276  for f in $JAVA_FLAGS_SMALL; do
65277    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65278  done
65279
65280
65281
65282# Setup smart javac (after cores and memory have been setup)
65283
65284
65285# Check whether --with-sjavac-server-java was given.
65286if test "${with_sjavac_server_java+set}" = set; then :
65287  withval=$with_sjavac_server_java;
65288fi
65289
65290
65291  if test "x$with_sjavac_server_java" != x; then
65292    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65293    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65294    if test "x$FOUND_VERSION" = x; then
65295      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65296    fi
65297  else
65298    SJAVAC_SERVER_JAVA="$JAVA"
65299  fi
65300
65301
65302  if test "$MEMORY_SIZE" -gt "3000"; then
65303
65304  $ECHO "Check if jvm arg is ok: -d64" >&5
65305  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65306  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65307  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65308  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65309  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65310    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65311    JVM_ARG_OK=true
65312  else
65313    $ECHO "Arg failed:" >&5
65314    $ECHO "$OUTPUT" >&5
65315    JVM_ARG_OK=false
65316  fi
65317
65318    if test "$JVM_ARG_OK" = true; then
65319      JVM_64BIT=true
65320      JVM_ARG_OK=false
65321    fi
65322  fi
65323
65324  MX_VALUE=`expr $MEMORY_SIZE / 2`
65325  if test "$JVM_64BIT" = true; then
65326    # Set ms lower than mx since more than one instance of the server might
65327    # get launched at the same time before they figure out which instance won.
65328    MS_VALUE=512
65329    if test "$MX_VALUE" -gt "2048"; then
65330      MX_VALUE=2048
65331    fi
65332  else
65333    MS_VALUE=256
65334    if test "$MX_VALUE" -gt "1500"; then
65335      MX_VALUE=1500
65336    fi
65337  fi
65338  if test "$MX_VALUE" -lt "512"; then
65339    MX_VALUE=512
65340  fi
65341
65342  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65343  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65344  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65345  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65346  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65347  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65348    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65349    JVM_ARG_OK=true
65350  else
65351    $ECHO "Arg failed:" >&5
65352    $ECHO "$OUTPUT" >&5
65353    JVM_ARG_OK=false
65354  fi
65355
65356
65357
65358  # Check whether --enable-sjavac was given.
65359if test "${enable_sjavac+set}" = set; then :
65360  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65361else
65362  ENABLE_SJAVAC="no"
65363fi
65364
65365  if test "x$JVM_ARG_OK" = "xfalse"; then
65366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65367$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65368    ENABLE_SJAVAC="no"
65369  fi
65370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65371$as_echo_n "checking whether to use sjavac... " >&6; }
65372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65373$as_echo "$ENABLE_SJAVAC" >&6; }
65374
65375
65376  # Check whether --enable-javac-server was given.
65377if test "${enable_javac_server+set}" = set; then :
65378  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65379else
65380  ENABLE_JAVAC_SERVER="yes"
65381fi
65382
65383  if test "x$JVM_ARG_OK" = "xfalse"; then
65384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65385$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65386    ENABLE_JAVAC_SERVER="no"
65387  fi
65388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65389$as_echo_n "checking whether to use javac server... " >&6; }
65390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65391$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65392
65393
65394  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65395    # When using a server javac, the small client instances do not need much
65396    # resources.
65397    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65398  fi
65399
65400
65401# Setup use of icecc if requested
65402
65403  # Check whether --enable-icecc was given.
65404if test "${enable_icecc+set}" = set; then :
65405  enableval=$enable_icecc;
65406fi
65407
65408
65409  if test "x${enable_icecc}" = "xyes"; then
65410
65411
65412
65413  # Publish this variable in the help.
65414
65415
65416  if [ -z "${ICECC_CMD+x}" ]; then
65417    # The variable is not set by user, try to locate tool using the code snippet
65418    for ac_prog in icecc
65419do
65420  # Extract the first word of "$ac_prog", so it can be a program name with args.
65421set dummy $ac_prog; ac_word=$2
65422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65423$as_echo_n "checking for $ac_word... " >&6; }
65424if ${ac_cv_path_ICECC_CMD+:} false; then :
65425  $as_echo_n "(cached) " >&6
65426else
65427  case $ICECC_CMD in
65428  [\\/]* | ?:[\\/]*)
65429  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65430  ;;
65431  *)
65432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65433for as_dir in $PATH
65434do
65435  IFS=$as_save_IFS
65436  test -z "$as_dir" && as_dir=.
65437    for ac_exec_ext in '' $ac_executable_extensions; do
65438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65439    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65441    break 2
65442  fi
65443done
65444  done
65445IFS=$as_save_IFS
65446
65447  ;;
65448esac
65449fi
65450ICECC_CMD=$ac_cv_path_ICECC_CMD
65451if test -n "$ICECC_CMD"; then
65452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65453$as_echo "$ICECC_CMD" >&6; }
65454else
65455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65456$as_echo "no" >&6; }
65457fi
65458
65459
65460  test -n "$ICECC_CMD" && break
65461done
65462
65463  else
65464    # The variable is set, but is it from the command line or the environment?
65465
65466    # Try to remove the string !ICECC_CMD! from our list.
65467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65469      # If it failed, the variable was not from the command line. Ignore it,
65470      # but warn the user (except for BASH, which is always set by the calling BASH).
65471      if test "xICECC_CMD" != xBASH; then
65472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65473$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65474      fi
65475      # Try to locate tool using the code snippet
65476      for ac_prog in icecc
65477do
65478  # Extract the first word of "$ac_prog", so it can be a program name with args.
65479set dummy $ac_prog; ac_word=$2
65480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65481$as_echo_n "checking for $ac_word... " >&6; }
65482if ${ac_cv_path_ICECC_CMD+:} false; then :
65483  $as_echo_n "(cached) " >&6
65484else
65485  case $ICECC_CMD in
65486  [\\/]* | ?:[\\/]*)
65487  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65488  ;;
65489  *)
65490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65491for as_dir in $PATH
65492do
65493  IFS=$as_save_IFS
65494  test -z "$as_dir" && as_dir=.
65495    for ac_exec_ext in '' $ac_executable_extensions; do
65496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65497    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65499    break 2
65500  fi
65501done
65502  done
65503IFS=$as_save_IFS
65504
65505  ;;
65506esac
65507fi
65508ICECC_CMD=$ac_cv_path_ICECC_CMD
65509if test -n "$ICECC_CMD"; then
65510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65511$as_echo "$ICECC_CMD" >&6; }
65512else
65513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65514$as_echo "no" >&6; }
65515fi
65516
65517
65518  test -n "$ICECC_CMD" && break
65519done
65520
65521    else
65522      # If it succeeded, then it was overridden by the user. We will use it
65523      # for the tool.
65524
65525      # First remove it from the list of overridden variables, so we can test
65526      # for unknown variables in the end.
65527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65528
65529      # Check if we try to supply an empty value
65530      if test "x$ICECC_CMD" = x; then
65531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65532$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65534$as_echo_n "checking for ICECC_CMD... " >&6; }
65535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65536$as_echo "disabled" >&6; }
65537      else
65538        # Check if the provided tool contains a complete path.
65539        tool_specified="$ICECC_CMD"
65540        tool_basename="${tool_specified##*/}"
65541        if test "x$tool_basename" = "x$tool_specified"; then
65542          # A command without a complete path is provided, search $PATH.
65543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65544$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65545          # Extract the first word of "$tool_basename", so it can be a program name with args.
65546set dummy $tool_basename; ac_word=$2
65547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65548$as_echo_n "checking for $ac_word... " >&6; }
65549if ${ac_cv_path_ICECC_CMD+:} false; then :
65550  $as_echo_n "(cached) " >&6
65551else
65552  case $ICECC_CMD in
65553  [\\/]* | ?:[\\/]*)
65554  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65555  ;;
65556  *)
65557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65558for as_dir in $PATH
65559do
65560  IFS=$as_save_IFS
65561  test -z "$as_dir" && as_dir=.
65562    for ac_exec_ext in '' $ac_executable_extensions; do
65563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65564    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65566    break 2
65567  fi
65568done
65569  done
65570IFS=$as_save_IFS
65571
65572  ;;
65573esac
65574fi
65575ICECC_CMD=$ac_cv_path_ICECC_CMD
65576if test -n "$ICECC_CMD"; then
65577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65578$as_echo "$ICECC_CMD" >&6; }
65579else
65580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65581$as_echo "no" >&6; }
65582fi
65583
65584
65585          if test "x$ICECC_CMD" = x; then
65586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65587          fi
65588        else
65589          # Otherwise we believe it is a complete path. Use it as it is.
65590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65591$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65593$as_echo_n "checking for ICECC_CMD... " >&6; }
65594          if test ! -x "$tool_specified"; then
65595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65596$as_echo "not found" >&6; }
65597            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65598          fi
65599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65600$as_echo "$tool_specified" >&6; }
65601        fi
65602      fi
65603    fi
65604
65605  fi
65606
65607
65608
65609  if test "x$ICECC_CMD" = x; then
65610    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65611  fi
65612
65613
65614    old_path="$PATH"
65615
65616    # Look for icecc-create-env in some known places
65617    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65618
65619
65620
65621  # Publish this variable in the help.
65622
65623
65624  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65625    # The variable is not set by user, try to locate tool using the code snippet
65626    for ac_prog in icecc-create-env
65627do
65628  # Extract the first word of "$ac_prog", so it can be a program name with args.
65629set dummy $ac_prog; ac_word=$2
65630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65631$as_echo_n "checking for $ac_word... " >&6; }
65632if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65633  $as_echo_n "(cached) " >&6
65634else
65635  case $ICECC_CREATE_ENV in
65636  [\\/]* | ?:[\\/]*)
65637  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65638  ;;
65639  *)
65640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65641for as_dir in $PATH
65642do
65643  IFS=$as_save_IFS
65644  test -z "$as_dir" && as_dir=.
65645    for ac_exec_ext in '' $ac_executable_extensions; do
65646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65647    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65649    break 2
65650  fi
65651done
65652  done
65653IFS=$as_save_IFS
65654
65655  ;;
65656esac
65657fi
65658ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65659if test -n "$ICECC_CREATE_ENV"; then
65660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65661$as_echo "$ICECC_CREATE_ENV" >&6; }
65662else
65663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65664$as_echo "no" >&6; }
65665fi
65666
65667
65668  test -n "$ICECC_CREATE_ENV" && break
65669done
65670
65671  else
65672    # The variable is set, but is it from the command line or the environment?
65673
65674    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65677      # If it failed, the variable was not from the command line. Ignore it,
65678      # but warn the user (except for BASH, which is always set by the calling BASH).
65679      if test "xICECC_CREATE_ENV" != xBASH; then
65680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65681$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65682      fi
65683      # Try to locate tool using the code snippet
65684      for ac_prog in icecc-create-env
65685do
65686  # Extract the first word of "$ac_prog", so it can be a program name with args.
65687set dummy $ac_prog; ac_word=$2
65688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65689$as_echo_n "checking for $ac_word... " >&6; }
65690if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65691  $as_echo_n "(cached) " >&6
65692else
65693  case $ICECC_CREATE_ENV in
65694  [\\/]* | ?:[\\/]*)
65695  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65696  ;;
65697  *)
65698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65699for as_dir in $PATH
65700do
65701  IFS=$as_save_IFS
65702  test -z "$as_dir" && as_dir=.
65703    for ac_exec_ext in '' $ac_executable_extensions; do
65704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65705    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65707    break 2
65708  fi
65709done
65710  done
65711IFS=$as_save_IFS
65712
65713  ;;
65714esac
65715fi
65716ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65717if test -n "$ICECC_CREATE_ENV"; then
65718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65719$as_echo "$ICECC_CREATE_ENV" >&6; }
65720else
65721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65722$as_echo "no" >&6; }
65723fi
65724
65725
65726  test -n "$ICECC_CREATE_ENV" && break
65727done
65728
65729    else
65730      # If it succeeded, then it was overridden by the user. We will use it
65731      # for the tool.
65732
65733      # First remove it from the list of overridden variables, so we can test
65734      # for unknown variables in the end.
65735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65736
65737      # Check if we try to supply an empty value
65738      if test "x$ICECC_CREATE_ENV" = x; then
65739        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65740$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65742$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65744$as_echo "disabled" >&6; }
65745      else
65746        # Check if the provided tool contains a complete path.
65747        tool_specified="$ICECC_CREATE_ENV"
65748        tool_basename="${tool_specified##*/}"
65749        if test "x$tool_basename" = "x$tool_specified"; then
65750          # A command without a complete path is provided, search $PATH.
65751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65752$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65753          # Extract the first word of "$tool_basename", so it can be a program name with args.
65754set dummy $tool_basename; ac_word=$2
65755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65756$as_echo_n "checking for $ac_word... " >&6; }
65757if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65758  $as_echo_n "(cached) " >&6
65759else
65760  case $ICECC_CREATE_ENV in
65761  [\\/]* | ?:[\\/]*)
65762  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65763  ;;
65764  *)
65765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65766for as_dir in $PATH
65767do
65768  IFS=$as_save_IFS
65769  test -z "$as_dir" && as_dir=.
65770    for ac_exec_ext in '' $ac_executable_extensions; do
65771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65772    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65774    break 2
65775  fi
65776done
65777  done
65778IFS=$as_save_IFS
65779
65780  ;;
65781esac
65782fi
65783ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65784if test -n "$ICECC_CREATE_ENV"; then
65785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65786$as_echo "$ICECC_CREATE_ENV" >&6; }
65787else
65788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65789$as_echo "no" >&6; }
65790fi
65791
65792
65793          if test "x$ICECC_CREATE_ENV" = x; then
65794            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65795          fi
65796        else
65797          # Otherwise we believe it is a complete path. Use it as it is.
65798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65799$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65800          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65801$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65802          if test ! -x "$tool_specified"; then
65803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65804$as_echo "not found" >&6; }
65805            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65806          fi
65807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65808$as_echo "$tool_specified" >&6; }
65809        fi
65810      fi
65811    fi
65812
65813  fi
65814
65815
65816
65817  if test "x$ICECC_CREATE_ENV" = x; then
65818    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65819  fi
65820
65821
65822    # Use icecc-create-env to create a minimal compilation environment that can
65823    # be sent to the other hosts in the icecream cluster.
65824    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65825    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65826    # Older versions of icecc does not have the --gcc parameter
65827    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65828      icecc_gcc_arg="--gcc"
65829    fi
65830    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65831
65832  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65833      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65834          ${icecc_create_env_log} 2>&1 )
65835  if test "$?" != "0"; then
65836    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65837$as_echo "$as_me: icecc-create-env output:" >&6;}
65838    cat \
65839          ${icecc_create_env_log}
65840    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65841  fi
65842
65843    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65844      # For clang, the icecc compilerwrapper is needed. It usually resides next
65845      # to icecc-create-env.
65846
65847
65848
65849  # Publish this variable in the help.
65850
65851
65852  if [ -z "${ICECC_WRAPPER+x}" ]; then
65853    # The variable is not set by user, try to locate tool using the code snippet
65854    for ac_prog in compilerwrapper
65855do
65856  # Extract the first word of "$ac_prog", so it can be a program name with args.
65857set dummy $ac_prog; ac_word=$2
65858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65859$as_echo_n "checking for $ac_word... " >&6; }
65860if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65861  $as_echo_n "(cached) " >&6
65862else
65863  case $ICECC_WRAPPER in
65864  [\\/]* | ?:[\\/]*)
65865  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65866  ;;
65867  *)
65868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65869for as_dir in $PATH
65870do
65871  IFS=$as_save_IFS
65872  test -z "$as_dir" && as_dir=.
65873    for ac_exec_ext in '' $ac_executable_extensions; do
65874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65875    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65877    break 2
65878  fi
65879done
65880  done
65881IFS=$as_save_IFS
65882
65883  ;;
65884esac
65885fi
65886ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65887if test -n "$ICECC_WRAPPER"; then
65888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65889$as_echo "$ICECC_WRAPPER" >&6; }
65890else
65891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65892$as_echo "no" >&6; }
65893fi
65894
65895
65896  test -n "$ICECC_WRAPPER" && break
65897done
65898
65899  else
65900    # The variable is set, but is it from the command line or the environment?
65901
65902    # Try to remove the string !ICECC_WRAPPER! from our list.
65903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65905      # If it failed, the variable was not from the command line. Ignore it,
65906      # but warn the user (except for BASH, which is always set by the calling BASH).
65907      if test "xICECC_WRAPPER" != xBASH; then
65908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65909$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65910      fi
65911      # Try to locate tool using the code snippet
65912      for ac_prog in compilerwrapper
65913do
65914  # Extract the first word of "$ac_prog", so it can be a program name with args.
65915set dummy $ac_prog; ac_word=$2
65916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65917$as_echo_n "checking for $ac_word... " >&6; }
65918if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65919  $as_echo_n "(cached) " >&6
65920else
65921  case $ICECC_WRAPPER in
65922  [\\/]* | ?:[\\/]*)
65923  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65924  ;;
65925  *)
65926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65927for as_dir in $PATH
65928do
65929  IFS=$as_save_IFS
65930  test -z "$as_dir" && as_dir=.
65931    for ac_exec_ext in '' $ac_executable_extensions; do
65932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65933    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65935    break 2
65936  fi
65937done
65938  done
65939IFS=$as_save_IFS
65940
65941  ;;
65942esac
65943fi
65944ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65945if test -n "$ICECC_WRAPPER"; then
65946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65947$as_echo "$ICECC_WRAPPER" >&6; }
65948else
65949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65950$as_echo "no" >&6; }
65951fi
65952
65953
65954  test -n "$ICECC_WRAPPER" && break
65955done
65956
65957    else
65958      # If it succeeded, then it was overridden by the user. We will use it
65959      # for the tool.
65960
65961      # First remove it from the list of overridden variables, so we can test
65962      # for unknown variables in the end.
65963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65964
65965      # Check if we try to supply an empty value
65966      if test "x$ICECC_WRAPPER" = x; then
65967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65968$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65970$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65972$as_echo "disabled" >&6; }
65973      else
65974        # Check if the provided tool contains a complete path.
65975        tool_specified="$ICECC_WRAPPER"
65976        tool_basename="${tool_specified##*/}"
65977        if test "x$tool_basename" = "x$tool_specified"; then
65978          # A command without a complete path is provided, search $PATH.
65979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65980$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65981          # Extract the first word of "$tool_basename", so it can be a program name with args.
65982set dummy $tool_basename; ac_word=$2
65983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65984$as_echo_n "checking for $ac_word... " >&6; }
65985if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65986  $as_echo_n "(cached) " >&6
65987else
65988  case $ICECC_WRAPPER in
65989  [\\/]* | ?:[\\/]*)
65990  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65991  ;;
65992  *)
65993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65994for as_dir in $PATH
65995do
65996  IFS=$as_save_IFS
65997  test -z "$as_dir" && as_dir=.
65998    for ac_exec_ext in '' $ac_executable_extensions; do
65999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66000    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66002    break 2
66003  fi
66004done
66005  done
66006IFS=$as_save_IFS
66007
66008  ;;
66009esac
66010fi
66011ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66012if test -n "$ICECC_WRAPPER"; then
66013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66014$as_echo "$ICECC_WRAPPER" >&6; }
66015else
66016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66017$as_echo "no" >&6; }
66018fi
66019
66020
66021          if test "x$ICECC_WRAPPER" = x; then
66022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66023          fi
66024        else
66025          # Otherwise we believe it is a complete path. Use it as it is.
66026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66027$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66029$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66030          if test ! -x "$tool_specified"; then
66031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66032$as_echo "not found" >&6; }
66033            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66034          fi
66035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66036$as_echo "$tool_specified" >&6; }
66037        fi
66038      fi
66039    fi
66040
66041  fi
66042
66043
66044
66045  if test "x$ICECC_WRAPPER" = x; then
66046    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66047  fi
66048
66049
66050
66051  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66052      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66053  if test "$?" != "0"; then
66054    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66055$as_echo "$as_me: icecc-create-env output:" >&6;}
66056    cat ${icecc_create_env_log}
66057    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66058  fi
66059
66060    else
66061      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66062    fi
66063    PATH="$old_path"
66064    # The bundle with the compiler gets a name based on checksums. Parse log file
66065    # to find it.
66066    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66067    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66068    if test ! -f ${ICECC_ENV_BUNDLE}; then
66069      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66070    fi
66071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66072$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66074$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66075    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66076
66077    if test "x${COMPILE_TYPE}" = "xcross"; then
66078      # If cross compiling, create a separate env package for the build compiler
66079      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66080      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66081      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66082
66083  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66084      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66085            ${icecc_create_env_log_build} 2>&1 )
66086  if test "$?" != "0"; then
66087    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66088$as_echo "$as_me: icecc-create-env output:" >&6;}
66089    cat \
66090            ${icecc_create_env_log_build}
66091    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66092  fi
66093
66094      elif test "x${BUILD_CC##*/}" = "xclang"; then
66095
66096  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66097      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66098  if test "$?" != "0"; then
66099    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66100$as_echo "$as_me: icecc-create-env output:" >&6;}
66101    cat ${icecc_create_env_log_build}
66102    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66103  fi
66104
66105      else
66106        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66107      fi
66108      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66109      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66110      if test ! -f ${ICECC_ENV_BUNDLE}; then
66111        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66112      fi
66113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66114$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66116$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66117      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66118          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66119    else
66120      BUILD_ICECC="${ICECC}"
66121    fi
66122
66123
66124  fi
66125
66126
66127# Can the C/C++ compiler use precompiled headers?
66128
66129
66130  ###############################################################################
66131  #
66132  # Can the C/C++ compiler use precompiled headers?
66133  #
66134  # Check whether --enable-precompiled-headers was given.
66135if test "${enable_precompiled_headers+set}" = set; then :
66136  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66137else
66138  ENABLE_PRECOMPH=yes
66139fi
66140
66141
66142  USE_PRECOMPILED_HEADER=1
66143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66144$as_echo_n "checking If precompiled header is enabled... " >&6; }
66145  if test "x$ENABLE_PRECOMPH" = xno; then
66146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66147$as_echo "no, forced" >&6; }
66148    USE_PRECOMPILED_HEADER=0
66149  elif test "x$ICECC" != "x"; then
66150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66151$as_echo "no, does not work effectively with icecc" >&6; }
66152    USE_PRECOMPILED_HEADER=0
66153  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66155$as_echo "no, does not work with Solaris Studio" >&6; }
66156    USE_PRECOMPILED_HEADER=0
66157  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66159$as_echo "no, does not work with xlc" >&6; }
66160    USE_PRECOMPILED_HEADER=0
66161  else
66162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66163$as_echo "yes" >&6; }
66164  fi
66165
66166  if test "x$ENABLE_PRECOMPH" = xyes; then
66167    # Check that the compiler actually supports precomp headers.
66168    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66170$as_echo_n "checking that precompiled headers work... " >&6; }
66171      echo "int alfa();" > conftest.h
66172      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66173      if test ! -f conftest.hpp.gch; then
66174        USE_PRECOMPILED_HEADER=0
66175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66176$as_echo "no" >&6; }
66177      else
66178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66179$as_echo "yes" >&6; }
66180      fi
66181      $RM conftest.h conftest.hpp.gch
66182    fi
66183  fi
66184
66185
66186
66187
66188# Setup use of ccache, if available
66189
66190  # Check whether --enable-ccache was given.
66191if test "${enable_ccache+set}" = set; then :
66192  enableval=$enable_ccache;
66193fi
66194
66195
66196  CCACHE_STATUS=
66197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66198$as_echo_n "checking is ccache enabled... " >&6; }
66199  if test "x$enable_ccache" = xyes; then
66200    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66202$as_echo "yes" >&6; }
66203      OLD_PATH="$PATH"
66204      if test "x$TOOLCHAIN_PATH" != x; then
66205        PATH=$TOOLCHAIN_PATH:$PATH
66206      fi
66207
66208
66209
66210  # Publish this variable in the help.
66211
66212
66213  if [ -z "${CCACHE+x}" ]; then
66214    # The variable is not set by user, try to locate tool using the code snippet
66215    for ac_prog in ccache
66216do
66217  # Extract the first word of "$ac_prog", so it can be a program name with args.
66218set dummy $ac_prog; ac_word=$2
66219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66220$as_echo_n "checking for $ac_word... " >&6; }
66221if ${ac_cv_path_CCACHE+:} false; then :
66222  $as_echo_n "(cached) " >&6
66223else
66224  case $CCACHE in
66225  [\\/]* | ?:[\\/]*)
66226  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66227  ;;
66228  *)
66229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66230for as_dir in $PATH
66231do
66232  IFS=$as_save_IFS
66233  test -z "$as_dir" && as_dir=.
66234    for ac_exec_ext in '' $ac_executable_extensions; do
66235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66236    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66238    break 2
66239  fi
66240done
66241  done
66242IFS=$as_save_IFS
66243
66244  ;;
66245esac
66246fi
66247CCACHE=$ac_cv_path_CCACHE
66248if test -n "$CCACHE"; then
66249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66250$as_echo "$CCACHE" >&6; }
66251else
66252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66253$as_echo "no" >&6; }
66254fi
66255
66256
66257  test -n "$CCACHE" && break
66258done
66259
66260  else
66261    # The variable is set, but is it from the command line or the environment?
66262
66263    # Try to remove the string !CCACHE! from our list.
66264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66266      # If it failed, the variable was not from the command line. Ignore it,
66267      # but warn the user (except for BASH, which is always set by the calling BASH).
66268      if test "xCCACHE" != xBASH; then
66269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66270$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66271      fi
66272      # Try to locate tool using the code snippet
66273      for ac_prog in ccache
66274do
66275  # Extract the first word of "$ac_prog", so it can be a program name with args.
66276set dummy $ac_prog; ac_word=$2
66277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66278$as_echo_n "checking for $ac_word... " >&6; }
66279if ${ac_cv_path_CCACHE+:} false; then :
66280  $as_echo_n "(cached) " >&6
66281else
66282  case $CCACHE in
66283  [\\/]* | ?:[\\/]*)
66284  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66285  ;;
66286  *)
66287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66288for as_dir in $PATH
66289do
66290  IFS=$as_save_IFS
66291  test -z "$as_dir" && as_dir=.
66292    for ac_exec_ext in '' $ac_executable_extensions; do
66293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66294    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66296    break 2
66297  fi
66298done
66299  done
66300IFS=$as_save_IFS
66301
66302  ;;
66303esac
66304fi
66305CCACHE=$ac_cv_path_CCACHE
66306if test -n "$CCACHE"; then
66307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66308$as_echo "$CCACHE" >&6; }
66309else
66310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66311$as_echo "no" >&6; }
66312fi
66313
66314
66315  test -n "$CCACHE" && break
66316done
66317
66318    else
66319      # If it succeeded, then it was overridden by the user. We will use it
66320      # for the tool.
66321
66322      # First remove it from the list of overridden variables, so we can test
66323      # for unknown variables in the end.
66324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66325
66326      # Check if we try to supply an empty value
66327      if test "x$CCACHE" = x; then
66328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66329$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66331$as_echo_n "checking for CCACHE... " >&6; }
66332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66333$as_echo "disabled" >&6; }
66334      else
66335        # Check if the provided tool contains a complete path.
66336        tool_specified="$CCACHE"
66337        tool_basename="${tool_specified##*/}"
66338        if test "x$tool_basename" = "x$tool_specified"; then
66339          # A command without a complete path is provided, search $PATH.
66340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66341$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66342          # Extract the first word of "$tool_basename", so it can be a program name with args.
66343set dummy $tool_basename; ac_word=$2
66344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66345$as_echo_n "checking for $ac_word... " >&6; }
66346if ${ac_cv_path_CCACHE+:} false; then :
66347  $as_echo_n "(cached) " >&6
66348else
66349  case $CCACHE in
66350  [\\/]* | ?:[\\/]*)
66351  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66352  ;;
66353  *)
66354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66355for as_dir in $PATH
66356do
66357  IFS=$as_save_IFS
66358  test -z "$as_dir" && as_dir=.
66359    for ac_exec_ext in '' $ac_executable_extensions; do
66360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66361    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66363    break 2
66364  fi
66365done
66366  done
66367IFS=$as_save_IFS
66368
66369  ;;
66370esac
66371fi
66372CCACHE=$ac_cv_path_CCACHE
66373if test -n "$CCACHE"; then
66374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66375$as_echo "$CCACHE" >&6; }
66376else
66377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66378$as_echo "no" >&6; }
66379fi
66380
66381
66382          if test "x$CCACHE" = x; then
66383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66384          fi
66385        else
66386          # Otherwise we believe it is a complete path. Use it as it is.
66387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66388$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66390$as_echo_n "checking for CCACHE... " >&6; }
66391          if test ! -x "$tool_specified"; then
66392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66393$as_echo "not found" >&6; }
66394            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66395          fi
66396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66397$as_echo "$tool_specified" >&6; }
66398        fi
66399      fi
66400    fi
66401
66402  fi
66403
66404
66405
66406  if test "x$CCACHE" = x; then
66407    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66408  fi
66409
66410
66411      PATH="$OLD_PATH"
66412      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66413      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66414    else
66415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66416$as_echo "no" >&6; }
66417      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66418$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66419    fi
66420  elif test "x$enable_ccache" = xno; then
66421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66422$as_echo "no, explicitly disabled" >&6; }
66423    CCACHE_STATUS="Disabled"
66424  elif test "x$enable_ccache" = x; then
66425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66426$as_echo "no" >&6; }
66427  else
66428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66429$as_echo "unknown" >&6; }
66430    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66431  fi
66432
66433
66434
66435# Check whether --with-ccache-dir was given.
66436if test "${with_ccache_dir+set}" = set; then :
66437  withval=$with_ccache_dir;
66438fi
66439
66440
66441  if test "x$with_ccache_dir" != x; then
66442    # When using a non home ccache directory, assume the use is to share ccache files
66443    # with other users. Thus change the umask.
66444    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66445    if test "x$CCACHE" = x; then
66446      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66447$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66448    fi
66449  fi
66450
66451  if test "x$CCACHE" != x; then
66452
66453  if test "x$CCACHE" != x; then
66454    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66455      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66456          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66457      if test "x$HAS_BAD_CCACHE" != "x"; then
66458        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66459      fi
66460    fi
66461    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66462      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66463          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66464      if test "x$HAS_BAD_CCACHE" != "x"; then
66465        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66466      fi
66467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66468$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66469      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66470      PUSHED_FLAGS="$CXXFLAGS"
66471      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66472      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66473/* end confdefs.h.  */
66474
66475int
66476main ()
66477{
66478
66479  ;
66480  return 0;
66481}
66482_ACEOF
66483if ac_fn_cxx_try_compile "$LINENO"; then :
66484  CC_KNOWS_CCACHE_TRICK=yes
66485else
66486  CC_KNOWS_CCACHE_TRICK=no
66487fi
66488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66489      CXXFLAGS="$PUSHED_FLAGS"
66490      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66492$as_echo "yes" >&6; }
66493        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66494
66495        CCACHE_SLOPPINESS=pch_defines,time_macros
66496      else
66497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66498$as_echo "no" >&6; }
66499        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66500      fi
66501    fi
66502
66503    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66504        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66505
66506    if test "x$SET_CCACHE_DIR" != x; then
66507      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66508      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66509    fi
66510  fi
66511
66512  fi
66513
66514
66515###############################################################################
66516#
66517# And now the finish...
66518#
66519###############################################################################
66520
66521# Check for some common pitfalls
66522
66523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66524    file_to_test="$SRC_ROOT/LICENSE"
66525    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66526      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
66527    fi
66528  fi
66529
66530
66531  # Did user specify any unknown variables?
66532
66533  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66534    # Replace the separating ! with spaces before presenting for end user.
66535    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66537$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66538  fi
66539
66540
66541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66542$as_echo_n "checking if build directory is on local disk... " >&6; }
66543
66544  # df -l lists only local disks; if the given directory is not found then
66545  # a non-zero exit code is given
66546  if test "x$DF" = x; then
66547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66548      # msys does not have df; use Windows "net use" instead.
66549      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66550      if test "x$IS_NETWORK_DISK" = x; then
66551        OUTPUT_DIR_IS_LOCAL="yes"
66552      else
66553        OUTPUT_DIR_IS_LOCAL="no"
66554      fi
66555    else
66556      # No df here, say it's local
66557      OUTPUT_DIR_IS_LOCAL="yes"
66558    fi
66559  else
66560    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66561      OUTPUT_DIR_IS_LOCAL="yes"
66562    else
66563      OUTPUT_DIR_IS_LOCAL="no"
66564    fi
66565  fi
66566
66567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66568$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66569
66570
66571
66572  # Check if the user has any old-style ALT_ variables set.
66573  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66574
66575  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66576  # Since we can't properly handle the dependencies for this, warn the user about the situation
66577  if test -e $OUTPUT_ROOT/spec.gmk; then
66578    IS_RECONFIGURE=yes
66579  else
66580    IS_RECONFIGURE=no
66581  fi
66582
66583
66584# At the end, call the custom hook. (Dummy macro if no custom sources available)
66585
66586
66587# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66588
66589  # Keep feature lists sorted and free of duplicates
66590  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66591  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66592  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66593  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66594  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66595  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66596  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66597
66598  # Validate features
66599  for variant in $JVM_VARIANTS; do
66600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66601$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66602    features_var_name=JVM_FEATURES_$variant
66603    JVM_FEATURES_TO_TEST=${!features_var_name}
66604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66605$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66606    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66607    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66608    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66609    if test "x$INVALID_FEATURES" != x; then
66610      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66611    fi
66612  done
66613
66614
66615# We're messing a bit with internal autoconf variables to put the config.status
66616# in the output directory instead of the current directory.
66617CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66618
66619# Create the actual output files. Now the main work of configure is done.
66620cat >confcache <<\_ACEOF
66621# This file is a shell script that caches the results of configure
66622# tests run on this system so they can be shared between configure
66623# scripts and configure runs, see configure's option --config-cache.
66624# It is not useful on other systems.  If it contains results you don't
66625# want to keep, you may remove or edit it.
66626#
66627# config.status only pays attention to the cache file if you give it
66628# the --recheck option to rerun configure.
66629#
66630# `ac_cv_env_foo' variables (set or unset) will be overridden when
66631# loading this file, other *unset* `ac_cv_foo' will be assigned the
66632# following values.
66633
66634_ACEOF
66635
66636# The following way of writing the cache mishandles newlines in values,
66637# but we know of no workaround that is simple, portable, and efficient.
66638# So, we kill variables containing newlines.
66639# Ultrix sh set writes to stderr and can't be redirected directly,
66640# and sets the high bit in the cache file unless we assign to the vars.
66641(
66642  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66643    eval ac_val=\$$ac_var
66644    case $ac_val in #(
66645    *${as_nl}*)
66646      case $ac_var in #(
66647      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66648$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66649      esac
66650      case $ac_var in #(
66651      _ | IFS | as_nl) ;; #(
66652      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66653      *) { eval $ac_var=; unset $ac_var;} ;;
66654      esac ;;
66655    esac
66656  done
66657
66658  (set) 2>&1 |
66659    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66660    *${as_nl}ac_space=\ *)
66661      # `set' does not quote correctly, so add quotes: double-quote
66662      # substitution turns \\\\ into \\, and sed turns \\ into \.
66663      sed -n \
66664	"s/'/'\\\\''/g;
66665	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66666      ;; #(
66667    *)
66668      # `set' quotes correctly as required by POSIX, so do not add quotes.
66669      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66670      ;;
66671    esac |
66672    sort
66673) |
66674  sed '
66675     /^ac_cv_env_/b end
66676     t clear
66677     :clear
66678     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66679     t end
66680     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66681     :end' >>confcache
66682if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66683  if test -w "$cache_file"; then
66684    if test "x$cache_file" != "x/dev/null"; then
66685      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66686$as_echo "$as_me: updating cache $cache_file" >&6;}
66687      if test ! -f "$cache_file" || test -h "$cache_file"; then
66688	cat confcache >"$cache_file"
66689      else
66690        case $cache_file in #(
66691        */* | ?:*)
66692	  mv -f confcache "$cache_file"$$ &&
66693	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66694        *)
66695	  mv -f confcache "$cache_file" ;;
66696	esac
66697      fi
66698    fi
66699  else
66700    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66701$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66702  fi
66703fi
66704rm -f confcache
66705
66706test "x$prefix" = xNONE && prefix=$ac_default_prefix
66707# Let make expand exec_prefix.
66708test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66709
66710# Transform confdefs.h into DEFS.
66711# Protect against shell expansion while executing Makefile rules.
66712# Protect against Makefile macro expansion.
66713#
66714# If the first sed substitution is executed (which looks for macros that
66715# take arguments), then branch to the quote section.  Otherwise,
66716# look for a macro that doesn't take arguments.
66717ac_script='
66718:mline
66719/\\$/{
66720 N
66721 s,\\\n,,
66722 b mline
66723}
66724t clear
66725:clear
66726s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66727t quote
66728s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66729t quote
66730b any
66731:quote
66732s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66733s/\[/\\&/g
66734s/\]/\\&/g
66735s/\$/$$/g
66736H
66737:any
66738${
66739	g
66740	s/^\n//
66741	s/\n/ /g
66742	p
66743}
66744'
66745DEFS=`sed -n "$ac_script" confdefs.h`
66746
66747
66748ac_libobjs=
66749ac_ltlibobjs=
66750U=
66751for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66752  # 1. Remove the extension, and $U if already installed.
66753  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66754  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66755  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66756  #    will be set to the directory where LIBOBJS objects are built.
66757  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66758  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66759done
66760LIBOBJS=$ac_libobjs
66761
66762LTLIBOBJS=$ac_ltlibobjs
66763
66764
66765
66766: "${CONFIG_STATUS=./config.status}"
66767ac_write_fail=0
66768ac_clean_files_save=$ac_clean_files
66769ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66770{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66771$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66772as_write_fail=0
66773cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66774#! $SHELL
66775# Generated by $as_me.
66776# Run this file to recreate the current configuration.
66777# Compiler output produced by configure, useful for debugging
66778# configure, is in config.log if it exists.
66779
66780debug=false
66781ac_cs_recheck=false
66782ac_cs_silent=false
66783
66784SHELL=\${CONFIG_SHELL-$SHELL}
66785export SHELL
66786_ASEOF
66787cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66788## -------------------- ##
66789## M4sh Initialization. ##
66790## -------------------- ##
66791
66792# Be more Bourne compatible
66793DUALCASE=1; export DUALCASE # for MKS sh
66794if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66795  emulate sh
66796  NULLCMD=:
66797  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66798  # is contrary to our usage.  Disable this feature.
66799  alias -g '${1+"$@"}'='"$@"'
66800  setopt NO_GLOB_SUBST
66801else
66802  case `(set -o) 2>/dev/null` in #(
66803  *posix*) :
66804    set -o posix ;; #(
66805  *) :
66806     ;;
66807esac
66808fi
66809
66810
66811as_nl='
66812'
66813export as_nl
66814# Printing a long string crashes Solaris 7 /usr/bin/printf.
66815as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66816as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66817as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66818# Prefer a ksh shell builtin over an external printf program on Solaris,
66819# but without wasting forks for bash or zsh.
66820if test -z "$BASH_VERSION$ZSH_VERSION" \
66821    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66822  as_echo='print -r --'
66823  as_echo_n='print -rn --'
66824elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66825  as_echo='printf %s\n'
66826  as_echo_n='printf %s'
66827else
66828  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66829    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66830    as_echo_n='/usr/ucb/echo -n'
66831  else
66832    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66833    as_echo_n_body='eval
66834      arg=$1;
66835      case $arg in #(
66836      *"$as_nl"*)
66837	expr "X$arg" : "X\\(.*\\)$as_nl";
66838	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66839      esac;
66840      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66841    '
66842    export as_echo_n_body
66843    as_echo_n='sh -c $as_echo_n_body as_echo'
66844  fi
66845  export as_echo_body
66846  as_echo='sh -c $as_echo_body as_echo'
66847fi
66848
66849# The user is always right.
66850if test "${PATH_SEPARATOR+set}" != set; then
66851  PATH_SEPARATOR=:
66852  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66853    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66854      PATH_SEPARATOR=';'
66855  }
66856fi
66857
66858
66859# IFS
66860# We need space, tab and new line, in precisely that order.  Quoting is
66861# there to prevent editors from complaining about space-tab.
66862# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66863# splitting by setting IFS to empty value.)
66864IFS=" ""	$as_nl"
66865
66866# Find who we are.  Look in the path if we contain no directory separator.
66867as_myself=
66868case $0 in #((
66869  *[\\/]* ) as_myself=$0 ;;
66870  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66871for as_dir in $PATH
66872do
66873  IFS=$as_save_IFS
66874  test -z "$as_dir" && as_dir=.
66875    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66876  done
66877IFS=$as_save_IFS
66878
66879     ;;
66880esac
66881# We did not find ourselves, most probably we were run as `sh COMMAND'
66882# in which case we are not to be found in the path.
66883if test "x$as_myself" = x; then
66884  as_myself=$0
66885fi
66886if test ! -f "$as_myself"; then
66887  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66888  exit 1
66889fi
66890
66891# Unset variables that we do not need and which cause bugs (e.g. in
66892# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66893# suppresses any "Segmentation fault" message there.  '((' could
66894# trigger a bug in pdksh 5.2.14.
66895for as_var in BASH_ENV ENV MAIL MAILPATH
66896do eval test x\${$as_var+set} = xset \
66897  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66898done
66899PS1='$ '
66900PS2='> '
66901PS4='+ '
66902
66903# NLS nuisances.
66904LC_ALL=C
66905export LC_ALL
66906LANGUAGE=C
66907export LANGUAGE
66908
66909# CDPATH.
66910(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66911
66912
66913# as_fn_error STATUS ERROR [LINENO LOG_FD]
66914# ----------------------------------------
66915# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66916# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66917# script with STATUS, using 1 if that was 0.
66918as_fn_error ()
66919{
66920  as_status=$1; test $as_status -eq 0 && as_status=1
66921  if test "$4"; then
66922    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66923    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66924  fi
66925  $as_echo "$as_me: error: $2" >&2
66926  as_fn_exit $as_status
66927} # as_fn_error
66928
66929
66930# as_fn_set_status STATUS
66931# -----------------------
66932# Set $? to STATUS, without forking.
66933as_fn_set_status ()
66934{
66935  return $1
66936} # as_fn_set_status
66937
66938# as_fn_exit STATUS
66939# -----------------
66940# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66941as_fn_exit ()
66942{
66943  set +e
66944  as_fn_set_status $1
66945  exit $1
66946} # as_fn_exit
66947
66948# as_fn_unset VAR
66949# ---------------
66950# Portably unset VAR.
66951as_fn_unset ()
66952{
66953  { eval $1=; unset $1;}
66954}
66955as_unset=as_fn_unset
66956# as_fn_append VAR VALUE
66957# ----------------------
66958# Append the text in VALUE to the end of the definition contained in VAR. Take
66959# advantage of any shell optimizations that allow amortized linear growth over
66960# repeated appends, instead of the typical quadratic growth present in naive
66961# implementations.
66962if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66963  eval 'as_fn_append ()
66964  {
66965    eval $1+=\$2
66966  }'
66967else
66968  as_fn_append ()
66969  {
66970    eval $1=\$$1\$2
66971  }
66972fi # as_fn_append
66973
66974# as_fn_arith ARG...
66975# ------------------
66976# Perform arithmetic evaluation on the ARGs, and store the result in the
66977# global $as_val. Take advantage of shells that can avoid forks. The arguments
66978# must be portable across $(()) and expr.
66979if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66980  eval 'as_fn_arith ()
66981  {
66982    as_val=$(( $* ))
66983  }'
66984else
66985  as_fn_arith ()
66986  {
66987    as_val=`expr "$@" || test $? -eq 1`
66988  }
66989fi # as_fn_arith
66990
66991
66992if expr a : '\(a\)' >/dev/null 2>&1 &&
66993   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66994  as_expr=expr
66995else
66996  as_expr=false
66997fi
66998
66999if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67000  as_basename=basename
67001else
67002  as_basename=false
67003fi
67004
67005if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67006  as_dirname=dirname
67007else
67008  as_dirname=false
67009fi
67010
67011as_me=`$as_basename -- "$0" ||
67012$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67013	 X"$0" : 'X\(//\)$' \| \
67014	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67015$as_echo X/"$0" |
67016    sed '/^.*\/\([^/][^/]*\)\/*$/{
67017	    s//\1/
67018	    q
67019	  }
67020	  /^X\/\(\/\/\)$/{
67021	    s//\1/
67022	    q
67023	  }
67024	  /^X\/\(\/\).*/{
67025	    s//\1/
67026	    q
67027	  }
67028	  s/.*/./; q'`
67029
67030# Avoid depending upon Character Ranges.
67031as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67032as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67033as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67034as_cr_digits='0123456789'
67035as_cr_alnum=$as_cr_Letters$as_cr_digits
67036
67037ECHO_C= ECHO_N= ECHO_T=
67038case `echo -n x` in #(((((
67039-n*)
67040  case `echo 'xy\c'` in
67041  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67042  xy)  ECHO_C='\c';;
67043  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67044       ECHO_T='	';;
67045  esac;;
67046*)
67047  ECHO_N='-n';;
67048esac
67049
67050rm -f conf$$ conf$$.exe conf$$.file
67051if test -d conf$$.dir; then
67052  rm -f conf$$.dir/conf$$.file
67053else
67054  rm -f conf$$.dir
67055  mkdir conf$$.dir 2>/dev/null
67056fi
67057if (echo >conf$$.file) 2>/dev/null; then
67058  if ln -s conf$$.file conf$$ 2>/dev/null; then
67059    as_ln_s='ln -s'
67060    # ... but there are two gotchas:
67061    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67062    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67063    # In both cases, we have to default to `cp -pR'.
67064    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67065      as_ln_s='cp -pR'
67066  elif ln conf$$.file conf$$ 2>/dev/null; then
67067    as_ln_s=ln
67068  else
67069    as_ln_s='cp -pR'
67070  fi
67071else
67072  as_ln_s='cp -pR'
67073fi
67074rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67075rmdir conf$$.dir 2>/dev/null
67076
67077
67078# as_fn_mkdir_p
67079# -------------
67080# Create "$as_dir" as a directory, including parents if necessary.
67081as_fn_mkdir_p ()
67082{
67083
67084  case $as_dir in #(
67085  -*) as_dir=./$as_dir;;
67086  esac
67087  test -d "$as_dir" || eval $as_mkdir_p || {
67088    as_dirs=
67089    while :; do
67090      case $as_dir in #(
67091      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67092      *) as_qdir=$as_dir;;
67093      esac
67094      as_dirs="'$as_qdir' $as_dirs"
67095      as_dir=`$as_dirname -- "$as_dir" ||
67096$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67097	 X"$as_dir" : 'X\(//\)[^/]' \| \
67098	 X"$as_dir" : 'X\(//\)$' \| \
67099	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67100$as_echo X"$as_dir" |
67101    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67102	    s//\1/
67103	    q
67104	  }
67105	  /^X\(\/\/\)[^/].*/{
67106	    s//\1/
67107	    q
67108	  }
67109	  /^X\(\/\/\)$/{
67110	    s//\1/
67111	    q
67112	  }
67113	  /^X\(\/\).*/{
67114	    s//\1/
67115	    q
67116	  }
67117	  s/.*/./; q'`
67118      test -d "$as_dir" && break
67119    done
67120    test -z "$as_dirs" || eval "mkdir $as_dirs"
67121  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67122
67123
67124} # as_fn_mkdir_p
67125if mkdir -p . 2>/dev/null; then
67126  as_mkdir_p='mkdir -p "$as_dir"'
67127else
67128  test -d ./-p && rmdir ./-p
67129  as_mkdir_p=false
67130fi
67131
67132
67133# as_fn_executable_p FILE
67134# -----------------------
67135# Test if FILE is an executable regular file.
67136as_fn_executable_p ()
67137{
67138  test -f "$1" && test -x "$1"
67139} # as_fn_executable_p
67140as_test_x='test -x'
67141as_executable_p=as_fn_executable_p
67142
67143# Sed expression to map a string onto a valid CPP name.
67144as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67145
67146# Sed expression to map a string onto a valid variable name.
67147as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67148
67149
67150exec 6>&1
67151## ----------------------------------- ##
67152## Main body of $CONFIG_STATUS script. ##
67153## ----------------------------------- ##
67154_ASEOF
67155test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67156
67157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67158# Save the log message, to keep $0 and so on meaningful, and to
67159# report actual input values of CONFIG_FILES etc. instead of their
67160# values after options handling.
67161ac_log="
67162This file was extended by OpenJDK $as_me jdk9, which was
67163generated by GNU Autoconf 2.69.  Invocation command line was
67164
67165  CONFIG_FILES    = $CONFIG_FILES
67166  CONFIG_HEADERS  = $CONFIG_HEADERS
67167  CONFIG_LINKS    = $CONFIG_LINKS
67168  CONFIG_COMMANDS = $CONFIG_COMMANDS
67169  $ $0 $@
67170
67171on `(hostname || uname -n) 2>/dev/null | sed 1q`
67172"
67173
67174_ACEOF
67175
67176case $ac_config_files in *"
67177"*) set x $ac_config_files; shift; ac_config_files=$*;;
67178esac
67179
67180
67181
67182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67183# Files that config.status was made for.
67184config_files="$ac_config_files"
67185
67186_ACEOF
67187
67188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67189ac_cs_usage="\
67190\`$as_me' instantiates files and other configuration actions
67191from templates according to the current configuration.  Unless the files
67192and actions are specified as TAGs, all are instantiated by default.
67193
67194Usage: $0 [OPTION]... [TAG]...
67195
67196  -h, --help       print this help, then exit
67197  -V, --version    print version number and configuration settings, then exit
67198      --config     print configuration, then exit
67199  -q, --quiet, --silent
67200                   do not print progress messages
67201  -d, --debug      don't remove temporary files
67202      --recheck    update $as_me by reconfiguring in the same conditions
67203      --file=FILE[:TEMPLATE]
67204                   instantiate the configuration file FILE
67205
67206Configuration files:
67207$config_files
67208
67209Report bugs to <build-dev@openjdk.java.net>.
67210OpenJDK home page: <http://openjdk.java.net>."
67211
67212_ACEOF
67213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67214ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67215ac_cs_version="\\
67216OpenJDK config.status jdk9
67217configured by $0, generated by GNU Autoconf 2.69,
67218  with options \\"\$ac_cs_config\\"
67219
67220Copyright (C) 2012 Free Software Foundation, Inc.
67221This config.status script is free software; the Free Software Foundation
67222gives unlimited permission to copy, distribute and modify it."
67223
67224ac_pwd='$ac_pwd'
67225srcdir='$srcdir'
67226AWK='$AWK'
67227test -n "\$AWK" || AWK=awk
67228_ACEOF
67229
67230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67231# The default lists apply if the user does not specify any file.
67232ac_need_defaults=:
67233while test $# != 0
67234do
67235  case $1 in
67236  --*=?*)
67237    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67238    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67239    ac_shift=:
67240    ;;
67241  --*=)
67242    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67243    ac_optarg=
67244    ac_shift=:
67245    ;;
67246  *)
67247    ac_option=$1
67248    ac_optarg=$2
67249    ac_shift=shift
67250    ;;
67251  esac
67252
67253  case $ac_option in
67254  # Handling of the options.
67255  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67256    ac_cs_recheck=: ;;
67257  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67258    $as_echo "$ac_cs_version"; exit ;;
67259  --config | --confi | --conf | --con | --co | --c )
67260    $as_echo "$ac_cs_config"; exit ;;
67261  --debug | --debu | --deb | --de | --d | -d )
67262    debug=: ;;
67263  --file | --fil | --fi | --f )
67264    $ac_shift
67265    case $ac_optarg in
67266    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67267    '') as_fn_error $? "missing file argument" ;;
67268    esac
67269    as_fn_append CONFIG_FILES " '$ac_optarg'"
67270    ac_need_defaults=false;;
67271  --he | --h |  --help | --hel | -h )
67272    $as_echo "$ac_cs_usage"; exit ;;
67273  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67274  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67275    ac_cs_silent=: ;;
67276
67277  # This is an error.
67278  -*) as_fn_error $? "unrecognized option: \`$1'
67279Try \`$0 --help' for more information." ;;
67280
67281  *) as_fn_append ac_config_targets " $1"
67282     ac_need_defaults=false ;;
67283
67284  esac
67285  shift
67286done
67287
67288ac_configure_extra_args=
67289
67290if $ac_cs_silent; then
67291  exec 6>/dev/null
67292  ac_configure_extra_args="$ac_configure_extra_args --silent"
67293fi
67294
67295_ACEOF
67296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67297if \$ac_cs_recheck; then
67298  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67299  shift
67300  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67301  CONFIG_SHELL='$SHELL'
67302  export CONFIG_SHELL
67303  exec "\$@"
67304fi
67305
67306_ACEOF
67307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67308exec 5>>config.log
67309{
67310  echo
67311  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67312## Running $as_me. ##
67313_ASBOX
67314  $as_echo "$ac_log"
67315} >&5
67316
67317_ACEOF
67318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67319_ACEOF
67320
67321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67322
67323# Handling of arguments.
67324for ac_config_target in $ac_config_targets
67325do
67326  case $ac_config_target in
67327    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67328    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67329    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67330    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67331    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67332
67333  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67334  esac
67335done
67336
67337
67338# If the user did not use the arguments to specify the items to instantiate,
67339# then the envvar interface is used.  Set only those that are not.
67340# We use the long form for the default assignment because of an extremely
67341# bizarre bug on SunOS 4.1.3.
67342if $ac_need_defaults; then
67343  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67344fi
67345
67346# Have a temporary directory for convenience.  Make it in the build tree
67347# simply because there is no reason against having it here, and in addition,
67348# creating and moving files from /tmp can sometimes cause problems.
67349# Hook for its removal unless debugging.
67350# Note that there is a small window in which the directory will not be cleaned:
67351# after its creation but before its name has been assigned to `$tmp'.
67352$debug ||
67353{
67354  tmp= ac_tmp=
67355  trap 'exit_status=$?
67356  : "${ac_tmp:=$tmp}"
67357  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67358' 0
67359  trap 'as_fn_exit 1' 1 2 13 15
67360}
67361# Create a (secure) tmp directory for tmp files.
67362
67363{
67364  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67365  test -d "$tmp"
67366}  ||
67367{
67368  tmp=./conf$$-$RANDOM
67369  (umask 077 && mkdir "$tmp")
67370} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67371ac_tmp=$tmp
67372
67373# Set up the scripts for CONFIG_FILES section.
67374# No need to generate them if there are no CONFIG_FILES.
67375# This happens for instance with `./config.status config.h'.
67376if test -n "$CONFIG_FILES"; then
67377
67378
67379ac_cr=`echo X | tr X '\015'`
67380# On cygwin, bash can eat \r inside `` if the user requested igncr.
67381# But we know of no other shell where ac_cr would be empty at this
67382# point, so we can use a bashism as a fallback.
67383if test "x$ac_cr" = x; then
67384  eval ac_cr=\$\'\\r\'
67385fi
67386ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67387if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67388  ac_cs_awk_cr='\\r'
67389else
67390  ac_cs_awk_cr=$ac_cr
67391fi
67392
67393echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67394_ACEOF
67395
67396
67397{
67398  echo "cat >conf$$subs.awk <<_ACEOF" &&
67399  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67400  echo "_ACEOF"
67401} >conf$$subs.sh ||
67402  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67403ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67404ac_delim='%!_!# '
67405for ac_last_try in false false false false false :; do
67406  . ./conf$$subs.sh ||
67407    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67408
67409  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67410  if test $ac_delim_n = $ac_delim_num; then
67411    break
67412  elif $ac_last_try; then
67413    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67414  else
67415    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67416  fi
67417done
67418rm -f conf$$subs.sh
67419
67420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67421cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67422_ACEOF
67423sed -n '
67424h
67425s/^/S["/; s/!.*/"]=/
67426p
67427g
67428s/^[^!]*!//
67429:repl
67430t repl
67431s/'"$ac_delim"'$//
67432t delim
67433:nl
67434h
67435s/\(.\{148\}\)..*/\1/
67436t more1
67437s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67438p
67439n
67440b repl
67441:more1
67442s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67443p
67444g
67445s/.\{148\}//
67446t nl
67447:delim
67448h
67449s/\(.\{148\}\)..*/\1/
67450t more2
67451s/["\\]/\\&/g; s/^/"/; s/$/"/
67452p
67453b
67454:more2
67455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67456p
67457g
67458s/.\{148\}//
67459t delim
67460' <conf$$subs.awk | sed '
67461/^[^""]/{
67462  N
67463  s/\n//
67464}
67465' >>$CONFIG_STATUS || ac_write_fail=1
67466rm -f conf$$subs.awk
67467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67468_ACAWK
67469cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67470  for (key in S) S_is_set[key] = 1
67471  FS = ""
67472
67473}
67474{
67475  line = $ 0
67476  nfields = split(line, field, "@")
67477  substed = 0
67478  len = length(field[1])
67479  for (i = 2; i < nfields; i++) {
67480    key = field[i]
67481    keylen = length(key)
67482    if (S_is_set[key]) {
67483      value = S[key]
67484      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67485      len += length(value) + length(field[++i])
67486      substed = 1
67487    } else
67488      len += 1 + keylen
67489  }
67490
67491  print line
67492}
67493
67494_ACAWK
67495_ACEOF
67496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67497if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67498  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67499else
67500  cat
67501fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67502  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67503_ACEOF
67504
67505# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67506# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67507# trailing colons and then remove the whole line if VPATH becomes empty
67508# (actually we leave an empty line to preserve line numbers).
67509if test "x$srcdir" = x.; then
67510  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67511h
67512s///
67513s/^/:/
67514s/[	 ]*$/:/
67515s/:\$(srcdir):/:/g
67516s/:\${srcdir}:/:/g
67517s/:@srcdir@:/:/g
67518s/^:*//
67519s/:*$//
67520x
67521s/\(=[	 ]*\).*/\1/
67522G
67523s/\n//
67524s/^[^=]*=[	 ]*$//
67525}'
67526fi
67527
67528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67529fi # test -n "$CONFIG_FILES"
67530
67531
67532eval set X "  :F $CONFIG_FILES      "
67533shift
67534for ac_tag
67535do
67536  case $ac_tag in
67537  :[FHLC]) ac_mode=$ac_tag; continue;;
67538  esac
67539  case $ac_mode$ac_tag in
67540  :[FHL]*:*);;
67541  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67542  :[FH]-) ac_tag=-:-;;
67543  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67544  esac
67545  ac_save_IFS=$IFS
67546  IFS=:
67547  set x $ac_tag
67548  IFS=$ac_save_IFS
67549  shift
67550  ac_file=$1
67551  shift
67552
67553  case $ac_mode in
67554  :L) ac_source=$1;;
67555  :[FH])
67556    ac_file_inputs=
67557    for ac_f
67558    do
67559      case $ac_f in
67560      -) ac_f="$ac_tmp/stdin";;
67561      *) # Look for the file first in the build tree, then in the source tree
67562	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67563	 # because $ac_f cannot contain `:'.
67564	 test -f "$ac_f" ||
67565	   case $ac_f in
67566	   [\\/$]*) false;;
67567	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67568	   esac ||
67569	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67570      esac
67571      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67572      as_fn_append ac_file_inputs " '$ac_f'"
67573    done
67574
67575    # Let's still pretend it is `configure' which instantiates (i.e., don't
67576    # use $as_me), people would be surprised to read:
67577    #    /* config.h.  Generated by config.status.  */
67578    configure_input='Generated from '`
67579	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67580	`' by configure.'
67581    if test x"$ac_file" != x-; then
67582      configure_input="$ac_file.  $configure_input"
67583      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67584$as_echo "$as_me: creating $ac_file" >&6;}
67585    fi
67586    # Neutralize special characters interpreted by sed in replacement strings.
67587    case $configure_input in #(
67588    *\&* | *\|* | *\\* )
67589       ac_sed_conf_input=`$as_echo "$configure_input" |
67590       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67591    *) ac_sed_conf_input=$configure_input;;
67592    esac
67593
67594    case $ac_tag in
67595    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67596      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67597    esac
67598    ;;
67599  esac
67600
67601  ac_dir=`$as_dirname -- "$ac_file" ||
67602$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67603	 X"$ac_file" : 'X\(//\)[^/]' \| \
67604	 X"$ac_file" : 'X\(//\)$' \| \
67605	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67606$as_echo X"$ac_file" |
67607    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67608	    s//\1/
67609	    q
67610	  }
67611	  /^X\(\/\/\)[^/].*/{
67612	    s//\1/
67613	    q
67614	  }
67615	  /^X\(\/\/\)$/{
67616	    s//\1/
67617	    q
67618	  }
67619	  /^X\(\/\).*/{
67620	    s//\1/
67621	    q
67622	  }
67623	  s/.*/./; q'`
67624  as_dir="$ac_dir"; as_fn_mkdir_p
67625  ac_builddir=.
67626
67627case "$ac_dir" in
67628.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67629*)
67630  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67631  # A ".." for each directory in $ac_dir_suffix.
67632  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67633  case $ac_top_builddir_sub in
67634  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67635  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67636  esac ;;
67637esac
67638ac_abs_top_builddir=$ac_pwd
67639ac_abs_builddir=$ac_pwd$ac_dir_suffix
67640# for backward compatibility:
67641ac_top_builddir=$ac_top_build_prefix
67642
67643case $srcdir in
67644  .)  # We are building in place.
67645    ac_srcdir=.
67646    ac_top_srcdir=$ac_top_builddir_sub
67647    ac_abs_top_srcdir=$ac_pwd ;;
67648  [\\/]* | ?:[\\/]* )  # Absolute name.
67649    ac_srcdir=$srcdir$ac_dir_suffix;
67650    ac_top_srcdir=$srcdir
67651    ac_abs_top_srcdir=$srcdir ;;
67652  *) # Relative name.
67653    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67654    ac_top_srcdir=$ac_top_build_prefix$srcdir
67655    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67656esac
67657ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67658
67659
67660  case $ac_mode in
67661  :F)
67662  #
67663  # CONFIG_FILE
67664  #
67665
67666_ACEOF
67667
67668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67669# If the template does not know about datarootdir, expand it.
67670# FIXME: This hack should be removed a few years after 2.60.
67671ac_datarootdir_hack=; ac_datarootdir_seen=
67672ac_sed_dataroot='
67673/datarootdir/ {
67674  p
67675  q
67676}
67677/@datadir@/p
67678/@docdir@/p
67679/@infodir@/p
67680/@localedir@/p
67681/@mandir@/p'
67682case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67683*datarootdir*) ac_datarootdir_seen=yes;;
67684*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67685  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67686$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67687_ACEOF
67688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67689  ac_datarootdir_hack='
67690  s&@datadir@&$datadir&g
67691  s&@docdir@&$docdir&g
67692  s&@infodir@&$infodir&g
67693  s&@localedir@&$localedir&g
67694  s&@mandir@&$mandir&g
67695  s&\\\${datarootdir}&$datarootdir&g' ;;
67696esac
67697_ACEOF
67698
67699# Neutralize VPATH when `$srcdir' = `.'.
67700# Shell code in configure.ac might set extrasub.
67701# FIXME: do we really want to maintain this feature?
67702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67703ac_sed_extra="$ac_vpsub
67704$extrasub
67705_ACEOF
67706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67707:t
67708/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67709s|@configure_input@|$ac_sed_conf_input|;t t
67710s&@top_builddir@&$ac_top_builddir_sub&;t t
67711s&@top_build_prefix@&$ac_top_build_prefix&;t t
67712s&@srcdir@&$ac_srcdir&;t t
67713s&@abs_srcdir@&$ac_abs_srcdir&;t t
67714s&@top_srcdir@&$ac_top_srcdir&;t t
67715s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67716s&@builddir@&$ac_builddir&;t t
67717s&@abs_builddir@&$ac_abs_builddir&;t t
67718s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67719$ac_datarootdir_hack
67720"
67721eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67722  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67723
67724test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67725  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67726  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67727      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67728  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67729which seems to be undefined.  Please make sure it is defined" >&5
67730$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67731which seems to be undefined.  Please make sure it is defined" >&2;}
67732
67733  rm -f "$ac_tmp/stdin"
67734  case $ac_file in
67735  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67736  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67737  esac \
67738  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67739 ;;
67740
67741
67742
67743  esac
67744
67745done # for ac_tag
67746
67747
67748as_fn_exit 0
67749_ACEOF
67750ac_clean_files=$ac_clean_files_save
67751
67752test $ac_write_fail = 0 ||
67753  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67754
67755
67756# configure is writing to config.log, and then calls config.status.
67757# config.status does its own redirection, appending to config.log.
67758# Unfortunately, on DOS this fails, as config.log is still kept open
67759# by configure, so config.status won't be able to write to it; its
67760# output is simply discarded.  So we exec the FD to /dev/null,
67761# effectively closing config.log, so it can be properly (re)opened and
67762# appended to by config.status.  When coming back to configure, we
67763# need to make the FD available again.
67764if test "$no_create" != yes; then
67765  ac_cs_success=:
67766  ac_config_status_args=
67767  test "$silent" = yes &&
67768    ac_config_status_args="$ac_config_status_args --quiet"
67769  exec 5>/dev/null
67770  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67771  exec 5>>config.log
67772  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67773  # would make configure fail if this is the last instruction.
67774  $ac_cs_success || as_fn_exit 1
67775fi
67776if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67777  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67778$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67779fi
67780
67781
67782# After AC_OUTPUT, we need to do final work
67783
67784
67785  # Try to move config.log (generated by autoconf) to the configure-support directory.
67786  if test -e ./config.log; then
67787    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67788  fi
67789
67790  # Rotate our log file (configure.log)
67791  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67792    $RM -f "$OUTPUT_ROOT/configure.log.old"
67793  fi
67794  if test -e "$OUTPUT_ROOT/configure.log"; then
67795    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67796  fi
67797
67798  # Move configure.log from current directory to the build output root
67799  if test -e ./configure.log; then
67800    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67801  fi
67802
67803  # Make the compare script executable
67804  $CHMOD +x $OUTPUT_ROOT/compare.sh
67805
67806
67807# Finally output some useful information to the user
67808
67809  # Finally output some useful information to the user
67810
67811  printf "\n"
67812  printf "====================================================\n"
67813  if test "x$no_create" != "xyes"; then
67814    if test "x$IS_RECONFIGURE" != "xyes"; then
67815      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67816    else
67817      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67818    fi
67819  else
67820    if test "x$IS_RECONFIGURE" != "xyes"; then
67821      printf "A configuration has been successfully checked but not created\n"
67822    else
67823      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67824    fi
67825  fi
67826  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67827    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67828  else
67829    printf "using default settings.\n"
67830  fi
67831
67832  printf "\n"
67833  printf "Configuration summary:\n"
67834  printf "* Debug level:    $DEBUG_LEVEL\n"
67835  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67836  printf "* JDK variant:    $JDK_VARIANT\n"
67837  printf "* JVM variants:   $JVM_VARIANTS\n"
67838  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67839  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67840
67841  printf "\n"
67842  printf "Tools summary:\n"
67843  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67844    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67845  fi
67846  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67847  if test "x$TOOLCHAIN_VERSION" != "x"; then
67848    print_version=" $TOOLCHAIN_VERSION"
67849  fi
67850  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67851  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67852  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67853
67854  printf "\n"
67855  printf "Build performance summary:\n"
67856  printf "* Cores to use:   $JOBS\n"
67857  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67858  if test "x$CCACHE_STATUS" != "x"; then
67859    printf "* ccache status:  $CCACHE_STATUS\n"
67860  fi
67861  printf "\n"
67862
67863  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67864    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67865    printf "will result in longer build times.\n"
67866    printf "\n"
67867  fi
67868
67869  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67870    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67871    printf "These are not respected, and will be ignored. It is recommended\n"
67872    printf "that you clean your environment. The following variables are set:\n"
67873    printf "$FOUND_ALT_VARIABLES\n"
67874    printf "\n"
67875  fi
67876
67877  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67878    printf "WARNING: Your build output directory is not on a local disk.\n"
67879    printf "This will severely degrade build performance!\n"
67880    printf "It is recommended that you create an output directory on a local disk,\n"
67881    printf "and run the configure script again from that directory.\n"
67882    printf "\n"
67883  fi
67884
67885  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67886    printf "WARNING: The result of this configuration has overridden an older\n"
67887    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67888    printf "proper build. Failure to do so might result in strange build problems.\n"
67889    printf "\n"
67890  fi
67891
67892  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67893    printf "WARNING: The result of this configuration was not saved.\n"
67894    printf "You should run without '--no-create | -n' to create the configuration.\n"
67895    printf "\n"
67896  fi
67897
67898
67899
67900  # Locate config.log.
67901  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67902    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67903  elif test -e "./config.log"; then
67904    CONFIG_LOG_PATH="."
67905  fi
67906
67907  if test -e "$CONFIG_LOG_PATH/config.log"; then
67908    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67909    if test $? -eq 0; then
67910      printf "The following warnings were produced. Repeated here for convenience:\n"
67911      # We must quote sed expression (using []) to stop m4 from eating the [].
67912      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67913      printf "\n"
67914    fi
67915  fi
67916
67917