generated-configure.sh revision 2477:bb5dc9acb43b
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=1485214214
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  # Workaround for using different imported module-info.java in Jake due to a
31287  # change in format. Remove once new format is standard in JDK 9 and javafx
31288  # delivers just that.
31289  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31290    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31291  fi
31292  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31293    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31294  fi
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306###############################################################################
31307#
31308# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31309# native code.
31310#
31311###############################################################################
31312
31313# See if we are doing a complete static build or not
31314
31315  # Check whether --enable-static-build was given.
31316if test "${enable_static_build+set}" = set; then :
31317  enableval=$enable_static_build;
31318fi
31319
31320  STATIC_BUILD=false
31321  if test "x$enable_static_build" = "xyes"; then
31322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31323$as_echo_n "checking if static build is enabled... " >&6; }
31324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31325$as_echo "yes" >&6; }
31326    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31327      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31328    fi
31329    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31330    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31331    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31332    STATIC_BUILD=true
31333  elif test "x$enable_static_build" = "xno"; then
31334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31335$as_echo_n "checking if static build is enabled... " >&6; }
31336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31337$as_echo "no" >&6; }
31338  elif test "x$enable_static_build" != "x"; then
31339    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31340  fi
31341
31342
31343
31344
31345# First determine the toolchain type (compiler family)
31346
31347
31348# Check whether --with-toolchain-type was given.
31349if test "${with_toolchain_type+set}" = set; then :
31350  withval=$with_toolchain_type;
31351fi
31352
31353
31354  # Use indirect variable referencing
31355  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31356  VALID_TOOLCHAINS=${!toolchain_var_name}
31357
31358  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31359    if test -n "$XCODEBUILD"; then
31360      # On Mac OS X, default toolchain to clang after Xcode 5
31361      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31362      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31363      if test $? -ne 0; then
31364        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31365      fi
31366      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31367          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31368          $CUT -f 1 -d .`
31369      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31370$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31371      if test $XCODE_MAJOR_VERSION -ge 5; then
31372          DEFAULT_TOOLCHAIN="clang"
31373      else
31374          DEFAULT_TOOLCHAIN="gcc"
31375      fi
31376    else
31377      # If Xcode is not installed, but the command line tools are
31378      # then we can't run xcodebuild. On these systems we should
31379      # default to clang
31380      DEFAULT_TOOLCHAIN="clang"
31381    fi
31382  else
31383    # First toolchain type in the list is the default
31384    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31385  fi
31386
31387  if test "x$with_toolchain_type" = xlist; then
31388    # List all toolchains
31389    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31390$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31391    for toolchain in $VALID_TOOLCHAINS; do
31392      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31393      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31394      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31395    done
31396
31397    exit 0
31398  elif test "x$with_toolchain_type" != x; then
31399    # User override; check that it is valid
31400    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31401      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31402$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31403      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31404$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31405      as_fn_error $? "Cannot continue." "$LINENO" 5
31406    fi
31407    TOOLCHAIN_TYPE=$with_toolchain_type
31408  else
31409    # No flag given, use default
31410    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31411  fi
31412
31413
31414  TOOLCHAIN_CC_BINARY_clang="clang"
31415  TOOLCHAIN_CC_BINARY_gcc="gcc"
31416  TOOLCHAIN_CC_BINARY_microsoft="cl"
31417  TOOLCHAIN_CC_BINARY_solstudio="cc"
31418  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31419
31420  TOOLCHAIN_CXX_BINARY_clang="clang++"
31421  TOOLCHAIN_CXX_BINARY_gcc="g++"
31422  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31423  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31424  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31425
31426  # Use indirect variable referencing
31427  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31428  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31429  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31430  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31431  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31432  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31433  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31434  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31435
31436
31437  # Define filename patterns
31438  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31439    LIBRARY_PREFIX=
31440    SHARED_LIBRARY_SUFFIX='.dll'
31441    STATIC_LIBRARY_SUFFIX='.lib'
31442    SHARED_LIBRARY='$1.dll'
31443    STATIC_LIBRARY='$1.lib'
31444    OBJ_SUFFIX='.obj'
31445    EXE_SUFFIX='.exe'
31446  else
31447    LIBRARY_PREFIX=lib
31448    SHARED_LIBRARY_SUFFIX='.so'
31449    STATIC_LIBRARY_SUFFIX='.a'
31450    SHARED_LIBRARY='lib$1.so'
31451    STATIC_LIBRARY='lib$1.a'
31452    OBJ_SUFFIX='.o'
31453    EXE_SUFFIX=''
31454    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31455      # For full static builds, we're overloading the SHARED_LIBRARY
31456      # variables in order to limit the amount of changes required.
31457      # It would be better to remove SHARED and just use LIBRARY and
31458      # LIBRARY_SUFFIX for libraries that can be built either
31459      # shared or static and use STATIC_* for libraries that are
31460      # always built statically.
31461      if test "x$STATIC_BUILD" = xtrue; then
31462        SHARED_LIBRARY='lib$1.a'
31463        SHARED_LIBRARY_SUFFIX='.a'
31464      else
31465        SHARED_LIBRARY='lib$1.dylib'
31466        SHARED_LIBRARY_SUFFIX='.dylib'
31467      fi
31468    fi
31469  fi
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31481    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31482$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31483  else
31484    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31485$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31486  fi
31487
31488
31489# User supplied flags should be used when configure detects compilers
31490
31491  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31493$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31494  fi
31495
31496  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31497    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31498$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31499  fi
31500
31501  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31502    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31503$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31504  fi
31505
31506
31507# Check whether --with-extra-cflags was given.
31508if test "${with_extra_cflags+set}" = set; then :
31509  withval=$with_extra_cflags;
31510fi
31511
31512
31513
31514# Check whether --with-extra-cxxflags was given.
31515if test "${with_extra_cxxflags+set}" = set; then :
31516  withval=$with_extra_cxxflags;
31517fi
31518
31519
31520
31521# Check whether --with-extra-ldflags was given.
31522if test "${with_extra_ldflags+set}" = set; then :
31523  withval=$with_extra_ldflags;
31524fi
31525
31526
31527  EXTRA_CFLAGS="$with_extra_cflags"
31528  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31529  EXTRA_LDFLAGS="$with_extra_ldflags"
31530
31531
31532
31533
31534
31535  # The global CFLAGS and LDLAGS variables are used by configure tests and
31536  # should include the extra parameters
31537  CFLAGS="$EXTRA_CFLAGS"
31538  CXXFLAGS="$EXTRA_CXXFLAGS"
31539  LDFLAGS="$EXTRA_LDFLAGS"
31540  CPPFLAGS=""
31541
31542# The sysroot cflags are needed for configure to be able to run the compilers
31543
31544  if test "x$SYSROOT" != "x"; then
31545    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31546      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31547        # Solaris Studio does not have a concept of sysroot. Instead we must
31548        # make sure the default include and lib dirs are appended to each
31549        # compile and link command line. Must also add -I-xbuiltin to enable
31550        # inlining of system functions and intrinsics.
31551        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31552        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31553            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31554      fi
31555    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31556      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31557      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31558    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31559      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31560      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31561    fi
31562    # The global CFLAGS and LDFLAGS variables need these for configure to function
31563    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31564    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31565    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31566    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31567  fi
31568
31569  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31570    # We also need -iframework<path>/System/Library/Frameworks
31571    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31572    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31573    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31574    # set this here so it doesn't have to be peppered throughout the forest
31575    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31576    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31577  fi
31578
31579
31580
31581
31582
31583# Then detect the actual binaries needed
31584
31585  # FIXME: Is this needed?
31586  ac_ext=cpp
31587ac_cpp='$CXXCPP $CPPFLAGS'
31588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31591
31592
31593  # Store the CFLAGS etc passed to the configure script.
31594  ORG_CFLAGS="$CFLAGS"
31595  ORG_CXXFLAGS="$CXXFLAGS"
31596
31597  # autoconf magic only relies on PATH, so update it if tools dir is specified
31598  OLD_PATH="$PATH"
31599
31600  # On Windows, we need to detect the visual studio installation first.
31601  # This will change the PATH, but we need to keep that new PATH even
31602  # after toolchain detection is done, since the compiler (on x86) uses
31603  # it for DLL resolution in runtime.
31604  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31605      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31606
31607  # Store path to cygwin link.exe to help excluding it when searching for
31608  # VS linker. This must be done before changing the PATH when looking for VS.
31609  # Extract the first word of "link", so it can be a program name with args.
31610set dummy link; ac_word=$2
31611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31612$as_echo_n "checking for $ac_word... " >&6; }
31613if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31614  $as_echo_n "(cached) " >&6
31615else
31616  case $CYGWIN_LINK in
31617  [\\/]* | ?:[\\/]*)
31618  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31619  ;;
31620  *)
31621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31622for as_dir in $PATH
31623do
31624  IFS=$as_save_IFS
31625  test -z "$as_dir" && as_dir=.
31626    for ac_exec_ext in '' $ac_executable_extensions; do
31627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31628    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31630    break 2
31631  fi
31632done
31633  done
31634IFS=$as_save_IFS
31635
31636  ;;
31637esac
31638fi
31639CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31640if test -n "$CYGWIN_LINK"; then
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31642$as_echo "$CYGWIN_LINK" >&6; }
31643else
31644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31645$as_echo "no" >&6; }
31646fi
31647
31648
31649  if test "x$CYGWIN_LINK" != x; then
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31651$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31652    "$CYGWIN_LINK" --version > /dev/null
31653    if test $? -eq 0 ; then
31654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31655$as_echo "yes" >&6; }
31656    else
31657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31658$as_echo "no" >&6; }
31659      # This might be the VS linker. Don't exclude it later on.
31660      CYGWIN_LINK=""
31661    fi
31662  fi
31663
31664  # First-hand choice is to locate and run the vsvars bat file.
31665
31666
31667# Check whether --with-toolchain-version was given.
31668if test "${with_toolchain_version+set}" = set; then :
31669  withval=$with_toolchain_version;
31670fi
31671
31672
31673  if test "x$with_toolchain_version" = xlist; then
31674    # List all toolchains
31675    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31676$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31677    for version in $VALID_VS_VERSIONS; do
31678      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31679      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31680    done
31681
31682    exit 0
31683  elif test "x$DEVKIT_VS_VERSION" != x; then
31684    VS_VERSION=$DEVKIT_VS_VERSION
31685    TOOLCHAIN_VERSION=$VS_VERSION
31686    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31687    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31688    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31689    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31690    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31691    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31692
31693    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31694    # can still be exported as INCLUDE for compiler invocations without
31695    # SYSROOT_CFLAGS
31696    OLDIFS="$IFS"
31697    IFS=";"
31698    for i in $DEVKIT_VS_INCLUDE; do
31699      ipath=$i
31700
31701  unix_path="$ipath"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    windows_path=`$CYGPATH -m "$unix_path"`
31704    ipath="$windows_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    windows_path=`cmd //c echo $unix_path`
31707    ipath="$windows_path"
31708  fi
31709
31710      VS_INCLUDE="$VS_INCLUDE;$ipath"
31711    done
31712    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31713    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31714    for i in $DEVKIT_VS_LIB; do
31715      libpath=$i
31716
31717  unix_path="$libpath"
31718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31719    windows_path=`$CYGPATH -m "$unix_path"`
31720    libpath="$windows_path"
31721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31722    windows_path=`cmd //c echo $unix_path`
31723    libpath="$windows_path"
31724  fi
31725
31726      VS_LIB="$VS_LIB;$libpath"
31727    done
31728    IFS="$OLDIFS"
31729
31730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31731$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31732
31733  elif test "x$with_toolchain_version" != x; then
31734    # User override; check that it is valid
31735    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31736      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31737$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31739$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31740      as_fn_error $? "Cannot continue." "$LINENO" 5
31741    fi
31742    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31743  else
31744    # No flag given, use default
31745    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31746  fi
31747
31748  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31749
31750  VS_VERSION="$VS_VERSION"
31751  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31752  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31753  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31754  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31755
31756  # When using --with-tools-dir, assume it points to the correct and default
31757  # version of Visual Studio or that --with-toolchain-version was also set.
31758  if test "x$with_tools_dir" != x; then
31759
31760  if test "x$VS_ENV_CMD" = x; then
31761    VS_VERSION="${VS_VERSION}"
31762    VS_BASE="$with_tools_dir/../.."
31763    METHOD="--with-tools-dir"
31764
31765    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31766      VCVARSFILE="vc/bin/vcvars32.bat"
31767    else
31768      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31769    fi
31770
31771
31772  windows_path="$VS_BASE"
31773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31774    unix_path=`$CYGPATH -u "$windows_path"`
31775    VS_BASE="$unix_path"
31776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31778    VS_BASE="$unix_path"
31779  fi
31780
31781    if test -d "$VS_BASE"; then
31782      if test -f "$VS_BASE/$VCVARSFILE"; then
31783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31785        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31786        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31787        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31788        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31789      else
31790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31791$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31792        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31793$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31794      fi
31795    fi
31796  fi
31797
31798
31799  if test "x$VS_ENV_CMD" = x; then
31800    VS_VERSION="${VS_VERSION}"
31801    VS_BASE="$with_tools_dir/../../.."
31802    METHOD="--with-tools-dir"
31803
31804    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31805      VCVARSFILE="vc/bin/vcvars32.bat"
31806    else
31807      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31808    fi
31809
31810
31811  windows_path="$VS_BASE"
31812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31813    unix_path=`$CYGPATH -u "$windows_path"`
31814    VS_BASE="$unix_path"
31815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31817    VS_BASE="$unix_path"
31818  fi
31819
31820    if test -d "$VS_BASE"; then
31821      if test -f "$VS_BASE/$VCVARSFILE"; then
31822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31823$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31824        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31825        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31826        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31827        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31828      else
31829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31830$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31832$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31833      fi
31834    fi
31835  fi
31836
31837    if test "x$VS_ENV_CMD" = x; then
31838      # Having specified an argument which is incorrect will produce an instant failure;
31839      # we should not go on looking
31840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31841$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31842      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31843$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31844      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31845$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31846      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31847    fi
31848  fi
31849
31850  VS_ENV_CMD=""
31851  VS_ENV_ARGS=""
31852
31853  if test "x$VS_COMNTOOLS" != x; then
31854
31855  if test "x$VS_ENV_CMD" = x; then
31856    VS_VERSION="${VS_VERSION}"
31857    VS_BASE="$VS_COMNTOOLS/../.."
31858    METHOD="$VS_COMNTOOLS_VAR variable"
31859
31860    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31861      VCVARSFILE="vc/bin/vcvars32.bat"
31862    else
31863      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31864    fi
31865
31866
31867  windows_path="$VS_BASE"
31868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31869    unix_path=`$CYGPATH -u "$windows_path"`
31870    VS_BASE="$unix_path"
31871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31873    VS_BASE="$unix_path"
31874  fi
31875
31876    if test -d "$VS_BASE"; then
31877      if test -f "$VS_BASE/$VCVARSFILE"; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31880        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31881        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31882        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31883        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31884      else
31885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31888$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31889      fi
31890    fi
31891  fi
31892
31893  fi
31894  if test "x$PROGRAMFILES" != x; then
31895
31896  if test "x$VS_ENV_CMD" = x; then
31897    VS_VERSION="${VS_VERSION}"
31898    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31899    METHOD="well-known name"
31900
31901    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31902      VCVARSFILE="vc/bin/vcvars32.bat"
31903    else
31904      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31905    fi
31906
31907
31908  windows_path="$VS_BASE"
31909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31910    unix_path=`$CYGPATH -u "$windows_path"`
31911    VS_BASE="$unix_path"
31912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31914    VS_BASE="$unix_path"
31915  fi
31916
31917    if test -d "$VS_BASE"; then
31918      if test -f "$VS_BASE/$VCVARSFILE"; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31921        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31922        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31923        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31924        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31925      else
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31929$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31930      fi
31931    fi
31932  fi
31933
31934  fi
31935  # Work around the insanely named ProgramFiles(x86) env variable
31936  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31937  if test "x$PROGRAMFILES_X86" != x; then
31938
31939  if test "x$VS_ENV_CMD" = x; then
31940    VS_VERSION="${VS_VERSION}"
31941    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31942    METHOD="well-known name"
31943
31944    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31945      VCVARSFILE="vc/bin/vcvars32.bat"
31946    else
31947      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31948    fi
31949
31950
31951  windows_path="$VS_BASE"
31952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31953    unix_path=`$CYGPATH -u "$windows_path"`
31954    VS_BASE="$unix_path"
31955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31957    VS_BASE="$unix_path"
31958  fi
31959
31960    if test -d "$VS_BASE"; then
31961      if test -f "$VS_BASE/$VCVARSFILE"; then
31962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31964        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31965        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31966        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31967        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31968      else
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31970$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31971        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31972$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31973      fi
31974    fi
31975  fi
31976
31977  fi
31978
31979  if test "x$VS_ENV_CMD" = x; then
31980    VS_VERSION="${VS_VERSION}"
31981    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31982    METHOD="well-known name"
31983
31984    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31985      VCVARSFILE="vc/bin/vcvars32.bat"
31986    else
31987      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31988    fi
31989
31990
31991  windows_path="$VS_BASE"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    VS_BASE="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    VS_BASE="$unix_path"
31998  fi
31999
32000    if test -d "$VS_BASE"; then
32001      if test -f "$VS_BASE/$VCVARSFILE"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32004        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32005        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32006        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32007        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32008      else
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32010$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32012$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32013      fi
32014    fi
32015  fi
32016
32017
32018  if test "x$VS_ENV_CMD" = x; then
32019    VS_VERSION="${VS_VERSION}"
32020    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32021    METHOD="well-known name"
32022
32023    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32024      VCVARSFILE="vc/bin/vcvars32.bat"
32025    else
32026      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32027    fi
32028
32029
32030  windows_path="$VS_BASE"
32031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32032    unix_path=`$CYGPATH -u "$windows_path"`
32033    VS_BASE="$unix_path"
32034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32036    VS_BASE="$unix_path"
32037  fi
32038
32039    if test -d "$VS_BASE"; then
32040      if test -f "$VS_BASE/$VCVARSFILE"; then
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32042$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32043        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32044        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32045        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32046        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32047      else
32048        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32049$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32051$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32052      fi
32053    fi
32054  fi
32055
32056
32057  if test "x$SDK_INSTALL_DIR" != x; then
32058    if test "x$ProgramW6432" != x; then
32059
32060  if test "x$VS_ENV_CMD" = x; then
32061    VS_VERSION="${VS_VERSION}"
32062    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32063    METHOD="well-known name"
32064
32065  windows_path="$WIN_SDK_BASE"
32066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32067    unix_path=`$CYGPATH -u "$windows_path"`
32068    WIN_SDK_BASE="$unix_path"
32069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32071    WIN_SDK_BASE="$unix_path"
32072  fi
32073
32074    if test -d "$WIN_SDK_BASE"; then
32075      # There have been cases of partial or broken SDK installations. A missing
32076      # lib dir is not going to work.
32077      if test ! -d "$WIN_SDK_BASE/lib"; then
32078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32081$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32082      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32084$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32085        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32086        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32087          VS_ENV_ARGS="/x86"
32088        else
32089          VS_ENV_ARGS="/x64"
32090        fi
32091        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32092        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32093        # TODO: improve detection for other versions of SDK
32094        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32095      else
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32099$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32100      fi
32101    fi
32102  fi
32103
32104    fi
32105    if test "x$PROGRAMW6432" != x; then
32106
32107  if test "x$VS_ENV_CMD" = x; then
32108    VS_VERSION="${VS_VERSION}"
32109    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32110    METHOD="well-known name"
32111
32112  windows_path="$WIN_SDK_BASE"
32113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32114    unix_path=`$CYGPATH -u "$windows_path"`
32115    WIN_SDK_BASE="$unix_path"
32116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32118    WIN_SDK_BASE="$unix_path"
32119  fi
32120
32121    if test -d "$WIN_SDK_BASE"; then
32122      # There have been cases of partial or broken SDK installations. A missing
32123      # lib dir is not going to work.
32124      if test ! -d "$WIN_SDK_BASE/lib"; then
32125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32129      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32132        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32134          VS_ENV_ARGS="/x86"
32135        else
32136          VS_ENV_ARGS="/x64"
32137        fi
32138        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32139        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32140        # TODO: improve detection for other versions of SDK
32141        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32142      else
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32146$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32147      fi
32148    fi
32149  fi
32150
32151    fi
32152    if test "x$PROGRAMFILES" != x; then
32153
32154  if test "x$VS_ENV_CMD" = x; then
32155    VS_VERSION="${VS_VERSION}"
32156    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32157    METHOD="well-known name"
32158
32159  windows_path="$WIN_SDK_BASE"
32160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32161    unix_path=`$CYGPATH -u "$windows_path"`
32162    WIN_SDK_BASE="$unix_path"
32163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32165    WIN_SDK_BASE="$unix_path"
32166  fi
32167
32168    if test -d "$WIN_SDK_BASE"; then
32169      # There have been cases of partial or broken SDK installations. A missing
32170      # lib dir is not going to work.
32171      if test ! -d "$WIN_SDK_BASE/lib"; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32175$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32176      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32179        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32180        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32181          VS_ENV_ARGS="/x86"
32182        else
32183          VS_ENV_ARGS="/x64"
32184        fi
32185        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32186        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32187        # TODO: improve detection for other versions of SDK
32188        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32189      else
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32193$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32194      fi
32195    fi
32196  fi
32197
32198    fi
32199
32200  if test "x$VS_ENV_CMD" = x; then
32201    VS_VERSION="${VS_VERSION}"
32202    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32203    METHOD="well-known name"
32204
32205  windows_path="$WIN_SDK_BASE"
32206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32207    unix_path=`$CYGPATH -u "$windows_path"`
32208    WIN_SDK_BASE="$unix_path"
32209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32211    WIN_SDK_BASE="$unix_path"
32212  fi
32213
32214    if test -d "$WIN_SDK_BASE"; then
32215      # There have been cases of partial or broken SDK installations. A missing
32216      # lib dir is not going to work.
32217      if test ! -d "$WIN_SDK_BASE/lib"; then
32218        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32219$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32220        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32221$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32222      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32225        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32226        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32227          VS_ENV_ARGS="/x86"
32228        else
32229          VS_ENV_ARGS="/x64"
32230        fi
32231        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32232        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32233        # TODO: improve detection for other versions of SDK
32234        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32235      else
32236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32239$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32240      fi
32241    fi
32242  fi
32243
32244
32245  if test "x$VS_ENV_CMD" = x; then
32246    VS_VERSION="${VS_VERSION}"
32247    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32248    METHOD="well-known name"
32249
32250  windows_path="$WIN_SDK_BASE"
32251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32252    unix_path=`$CYGPATH -u "$windows_path"`
32253    WIN_SDK_BASE="$unix_path"
32254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32256    WIN_SDK_BASE="$unix_path"
32257  fi
32258
32259    if test -d "$WIN_SDK_BASE"; then
32260      # There have been cases of partial or broken SDK installations. A missing
32261      # lib dir is not going to work.
32262      if test ! -d "$WIN_SDK_BASE/lib"; then
32263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32266$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32267      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32269$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32270        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32271        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32272          VS_ENV_ARGS="/x86"
32273        else
32274          VS_ENV_ARGS="/x64"
32275        fi
32276        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32277        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32278        # TODO: improve detection for other versions of SDK
32279        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32280      else
32281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32284$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32285      fi
32286    fi
32287  fi
32288
32289  fi
32290
32291    if test "x$VS_ENV_CMD" != x; then
32292      TOOLCHAIN_VERSION=$VS_VERSION
32293      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32294      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32295      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32296      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32297      # The rest of the variables are already evaled while probing
32298      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32299$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32300      break
32301    fi
32302  done
32303
32304
32305  # If we have a devkit, skip all of the below.
32306  if test "x$DEVKIT_VS_VERSION" = x; then
32307    if test "x$VS_ENV_CMD" != x; then
32308      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32309
32310  # Only process if variable expands to non-empty
32311
32312  if test "x$VS_ENV_CMD" != x; then
32313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32314
32315  # First separate the path from the arguments. This will split at the first
32316  # space.
32317  complete="$VS_ENV_CMD"
32318  path="${complete%% *}"
32319  tmp="$complete EOL"
32320  arguments="${tmp#* }"
32321
32322  # Input might be given as Windows format, start by converting to
32323  # unix format.
32324  new_path=`$CYGPATH -u "$path"`
32325
32326  # Now try to locate executable using which
32327  new_path=`$WHICH "$new_path" 2> /dev/null`
32328  # bat and cmd files are not always considered executable in cygwin causing which
32329  # to not find them
32330  if test "x$new_path" = x \
32331      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32332      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32333    new_path=`$CYGPATH -u "$path"`
32334  fi
32335  if test "x$new_path" = x; then
32336    # Oops. Which didn't find the executable.
32337    # The splitting of arguments from the executable at a space might have been incorrect,
32338    # since paths with space are more likely in Windows. Give it another try with the whole
32339    # argument.
32340    path="$complete"
32341    arguments="EOL"
32342    new_path=`$CYGPATH -u "$path"`
32343    new_path=`$WHICH "$new_path" 2> /dev/null`
32344    # bat and cmd files are not always considered executable in cygwin causing which
32345    # to not find them
32346    if test "x$new_path" = x \
32347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32349      new_path=`$CYGPATH -u "$path"`
32350    fi
32351    if test "x$new_path" = x; then
32352      # It's still not found. Now this is an unrecoverable error.
32353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32354$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32355      has_space=`$ECHO "$complete" | $GREP " "`
32356      if test "x$has_space" != x; then
32357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32359      fi
32360      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32361    fi
32362  fi
32363
32364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32367  # "foo.exe" is OK but "foo" is an error.
32368  #
32369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32370  # It is also a way to make sure we got the proper file name for the real test later on.
32371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32372  if test "x$test_shortpath" = x; then
32373    # Short path failed, file does not exist as specified.
32374    # Try adding .exe or .cmd
32375    if test -f "${new_path}.exe"; then
32376      input_to_shortpath="${new_path}.exe"
32377    elif test -f "${new_path}.cmd"; then
32378      input_to_shortpath="${new_path}.cmd"
32379    else
32380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32381$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32384      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32385    fi
32386  else
32387    input_to_shortpath="$new_path"
32388  fi
32389
32390  # Call helper function which possibly converts this using DOS-style short mode.
32391  # If so, the updated path is stored in $new_path.
32392  new_path="$input_to_shortpath"
32393
32394  input_path="$input_to_shortpath"
32395  # Check if we need to convert this using DOS-style short mode. If the path
32396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32397  # take no chances and rewrite it.
32398  # Note: m4 eats our [], so we need to use [ and ] instead.
32399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32400  if test "x$has_forbidden_chars" != x; then
32401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32405      # Going to short mode and back again did indeed matter. Since short mode is
32406      # case insensitive, let's make it lowercase to improve readability.
32407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32408      # Now convert it back to Unix-style (cygpath)
32409      input_path=`$CYGPATH -u "$shortmode_path"`
32410      new_path="$input_path"
32411    fi
32412  fi
32413
32414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32415  if test "x$test_cygdrive_prefix" = x; then
32416    # As a simple fix, exclude /usr/bin since it's not a real path.
32417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32419      # a path prefixed by /cygdrive for fixpath to work.
32420      new_path="$CYGWIN_ROOT_PATH$input_path"
32421    fi
32422  fi
32423
32424  # remove trailing .exe if any
32425  new_path="${new_path/%.exe/}"
32426
32427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32428
32429  # First separate the path from the arguments. This will split at the first
32430  # space.
32431  complete="$VS_ENV_CMD"
32432  path="${complete%% *}"
32433  tmp="$complete EOL"
32434  arguments="${tmp#* }"
32435
32436  # Input might be given as Windows format, start by converting to
32437  # unix format.
32438  new_path="$path"
32439
32440  windows_path="$new_path"
32441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442    unix_path=`$CYGPATH -u "$windows_path"`
32443    new_path="$unix_path"
32444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446    new_path="$unix_path"
32447  fi
32448
32449
32450  # Now try to locate executable using which
32451  new_path=`$WHICH "$new_path" 2> /dev/null`
32452
32453  if test "x$new_path" = x; then
32454    # Oops. Which didn't find the executable.
32455    # The splitting of arguments from the executable at a space might have been incorrect,
32456    # since paths with space are more likely in Windows. Give it another try with the whole
32457    # argument.
32458    path="$complete"
32459    arguments="EOL"
32460    new_path="$path"
32461
32462  windows_path="$new_path"
32463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32464    unix_path=`$CYGPATH -u "$windows_path"`
32465    new_path="$unix_path"
32466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32468    new_path="$unix_path"
32469  fi
32470
32471
32472    new_path=`$WHICH "$new_path" 2> /dev/null`
32473    # bat and cmd files are not always considered executable in MSYS causing which
32474    # to not find them
32475    if test "x$new_path" = x \
32476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32478      new_path="$path"
32479
32480  windows_path="$new_path"
32481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32482    unix_path=`$CYGPATH -u "$windows_path"`
32483    new_path="$unix_path"
32484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32486    new_path="$unix_path"
32487  fi
32488
32489    fi
32490
32491    if test "x$new_path" = x; then
32492      # It's still not found. Now this is an unrecoverable error.
32493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32494$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32495      has_space=`$ECHO "$complete" | $GREP " "`
32496      if test "x$has_space" != x; then
32497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32499      fi
32500      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32501    fi
32502  fi
32503
32504  # Now new_path has a complete unix path to the binary
32505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32506    # Keep paths in /bin as-is, but remove trailing .exe if any
32507    new_path="${new_path/%.exe/}"
32508    # Do not save /bin paths to all_fixpath_prefixes!
32509  else
32510    # Not in mixed or Windows style, start by that.
32511    new_path=`cmd //c echo $new_path`
32512
32513  input_path="$new_path"
32514  # Check if we need to convert this using DOS-style short mode. If the path
32515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32516  # take no chances and rewrite it.
32517  # Note: m4 eats our [], so we need to use [ and ] instead.
32518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32519  if test "x$has_forbidden_chars" != x; then
32520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32522  fi
32523
32524    # Output is in $new_path
32525
32526  windows_path="$new_path"
32527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32528    unix_path=`$CYGPATH -u "$windows_path"`
32529    new_path="$unix_path"
32530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32532    new_path="$unix_path"
32533  fi
32534
32535    # remove trailing .exe if any
32536    new_path="${new_path/%.exe/}"
32537
32538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32540  fi
32541
32542    else
32543      # We're on a unix platform. Hooray! :)
32544      # First separate the path from the arguments. This will split at the first
32545      # space.
32546      complete="$VS_ENV_CMD"
32547      path="${complete%% *}"
32548      tmp="$complete EOL"
32549      arguments="${tmp#* }"
32550
32551      # Cannot rely on the command "which" here since it doesn't always work.
32552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32553      if test -z "$is_absolute_path"; then
32554        # Path to executable is not absolute. Find it.
32555        IFS_save="$IFS"
32556        IFS=:
32557        for p in $PATH; do
32558          if test -f "$p/$path" && test -x "$p/$path"; then
32559            new_path="$p/$path"
32560            break
32561          fi
32562        done
32563        IFS="$IFS_save"
32564      else
32565        # This is an absolute path, we can use it without further modifications.
32566        new_path="$path"
32567      fi
32568
32569      if test "x$new_path" = x; then
32570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32571$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32572        has_space=`$ECHO "$complete" | $GREP " "`
32573        if test "x$has_space" != x; then
32574          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32576        fi
32577        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32578      fi
32579    fi
32580
32581    # Now join together the path and the arguments once again
32582    if test "x$arguments" != xEOL; then
32583      new_complete="$new_path ${arguments% *}"
32584    else
32585      new_complete="$new_path"
32586    fi
32587
32588    if test "x$complete" != "x$new_complete"; then
32589      VS_ENV_CMD="$new_complete"
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32591$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32592    fi
32593  fi
32594
32595
32596      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32597      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32598$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32599
32600      # We need to create a couple of temporary files.
32601      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32602      $MKDIR -p $VS_ENV_TMP_DIR
32603
32604      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32605      # Instead create a shell script which will set the relevant variables when run.
32606      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32607
32608  unix_path="$WINPATH_VS_ENV_CMD"
32609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32610    windows_path=`$CYGPATH -m "$unix_path"`
32611    WINPATH_VS_ENV_CMD="$windows_path"
32612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32613    windows_path=`cmd //c echo $unix_path`
32614    WINPATH_VS_ENV_CMD="$windows_path"
32615  fi
32616
32617      WINPATH_BASH="$BASH"
32618
32619  unix_path="$WINPATH_BASH"
32620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32621    windows_path=`$CYGPATH -m "$unix_path"`
32622    WINPATH_BASH="$windows_path"
32623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32624    windows_path=`cmd //c echo $unix_path`
32625    WINPATH_BASH="$windows_path"
32626  fi
32627
32628
32629      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32630      # script (executable by bash) that will setup the important variables.
32631      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32632      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32633      # This will end up something like:
32634      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32635      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32636      # These will end up something like:
32637      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32638      # The trailing space for everyone except PATH is no typo, but is needed due
32639      # to trailing \ in the Windows paths. These will be stripped later.
32640      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32641          >> $EXTRACT_VC_ENV_BAT_FILE
32642      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32643          >> $EXTRACT_VC_ENV_BAT_FILE
32644      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32645          >> $EXTRACT_VC_ENV_BAT_FILE
32646      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32647          >> $EXTRACT_VC_ENV_BAT_FILE
32648      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32649          >> $EXTRACT_VC_ENV_BAT_FILE
32650      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32651          >> $EXTRACT_VC_ENV_BAT_FILE
32652
32653      # Now execute the newly created bat file.
32654      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32655      # Change directory so we don't need to mess with Windows paths in redirects.
32656      cd $VS_ENV_TMP_DIR
32657      cmd /c extract-vs-env.bat | $CAT
32658      cd $CURDIR
32659
32660      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32662$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32664$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32666$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32667        as_fn_error $? "Cannot continue" "$LINENO" 5
32668      fi
32669
32670      # Now set all paths and other env variables. This will allow the rest of
32671      # the configure script to find and run the compiler in the proper way.
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32673$as_echo "$as_me: Setting extracted environment variables" >&6;}
32674      . $VS_ENV_TMP_DIR/set-vs-env.sh
32675      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32676      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32677    else
32678      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32679      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32680$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32681    fi
32682  fi
32683
32684  # At this point, we should have correct variables in the environment, or we can't continue.
32685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32686$as_echo_n "checking for Visual Studio variables... " >&6; }
32687
32688  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32689      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32690    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32692$as_echo "present but broken" >&6; }
32693      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32694    else
32695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32696$as_echo "ok" >&6; }
32697      # Remove any trailing "\" ";" and " " from the variables.
32698      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32699      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32700      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32701      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32702      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32703      # Remove any paths containing # (typically F#) as that messes up make. This
32704      # is needed if visual studio was installed with F# support.
32705      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32706
32707
32708
32709
32710
32711      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32712      OLDIFS="$IFS"
32713      IFS=";"
32714      for i in $VS_INCLUDE; do
32715        ipath=$i
32716        # Only process non-empty elements
32717        if test "x$ipath" != x; then
32718          IFS="$OLDIFS"
32719          # Check that directory exists before calling fixup_path
32720          testpath=$ipath
32721
32722  windows_path="$testpath"
32723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32724    unix_path=`$CYGPATH -u "$windows_path"`
32725    testpath="$unix_path"
32726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32728    testpath="$unix_path"
32729  fi
32730
32731          if test -d "$testpath"; then
32732
32733  # Only process if variable expands to non-empty
32734
32735  if test "x$ipath" != x; then
32736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32737
32738  # Input might be given as Windows format, start by converting to
32739  # unix format.
32740  path="$ipath"
32741  new_path=`$CYGPATH -u "$path"`
32742
32743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32746  # "foo.exe" is OK but "foo" is an error.
32747  #
32748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32749  # It is also a way to make sure we got the proper file name for the real test later on.
32750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32751  if test "x$test_shortpath" = x; then
32752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32753$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32754    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32755  fi
32756
32757  # Call helper function which possibly converts this using DOS-style short mode.
32758  # If so, the updated path is stored in $new_path.
32759
32760  input_path="$new_path"
32761  # Check if we need to convert this using DOS-style short mode. If the path
32762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32763  # take no chances and rewrite it.
32764  # Note: m4 eats our [], so we need to use [ and ] instead.
32765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32766  if test "x$has_forbidden_chars" != x; then
32767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32771      # Going to short mode and back again did indeed matter. Since short mode is
32772      # case insensitive, let's make it lowercase to improve readability.
32773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32774      # Now convert it back to Unix-style (cygpath)
32775      input_path=`$CYGPATH -u "$shortmode_path"`
32776      new_path="$input_path"
32777    fi
32778  fi
32779
32780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32781  if test "x$test_cygdrive_prefix" = x; then
32782    # As a simple fix, exclude /usr/bin since it's not a real path.
32783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32785      # a path prefixed by /cygdrive for fixpath to work.
32786      new_path="$CYGWIN_ROOT_PATH$input_path"
32787    fi
32788  fi
32789
32790
32791  if test "x$path" != "x$new_path"; then
32792    ipath="$new_path"
32793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32794$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32795  fi
32796
32797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32798
32799  path="$ipath"
32800  has_colon=`$ECHO $path | $GREP ^.:`
32801  new_path="$path"
32802  if test "x$has_colon" = x; then
32803    # Not in mixed or Windows style, start by that.
32804    new_path=`cmd //c echo $path`
32805  fi
32806
32807
32808  input_path="$new_path"
32809  # Check if we need to convert this using DOS-style short mode. If the path
32810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32811  # take no chances and rewrite it.
32812  # Note: m4 eats our [], so we need to use [ and ] instead.
32813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32814  if test "x$has_forbidden_chars" != x; then
32815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32817  fi
32818
32819
32820  windows_path="$new_path"
32821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822    unix_path=`$CYGPATH -u "$windows_path"`
32823    new_path="$unix_path"
32824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32826    new_path="$unix_path"
32827  fi
32828
32829  if test "x$path" != "x$new_path"; then
32830    ipath="$new_path"
32831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32832$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32833  fi
32834
32835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32837
32838    else
32839      # We're on a unix platform. Hooray! :)
32840      path="$ipath"
32841      has_space=`$ECHO "$path" | $GREP " "`
32842      if test "x$has_space" != x; then
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32844$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32846      fi
32847
32848      # Use eval to expand a potential ~
32849      eval path="$path"
32850      if test ! -f "$path" && test ! -d "$path"; then
32851        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32852      fi
32853
32854      if test -d "$path"; then
32855        ipath="`cd "$path"; $THEPWDCMD -L`"
32856      else
32857        dir="`$DIRNAME "$path"`"
32858        base="`$BASENAME "$path"`"
32859        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32860      fi
32861    fi
32862  fi
32863
32864            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32865          fi
32866          IFS=";"
32867        fi
32868      done
32869      # Convert VS_LIB into SYSROOT_LDFLAGS
32870      for i in $VS_LIB; do
32871        libpath=$i
32872        # Only process non-empty elements
32873        if test "x$libpath" != x; then
32874          IFS="$OLDIFS"
32875          # Check that directory exists before calling fixup_path
32876          testpath=$libpath
32877
32878  windows_path="$testpath"
32879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880    unix_path=`$CYGPATH -u "$windows_path"`
32881    testpath="$unix_path"
32882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32884    testpath="$unix_path"
32885  fi
32886
32887          if test -d "$testpath"; then
32888
32889  # Only process if variable expands to non-empty
32890
32891  if test "x$libpath" != x; then
32892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32893
32894  # Input might be given as Windows format, start by converting to
32895  # unix format.
32896  path="$libpath"
32897  new_path=`$CYGPATH -u "$path"`
32898
32899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32902  # "foo.exe" is OK but "foo" is an error.
32903  #
32904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32905  # It is also a way to make sure we got the proper file name for the real test later on.
32906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32907  if test "x$test_shortpath" = x; then
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32909$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32910    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32911  fi
32912
32913  # Call helper function which possibly converts this using DOS-style short mode.
32914  # If so, the updated path is stored in $new_path.
32915
32916  input_path="$new_path"
32917  # Check if we need to convert this using DOS-style short mode. If the path
32918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32919  # take no chances and rewrite it.
32920  # Note: m4 eats our [], so we need to use [ and ] instead.
32921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32922  if test "x$has_forbidden_chars" != x; then
32923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32927      # Going to short mode and back again did indeed matter. Since short mode is
32928      # case insensitive, let's make it lowercase to improve readability.
32929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32930      # Now convert it back to Unix-style (cygpath)
32931      input_path=`$CYGPATH -u "$shortmode_path"`
32932      new_path="$input_path"
32933    fi
32934  fi
32935
32936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32937  if test "x$test_cygdrive_prefix" = x; then
32938    # As a simple fix, exclude /usr/bin since it's not a real path.
32939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32941      # a path prefixed by /cygdrive for fixpath to work.
32942      new_path="$CYGWIN_ROOT_PATH$input_path"
32943    fi
32944  fi
32945
32946
32947  if test "x$path" != "x$new_path"; then
32948    libpath="$new_path"
32949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32950$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32951  fi
32952
32953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32954
32955  path="$libpath"
32956  has_colon=`$ECHO $path | $GREP ^.:`
32957  new_path="$path"
32958  if test "x$has_colon" = x; then
32959    # Not in mixed or Windows style, start by that.
32960    new_path=`cmd //c echo $path`
32961  fi
32962
32963
32964  input_path="$new_path"
32965  # Check if we need to convert this using DOS-style short mode. If the path
32966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32967  # take no chances and rewrite it.
32968  # Note: m4 eats our [], so we need to use [ and ] instead.
32969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32970  if test "x$has_forbidden_chars" != x; then
32971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32973  fi
32974
32975
32976  windows_path="$new_path"
32977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978    unix_path=`$CYGPATH -u "$windows_path"`
32979    new_path="$unix_path"
32980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32982    new_path="$unix_path"
32983  fi
32984
32985  if test "x$path" != "x$new_path"; then
32986    libpath="$new_path"
32987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32988$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32989  fi
32990
32991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32993
32994    else
32995      # We're on a unix platform. Hooray! :)
32996      path="$libpath"
32997      has_space=`$ECHO "$path" | $GREP " "`
32998      if test "x$has_space" != x; then
32999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33000$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33002      fi
33003
33004      # Use eval to expand a potential ~
33005      eval path="$path"
33006      if test ! -f "$path" && test ! -d "$path"; then
33007        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33008      fi
33009
33010      if test -d "$path"; then
33011        libpath="`cd "$path"; $THEPWDCMD -L`"
33012      else
33013        dir="`$DIRNAME "$path"`"
33014        base="`$BASENAME "$path"`"
33015        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33016      fi
33017    fi
33018  fi
33019
33020            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33021          fi
33022          IFS=";"
33023        fi
33024      done
33025      IFS="$OLDIFS"
33026    fi
33027  else
33028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33029$as_echo "not found" >&6; }
33030
33031    if test "x$VS_ENV_CMD" = x; then
33032      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33033$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33034      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33035$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33036    else
33037      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33038$as_echo "$as_me: Running the extraction script failed." >&6;}
33039    fi
33040    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33041$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33042    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33043$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33044    as_fn_error $? "Cannot continue" "$LINENO" 5
33045  fi
33046
33047    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33048    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33049    PATH="$VS_PATH"
33050    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33051    export INCLUDE="$VS_INCLUDE"
33052    export LIB="$VS_LIB"
33053  else
33054    if test "x$XCODE_VERSION_OUTPUT" != x; then
33055      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33056      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33057      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33058    else
33059      # Currently we do not define this for other toolchains. This might change as the need arise.
33060      TOOLCHAIN_VERSION=
33061    fi
33062  fi
33063
33064
33065  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33066  # override all other locations.
33067  if test "x$TOOLCHAIN_PATH" != x; then
33068    PATH=$TOOLCHAIN_PATH:$PATH
33069  fi
33070
33071
33072  #
33073  # Setup the compilers (CC and CXX)
33074  #
33075
33076  COMPILER_NAME=C
33077  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33078
33079  if test "x$CC" != x; then
33080    # User has supplied compiler name already, always let that override.
33081    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33082$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33083    if test "x`basename $CC`" = "x$CC"; then
33084      # A command without a complete path is provided, search $PATH.
33085
33086      for ac_prog in $CC
33087do
33088  # Extract the first word of "$ac_prog", so it can be a program name with args.
33089set dummy $ac_prog; ac_word=$2
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33091$as_echo_n "checking for $ac_word... " >&6; }
33092if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33093  $as_echo_n "(cached) " >&6
33094else
33095  case $POTENTIAL_CC in
33096  [\\/]* | ?:[\\/]*)
33097  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33098  ;;
33099  *)
33100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33101for as_dir in $PATH
33102do
33103  IFS=$as_save_IFS
33104  test -z "$as_dir" && as_dir=.
33105    for ac_exec_ext in '' $ac_executable_extensions; do
33106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33107    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33109    break 2
33110  fi
33111done
33112  done
33113IFS=$as_save_IFS
33114
33115  ;;
33116esac
33117fi
33118POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33119if test -n "$POTENTIAL_CC"; then
33120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33121$as_echo "$POTENTIAL_CC" >&6; }
33122else
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33124$as_echo "no" >&6; }
33125fi
33126
33127
33128  test -n "$POTENTIAL_CC" && break
33129done
33130
33131      if test "x$POTENTIAL_CC" != x; then
33132        CC=$POTENTIAL_CC
33133      else
33134        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33135      fi
33136    else
33137      # Otherwise it might already be a complete path
33138      if test ! -x "$CC"; then
33139        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33140      fi
33141    fi
33142  else
33143    # No user supplied value. Locate compiler ourselves.
33144
33145    # If we are cross compiling, assume cross compilation tools follows the
33146    # cross compilation standard where they are prefixed with the autoconf
33147    # standard name for the target. For example the binary
33148    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33149    # If we are not cross compiling, then the default compiler name will be
33150    # used.
33151
33152    CC=
33153    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33154    # before checking the rest of the PATH.
33155    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33156    # step, this should not be necessary.
33157    if test -n "$TOOLCHAIN_PATH"; then
33158      PATH_save="$PATH"
33159      PATH="$TOOLCHAIN_PATH"
33160      for ac_prog in $SEARCH_LIST
33161do
33162  # Extract the first word of "$ac_prog", so it can be a program name with args.
33163set dummy $ac_prog; ac_word=$2
33164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33165$as_echo_n "checking for $ac_word... " >&6; }
33166if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33167  $as_echo_n "(cached) " >&6
33168else
33169  case $TOOLCHAIN_PATH_CC in
33170  [\\/]* | ?:[\\/]*)
33171  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33172  ;;
33173  *)
33174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33175for as_dir in $PATH
33176do
33177  IFS=$as_save_IFS
33178  test -z "$as_dir" && as_dir=.
33179    for ac_exec_ext in '' $ac_executable_extensions; do
33180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33181    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33183    break 2
33184  fi
33185done
33186  done
33187IFS=$as_save_IFS
33188
33189  ;;
33190esac
33191fi
33192TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33193if test -n "$TOOLCHAIN_PATH_CC"; then
33194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33195$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33196else
33197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33198$as_echo "no" >&6; }
33199fi
33200
33201
33202  test -n "$TOOLCHAIN_PATH_CC" && break
33203done
33204
33205      CC=$TOOLCHAIN_PATH_CC
33206      PATH="$PATH_save"
33207    fi
33208
33209    # AC_PATH_PROGS can't be run multiple times with the same variable,
33210    # so create a new name for this run.
33211    if test "x$CC" = x; then
33212      for ac_prog in $SEARCH_LIST
33213do
33214  # Extract the first word of "$ac_prog", so it can be a program name with args.
33215set dummy $ac_prog; ac_word=$2
33216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33217$as_echo_n "checking for $ac_word... " >&6; }
33218if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33219  $as_echo_n "(cached) " >&6
33220else
33221  case $POTENTIAL_CC in
33222  [\\/]* | ?:[\\/]*)
33223  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33224  ;;
33225  *)
33226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33227for as_dir in $PATH
33228do
33229  IFS=$as_save_IFS
33230  test -z "$as_dir" && as_dir=.
33231    for ac_exec_ext in '' $ac_executable_extensions; do
33232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33233    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33235    break 2
33236  fi
33237done
33238  done
33239IFS=$as_save_IFS
33240
33241  ;;
33242esac
33243fi
33244POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33245if test -n "$POTENTIAL_CC"; then
33246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33247$as_echo "$POTENTIAL_CC" >&6; }
33248else
33249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33250$as_echo "no" >&6; }
33251fi
33252
33253
33254  test -n "$POTENTIAL_CC" && break
33255done
33256
33257      CC=$POTENTIAL_CC
33258    fi
33259
33260    if test "x$CC" = x; then
33261
33262  # Print a helpful message on how to acquire the necessary build dependency.
33263  # devkit is the help tag: freetype, cups, alsa etc
33264  MISSING_DEPENDENCY=devkit
33265
33266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33267    cygwin_help $MISSING_DEPENDENCY
33268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33269    msys_help $MISSING_DEPENDENCY
33270  else
33271    PKGHANDLER_COMMAND=
33272
33273    case $PKGHANDLER in
33274      apt-get)
33275        apt_help     $MISSING_DEPENDENCY ;;
33276      yum)
33277        yum_help     $MISSING_DEPENDENCY ;;
33278      brew)
33279        brew_help    $MISSING_DEPENDENCY ;;
33280      port)
33281        port_help    $MISSING_DEPENDENCY ;;
33282      pkgutil)
33283        pkgutil_help $MISSING_DEPENDENCY ;;
33284      pkgadd)
33285        pkgadd_help  $MISSING_DEPENDENCY ;;
33286    esac
33287
33288    if test "x$PKGHANDLER_COMMAND" != x; then
33289      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33290    fi
33291  fi
33292
33293      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33294    fi
33295  fi
33296
33297  # Now we have a compiler binary in CC. Make sure it's okay.
33298
33299  # Only process if variable expands to non-empty
33300
33301  if test "x$CC" != x; then
33302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33303
33304  # First separate the path from the arguments. This will split at the first
33305  # space.
33306  complete="$CC"
33307  path="${complete%% *}"
33308  tmp="$complete EOL"
33309  arguments="${tmp#* }"
33310
33311  # Input might be given as Windows format, start by converting to
33312  # unix format.
33313  new_path=`$CYGPATH -u "$path"`
33314
33315  # Now try to locate executable using which
33316  new_path=`$WHICH "$new_path" 2> /dev/null`
33317  # bat and cmd files are not always considered executable in cygwin causing which
33318  # to not find them
33319  if test "x$new_path" = x \
33320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33322    new_path=`$CYGPATH -u "$path"`
33323  fi
33324  if test "x$new_path" = x; then
33325    # Oops. Which didn't find the executable.
33326    # The splitting of arguments from the executable at a space might have been incorrect,
33327    # since paths with space are more likely in Windows. Give it another try with the whole
33328    # argument.
33329    path="$complete"
33330    arguments="EOL"
33331    new_path=`$CYGPATH -u "$path"`
33332    new_path=`$WHICH "$new_path" 2> /dev/null`
33333    # bat and cmd files are not always considered executable in cygwin causing which
33334    # to not find them
33335    if test "x$new_path" = x \
33336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33338      new_path=`$CYGPATH -u "$path"`
33339    fi
33340    if test "x$new_path" = x; then
33341      # It's still not found. Now this is an unrecoverable error.
33342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33343$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33344      has_space=`$ECHO "$complete" | $GREP " "`
33345      if test "x$has_space" != x; then
33346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33348      fi
33349      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33350    fi
33351  fi
33352
33353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33356  # "foo.exe" is OK but "foo" is an error.
33357  #
33358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33359  # It is also a way to make sure we got the proper file name for the real test later on.
33360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33361  if test "x$test_shortpath" = x; then
33362    # Short path failed, file does not exist as specified.
33363    # Try adding .exe or .cmd
33364    if test -f "${new_path}.exe"; then
33365      input_to_shortpath="${new_path}.exe"
33366    elif test -f "${new_path}.cmd"; then
33367      input_to_shortpath="${new_path}.cmd"
33368    else
33369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33370$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33373      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33374    fi
33375  else
33376    input_to_shortpath="$new_path"
33377  fi
33378
33379  # Call helper function which possibly converts this using DOS-style short mode.
33380  # If so, the updated path is stored in $new_path.
33381  new_path="$input_to_shortpath"
33382
33383  input_path="$input_to_shortpath"
33384  # Check if we need to convert this using DOS-style short mode. If the path
33385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33386  # take no chances and rewrite it.
33387  # Note: m4 eats our [], so we need to use [ and ] instead.
33388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33389  if test "x$has_forbidden_chars" != x; then
33390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33394      # Going to short mode and back again did indeed matter. Since short mode is
33395      # case insensitive, let's make it lowercase to improve readability.
33396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33397      # Now convert it back to Unix-style (cygpath)
33398      input_path=`$CYGPATH -u "$shortmode_path"`
33399      new_path="$input_path"
33400    fi
33401  fi
33402
33403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33404  if test "x$test_cygdrive_prefix" = x; then
33405    # As a simple fix, exclude /usr/bin since it's not a real path.
33406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33408      # a path prefixed by /cygdrive for fixpath to work.
33409      new_path="$CYGWIN_ROOT_PATH$input_path"
33410    fi
33411  fi
33412
33413  # remove trailing .exe if any
33414  new_path="${new_path/%.exe/}"
33415
33416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33417
33418  # First separate the path from the arguments. This will split at the first
33419  # space.
33420  complete="$CC"
33421  path="${complete%% *}"
33422  tmp="$complete EOL"
33423  arguments="${tmp#* }"
33424
33425  # Input might be given as Windows format, start by converting to
33426  # unix format.
33427  new_path="$path"
33428
33429  windows_path="$new_path"
33430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431    unix_path=`$CYGPATH -u "$windows_path"`
33432    new_path="$unix_path"
33433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33435    new_path="$unix_path"
33436  fi
33437
33438
33439  # Now try to locate executable using which
33440  new_path=`$WHICH "$new_path" 2> /dev/null`
33441
33442  if test "x$new_path" = x; then
33443    # Oops. Which didn't find the executable.
33444    # The splitting of arguments from the executable at a space might have been incorrect,
33445    # since paths with space are more likely in Windows. Give it another try with the whole
33446    # argument.
33447    path="$complete"
33448    arguments="EOL"
33449    new_path="$path"
33450
33451  windows_path="$new_path"
33452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33453    unix_path=`$CYGPATH -u "$windows_path"`
33454    new_path="$unix_path"
33455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33457    new_path="$unix_path"
33458  fi
33459
33460
33461    new_path=`$WHICH "$new_path" 2> /dev/null`
33462    # bat and cmd files are not always considered executable in MSYS causing which
33463    # to not find them
33464    if test "x$new_path" = x \
33465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33467      new_path="$path"
33468
33469  windows_path="$new_path"
33470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33471    unix_path=`$CYGPATH -u "$windows_path"`
33472    new_path="$unix_path"
33473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33475    new_path="$unix_path"
33476  fi
33477
33478    fi
33479
33480    if test "x$new_path" = x; then
33481      # It's still not found. Now this is an unrecoverable error.
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33483$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33484      has_space=`$ECHO "$complete" | $GREP " "`
33485      if test "x$has_space" != x; then
33486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33488      fi
33489      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33490    fi
33491  fi
33492
33493  # Now new_path has a complete unix path to the binary
33494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33495    # Keep paths in /bin as-is, but remove trailing .exe if any
33496    new_path="${new_path/%.exe/}"
33497    # Do not save /bin paths to all_fixpath_prefixes!
33498  else
33499    # Not in mixed or Windows style, start by that.
33500    new_path=`cmd //c echo $new_path`
33501
33502  input_path="$new_path"
33503  # Check if we need to convert this using DOS-style short mode. If the path
33504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33505  # take no chances and rewrite it.
33506  # Note: m4 eats our [], so we need to use [ and ] instead.
33507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33508  if test "x$has_forbidden_chars" != x; then
33509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33511  fi
33512
33513    # Output is in $new_path
33514
33515  windows_path="$new_path"
33516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33517    unix_path=`$CYGPATH -u "$windows_path"`
33518    new_path="$unix_path"
33519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33521    new_path="$unix_path"
33522  fi
33523
33524    # remove trailing .exe if any
33525    new_path="${new_path/%.exe/}"
33526
33527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33529  fi
33530
33531    else
33532      # We're on a unix platform. Hooray! :)
33533      # First separate the path from the arguments. This will split at the first
33534      # space.
33535      complete="$CC"
33536      path="${complete%% *}"
33537      tmp="$complete EOL"
33538      arguments="${tmp#* }"
33539
33540      # Cannot rely on the command "which" here since it doesn't always work.
33541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33542      if test -z "$is_absolute_path"; then
33543        # Path to executable is not absolute. Find it.
33544        IFS_save="$IFS"
33545        IFS=:
33546        for p in $PATH; do
33547          if test -f "$p/$path" && test -x "$p/$path"; then
33548            new_path="$p/$path"
33549            break
33550          fi
33551        done
33552        IFS="$IFS_save"
33553      else
33554        # This is an absolute path, we can use it without further modifications.
33555        new_path="$path"
33556      fi
33557
33558      if test "x$new_path" = x; then
33559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33560$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33561        has_space=`$ECHO "$complete" | $GREP " "`
33562        if test "x$has_space" != x; then
33563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33565        fi
33566        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33567      fi
33568    fi
33569
33570    # Now join together the path and the arguments once again
33571    if test "x$arguments" != xEOL; then
33572      new_complete="$new_path ${arguments% *}"
33573    else
33574      new_complete="$new_path"
33575    fi
33576
33577    if test "x$complete" != "x$new_complete"; then
33578      CC="$new_complete"
33579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33580$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33581    fi
33582  fi
33583
33584  TEST_COMPILER="$CC"
33585
33586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33587$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33588  SYMLINK_ORIGINAL="$TEST_COMPILER"
33589
33590  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33591    # Follow a chain of symbolic links. Use readlink
33592    # where it exists, else fall back to horribly
33593    # complicated shell code.
33594    if test "x$READLINK_TESTED" != yes; then
33595      # On MacOSX there is a readlink tool with a different
33596      # purpose than the GNU readlink tool. Check the found readlink.
33597      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33598      if test "x$ISGNU" = x; then
33599        # A readlink that we do not know how to use.
33600        # Are there other non-GNU readlinks out there?
33601        READLINK_TESTED=yes
33602        READLINK=
33603      fi
33604    fi
33605
33606    if test "x$READLINK" != x; then
33607      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33608    else
33609      # Save the current directory for restoring afterwards
33610      STARTDIR=$PWD
33611      COUNTER=0
33612      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33613      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33614      cd $sym_link_dir
33615      # Use -P flag to resolve symlinks in directories.
33616      cd `$THEPWDCMD -P`
33617      sym_link_dir=`$THEPWDCMD -P`
33618      # Resolve file symlinks
33619      while test $COUNTER -lt 20; do
33620        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33621        if test "x$ISLINK" == x; then
33622          # This is not a symbolic link! We are done!
33623          break
33624        fi
33625        # Again resolve directory symlinks since the target of the just found
33626        # link could be in a different directory
33627        cd `$DIRNAME $ISLINK`
33628        sym_link_dir=`$THEPWDCMD -P`
33629        sym_link_file=`$BASENAME $ISLINK`
33630        let COUNTER=COUNTER+1
33631      done
33632      cd $STARTDIR
33633      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33634    fi
33635  fi
33636
33637  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33639$as_echo "no symlink" >&6; }
33640  else
33641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33642$as_echo "$SYMLINK_ORIGINAL" >&6; }
33643
33644    # We can't handle ccache by gcc wrappers, since we need to know if we're
33645    # using ccache. Instead ccache usage must be controlled by a configure option.
33646    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33647    if test "x$COMPILER_BASENAME" = "xccache"; then
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33649$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33650      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33651    fi
33652  fi
33653
33654
33655  COMPILER=$CC
33656  COMPILER_NAME=$COMPILER_NAME
33657
33658  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33659    # cc -V output typically looks like
33660    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33661    # or
33662    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33663    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33664    # Check that this is likely to be the Solaris Studio cc.
33665    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33666    if test $? -ne 0; then
33667      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33668      { $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
33669$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33670      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33671$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33672      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33673$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33674      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33675    fi
33676    # Remove usage instructions (if present), and
33677    # collapse compiler output into a single line
33678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33679        $SED -e 's/ *[Uu]sage:.*//'`
33680    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33682  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33683    # xlc -qversion output typically looks like
33684    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33685    #     Version: 11.01.0000.0015
33686    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33687    # Check that this is likely to be the IBM XL C compiler.
33688    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33689    if test $? -ne 0; then
33690      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33691      { $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
33692$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33693      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33694$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33695      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33696$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33697      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33698    fi
33699    # Collapse compiler output into a single line
33700    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33701    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33702        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33703  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33704    # There is no specific version flag, but all output starts with a version string.
33705    # First line typically looks something like:
33706    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33707    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33708    # Check that this is likely to be Microsoft CL.EXE.
33709    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33710    if test $? -ne 0; then
33711      { $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
33712$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33713      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33714$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33715      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33716    fi
33717    # Collapse compiler output into a single line
33718    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33719    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33720        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33721  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33722    # gcc --version output typically looks like
33723    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33724    #     Copyright (C) 2013 Free Software Foundation, Inc.
33725    #     This is free software; see the source for copying conditions.  There is NO
33726    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33727    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33728    # Check that this is likely to be GCC.
33729    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33730    if test $? -ne 0; then
33731      { $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
33732$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33733      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33734$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33735      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33736    fi
33737    # Remove Copyright and legalese from version string, and
33738    # collapse into a single line
33739    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33740        $SED -e 's/ *Copyright .*//'`
33741    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33742        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33743  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33744    # clang --version output typically looks like
33745    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33746    #    clang version 3.3 (tags/RELEASE_33/final)
33747    # or
33748    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33749    #    Target: x86_64-pc-linux-gnu
33750    #    Thread model: posix
33751    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33752    # Check that this is likely to be clang
33753    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33754    if test $? -ne 0; then
33755      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33756$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33758$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33759      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33760    fi
33761    # Collapse compiler output into a single line
33762    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33763    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33764        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33765  else
33766      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33767  fi
33768  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33769  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33770  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33771  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33772
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33774$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33775
33776
33777  # Now that we have resolved CC ourself, let autoconf have its go at it
33778  ac_ext=c
33779ac_cpp='$CPP $CPPFLAGS'
33780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33782ac_compiler_gnu=$ac_cv_c_compiler_gnu
33783if test -n "$ac_tool_prefix"; then
33784  for ac_prog in $CC
33785  do
33786    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33787set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33789$as_echo_n "checking for $ac_word... " >&6; }
33790if ${ac_cv_prog_CC+:} false; then :
33791  $as_echo_n "(cached) " >&6
33792else
33793  if test -n "$CC"; then
33794  ac_cv_prog_CC="$CC" # Let the user override the test.
33795else
33796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33797for as_dir in $PATH
33798do
33799  IFS=$as_save_IFS
33800  test -z "$as_dir" && as_dir=.
33801    for ac_exec_ext in '' $ac_executable_extensions; do
33802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33803    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33805    break 2
33806  fi
33807done
33808  done
33809IFS=$as_save_IFS
33810
33811fi
33812fi
33813CC=$ac_cv_prog_CC
33814if test -n "$CC"; then
33815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33816$as_echo "$CC" >&6; }
33817else
33818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33819$as_echo "no" >&6; }
33820fi
33821
33822
33823    test -n "$CC" && break
33824  done
33825fi
33826if test -z "$CC"; then
33827  ac_ct_CC=$CC
33828  for ac_prog in $CC
33829do
33830  # Extract the first word of "$ac_prog", so it can be a program name with args.
33831set dummy $ac_prog; ac_word=$2
33832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33833$as_echo_n "checking for $ac_word... " >&6; }
33834if ${ac_cv_prog_ac_ct_CC+:} false; then :
33835  $as_echo_n "(cached) " >&6
33836else
33837  if test -n "$ac_ct_CC"; then
33838  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33839else
33840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33841for as_dir in $PATH
33842do
33843  IFS=$as_save_IFS
33844  test -z "$as_dir" && as_dir=.
33845    for ac_exec_ext in '' $ac_executable_extensions; do
33846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33847    ac_cv_prog_ac_ct_CC="$ac_prog"
33848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33849    break 2
33850  fi
33851done
33852  done
33853IFS=$as_save_IFS
33854
33855fi
33856fi
33857ac_ct_CC=$ac_cv_prog_ac_ct_CC
33858if test -n "$ac_ct_CC"; then
33859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33860$as_echo "$ac_ct_CC" >&6; }
33861else
33862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33863$as_echo "no" >&6; }
33864fi
33865
33866
33867  test -n "$ac_ct_CC" && break
33868done
33869
33870  if test "x$ac_ct_CC" = x; then
33871    CC=""
33872  else
33873    case $cross_compiling:$ac_tool_warned in
33874yes:)
33875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33877ac_tool_warned=yes ;;
33878esac
33879    CC=$ac_ct_CC
33880  fi
33881fi
33882
33883
33884test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33886as_fn_error $? "no acceptable C compiler found in \$PATH
33887See \`config.log' for more details" "$LINENO" 5; }
33888
33889# Provide some information about the compiler.
33890$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33891set X $ac_compile
33892ac_compiler=$2
33893for ac_option in --version -v -V -qversion; do
33894  { { ac_try="$ac_compiler $ac_option >&5"
33895case "(($ac_try" in
33896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33897  *) ac_try_echo=$ac_try;;
33898esac
33899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33900$as_echo "$ac_try_echo"; } >&5
33901  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33902  ac_status=$?
33903  if test -s conftest.err; then
33904    sed '10a\
33905... rest of stderr output deleted ...
33906         10q' conftest.err >conftest.er1
33907    cat conftest.er1 >&5
33908  fi
33909  rm -f conftest.er1 conftest.err
33910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33911  test $ac_status = 0; }
33912done
33913
33914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33915/* end confdefs.h.  */
33916
33917int
33918main ()
33919{
33920
33921  ;
33922  return 0;
33923}
33924_ACEOF
33925ac_clean_files_save=$ac_clean_files
33926ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33927# Try to create an executable without -o first, disregard a.out.
33928# It will help us diagnose broken compilers, and finding out an intuition
33929# of exeext.
33930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33931$as_echo_n "checking whether the C compiler works... " >&6; }
33932ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33933
33934# The possible output files:
33935ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33936
33937ac_rmfiles=
33938for ac_file in $ac_files
33939do
33940  case $ac_file in
33941    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33942    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33943  esac
33944done
33945rm -f $ac_rmfiles
33946
33947if { { ac_try="$ac_link_default"
33948case "(($ac_try" in
33949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33950  *) ac_try_echo=$ac_try;;
33951esac
33952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33953$as_echo "$ac_try_echo"; } >&5
33954  (eval "$ac_link_default") 2>&5
33955  ac_status=$?
33956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33957  test $ac_status = 0; }; then :
33958  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33959# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33960# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33961# so that the user can short-circuit this test for compilers unknown to
33962# Autoconf.
33963for ac_file in $ac_files ''
33964do
33965  test -f "$ac_file" || continue
33966  case $ac_file in
33967    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33968	;;
33969    [ab].out )
33970	# We found the default executable, but exeext='' is most
33971	# certainly right.
33972	break;;
33973    *.* )
33974	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33975	then :; else
33976	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33977	fi
33978	# We set ac_cv_exeext here because the later test for it is not
33979	# safe: cross compilers may not add the suffix if given an `-o'
33980	# argument, so we may need to know it at that point already.
33981	# Even if this section looks crufty: it has the advantage of
33982	# actually working.
33983	break;;
33984    * )
33985	break;;
33986  esac
33987done
33988test "$ac_cv_exeext" = no && ac_cv_exeext=
33989
33990else
33991  ac_file=''
33992fi
33993if test -z "$ac_file"; then :
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33995$as_echo "no" >&6; }
33996$as_echo "$as_me: failed program was:" >&5
33997sed 's/^/| /' conftest.$ac_ext >&5
33998
33999{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34001as_fn_error 77 "C compiler cannot create executables
34002See \`config.log' for more details" "$LINENO" 5; }
34003else
34004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34005$as_echo "yes" >&6; }
34006fi
34007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34008$as_echo_n "checking for C compiler default output file name... " >&6; }
34009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34010$as_echo "$ac_file" >&6; }
34011ac_exeext=$ac_cv_exeext
34012
34013rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34014ac_clean_files=$ac_clean_files_save
34015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34016$as_echo_n "checking for suffix of executables... " >&6; }
34017if { { ac_try="$ac_link"
34018case "(($ac_try" in
34019  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34020  *) ac_try_echo=$ac_try;;
34021esac
34022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34023$as_echo "$ac_try_echo"; } >&5
34024  (eval "$ac_link") 2>&5
34025  ac_status=$?
34026  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34027  test $ac_status = 0; }; then :
34028  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34029# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34030# work properly (i.e., refer to `conftest.exe'), while it won't with
34031# `rm'.
34032for ac_file in conftest.exe conftest conftest.*; do
34033  test -f "$ac_file" || continue
34034  case $ac_file in
34035    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34036    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34037	  break;;
34038    * ) break;;
34039  esac
34040done
34041else
34042  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34044as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34045See \`config.log' for more details" "$LINENO" 5; }
34046fi
34047rm -f conftest conftest$ac_cv_exeext
34048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34049$as_echo "$ac_cv_exeext" >&6; }
34050
34051rm -f conftest.$ac_ext
34052EXEEXT=$ac_cv_exeext
34053ac_exeext=$EXEEXT
34054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34055/* end confdefs.h.  */
34056#include <stdio.h>
34057int
34058main ()
34059{
34060FILE *f = fopen ("conftest.out", "w");
34061 return ferror (f) || fclose (f) != 0;
34062
34063  ;
34064  return 0;
34065}
34066_ACEOF
34067ac_clean_files="$ac_clean_files conftest.out"
34068# Check that the compiler produces executables we can run.  If not, either
34069# the compiler is broken, or we cross compile.
34070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34071$as_echo_n "checking whether we are cross compiling... " >&6; }
34072if test "$cross_compiling" != yes; then
34073  { { ac_try="$ac_link"
34074case "(($ac_try" in
34075  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34076  *) ac_try_echo=$ac_try;;
34077esac
34078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34079$as_echo "$ac_try_echo"; } >&5
34080  (eval "$ac_link") 2>&5
34081  ac_status=$?
34082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34083  test $ac_status = 0; }
34084  if { ac_try='./conftest$ac_cv_exeext'
34085  { { case "(($ac_try" in
34086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34087  *) ac_try_echo=$ac_try;;
34088esac
34089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34090$as_echo "$ac_try_echo"; } >&5
34091  (eval "$ac_try") 2>&5
34092  ac_status=$?
34093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34094  test $ac_status = 0; }; }; then
34095    cross_compiling=no
34096  else
34097    if test "$cross_compiling" = maybe; then
34098	cross_compiling=yes
34099    else
34100	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34102as_fn_error $? "cannot run C compiled programs.
34103If you meant to cross compile, use \`--host'.
34104See \`config.log' for more details" "$LINENO" 5; }
34105    fi
34106  fi
34107fi
34108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34109$as_echo "$cross_compiling" >&6; }
34110
34111rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34112ac_clean_files=$ac_clean_files_save
34113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34114$as_echo_n "checking for suffix of object files... " >&6; }
34115if ${ac_cv_objext+:} false; then :
34116  $as_echo_n "(cached) " >&6
34117else
34118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34119/* end confdefs.h.  */
34120
34121int
34122main ()
34123{
34124
34125  ;
34126  return 0;
34127}
34128_ACEOF
34129rm -f conftest.o conftest.obj
34130if { { ac_try="$ac_compile"
34131case "(($ac_try" in
34132  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34133  *) ac_try_echo=$ac_try;;
34134esac
34135eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34136$as_echo "$ac_try_echo"; } >&5
34137  (eval "$ac_compile") 2>&5
34138  ac_status=$?
34139  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34140  test $ac_status = 0; }; then :
34141  for ac_file in conftest.o conftest.obj conftest.*; do
34142  test -f "$ac_file" || continue;
34143  case $ac_file in
34144    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34145    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34146       break;;
34147  esac
34148done
34149else
34150  $as_echo "$as_me: failed program was:" >&5
34151sed 's/^/| /' conftest.$ac_ext >&5
34152
34153{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34155as_fn_error $? "cannot compute suffix of object files: cannot compile
34156See \`config.log' for more details" "$LINENO" 5; }
34157fi
34158rm -f conftest.$ac_cv_objext conftest.$ac_ext
34159fi
34160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34161$as_echo "$ac_cv_objext" >&6; }
34162OBJEXT=$ac_cv_objext
34163ac_objext=$OBJEXT
34164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34165$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34166if ${ac_cv_c_compiler_gnu+:} false; then :
34167  $as_echo_n "(cached) " >&6
34168else
34169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34170/* end confdefs.h.  */
34171
34172int
34173main ()
34174{
34175#ifndef __GNUC__
34176       choke me
34177#endif
34178
34179  ;
34180  return 0;
34181}
34182_ACEOF
34183if ac_fn_c_try_compile "$LINENO"; then :
34184  ac_compiler_gnu=yes
34185else
34186  ac_compiler_gnu=no
34187fi
34188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34189ac_cv_c_compiler_gnu=$ac_compiler_gnu
34190
34191fi
34192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34193$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34194if test $ac_compiler_gnu = yes; then
34195  GCC=yes
34196else
34197  GCC=
34198fi
34199ac_test_CFLAGS=${CFLAGS+set}
34200ac_save_CFLAGS=$CFLAGS
34201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34202$as_echo_n "checking whether $CC accepts -g... " >&6; }
34203if ${ac_cv_prog_cc_g+:} false; then :
34204  $as_echo_n "(cached) " >&6
34205else
34206  ac_save_c_werror_flag=$ac_c_werror_flag
34207   ac_c_werror_flag=yes
34208   ac_cv_prog_cc_g=no
34209   CFLAGS="-g"
34210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34211/* end confdefs.h.  */
34212
34213int
34214main ()
34215{
34216
34217  ;
34218  return 0;
34219}
34220_ACEOF
34221if ac_fn_c_try_compile "$LINENO"; then :
34222  ac_cv_prog_cc_g=yes
34223else
34224  CFLAGS=""
34225      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34226/* end confdefs.h.  */
34227
34228int
34229main ()
34230{
34231
34232  ;
34233  return 0;
34234}
34235_ACEOF
34236if ac_fn_c_try_compile "$LINENO"; then :
34237
34238else
34239  ac_c_werror_flag=$ac_save_c_werror_flag
34240	 CFLAGS="-g"
34241	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34242/* end confdefs.h.  */
34243
34244int
34245main ()
34246{
34247
34248  ;
34249  return 0;
34250}
34251_ACEOF
34252if ac_fn_c_try_compile "$LINENO"; then :
34253  ac_cv_prog_cc_g=yes
34254fi
34255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34256fi
34257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34258fi
34259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34260   ac_c_werror_flag=$ac_save_c_werror_flag
34261fi
34262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34263$as_echo "$ac_cv_prog_cc_g" >&6; }
34264if test "$ac_test_CFLAGS" = set; then
34265  CFLAGS=$ac_save_CFLAGS
34266elif test $ac_cv_prog_cc_g = yes; then
34267  if test "$GCC" = yes; then
34268    CFLAGS="-g -O2"
34269  else
34270    CFLAGS="-g"
34271  fi
34272else
34273  if test "$GCC" = yes; then
34274    CFLAGS="-O2"
34275  else
34276    CFLAGS=
34277  fi
34278fi
34279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34280$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34281if ${ac_cv_prog_cc_c89+:} false; then :
34282  $as_echo_n "(cached) " >&6
34283else
34284  ac_cv_prog_cc_c89=no
34285ac_save_CC=$CC
34286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34287/* end confdefs.h.  */
34288#include <stdarg.h>
34289#include <stdio.h>
34290struct stat;
34291/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34292struct buf { int x; };
34293FILE * (*rcsopen) (struct buf *, struct stat *, int);
34294static char *e (p, i)
34295     char **p;
34296     int i;
34297{
34298  return p[i];
34299}
34300static char *f (char * (*g) (char **, int), char **p, ...)
34301{
34302  char *s;
34303  va_list v;
34304  va_start (v,p);
34305  s = g (p, va_arg (v,int));
34306  va_end (v);
34307  return s;
34308}
34309
34310/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34311   function prototypes and stuff, but not '\xHH' hex character constants.
34312   These don't provoke an error unfortunately, instead are silently treated
34313   as 'x'.  The following induces an error, until -std is added to get
34314   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34315   array size at least.  It's necessary to write '\x00'==0 to get something
34316   that's true only with -std.  */
34317int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34318
34319/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34320   inside strings and character constants.  */
34321#define FOO(x) 'x'
34322int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34323
34324int test (int i, double x);
34325struct s1 {int (*f) (int a);};
34326struct s2 {int (*f) (double a);};
34327int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34328int argc;
34329char **argv;
34330int
34331main ()
34332{
34333return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34334  ;
34335  return 0;
34336}
34337_ACEOF
34338for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34339	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34340do
34341  CC="$ac_save_CC $ac_arg"
34342  if ac_fn_c_try_compile "$LINENO"; then :
34343  ac_cv_prog_cc_c89=$ac_arg
34344fi
34345rm -f core conftest.err conftest.$ac_objext
34346  test "x$ac_cv_prog_cc_c89" != "xno" && break
34347done
34348rm -f conftest.$ac_ext
34349CC=$ac_save_CC
34350
34351fi
34352# AC_CACHE_VAL
34353case "x$ac_cv_prog_cc_c89" in
34354  x)
34355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34356$as_echo "none needed" >&6; } ;;
34357  xno)
34358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34359$as_echo "unsupported" >&6; } ;;
34360  *)
34361    CC="$CC $ac_cv_prog_cc_c89"
34362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34363$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34364esac
34365if test "x$ac_cv_prog_cc_c89" != xno; then :
34366
34367fi
34368
34369ac_ext=cpp
34370ac_cpp='$CXXCPP $CPPFLAGS'
34371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34374
34375
34376
34377  COMPILER_NAME=C++
34378  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34379
34380  if test "x$CXX" != x; then
34381    # User has supplied compiler name already, always let that override.
34382    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34383$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34384    if test "x`basename $CXX`" = "x$CXX"; then
34385      # A command without a complete path is provided, search $PATH.
34386
34387      for ac_prog in $CXX
34388do
34389  # Extract the first word of "$ac_prog", so it can be a program name with args.
34390set dummy $ac_prog; ac_word=$2
34391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34392$as_echo_n "checking for $ac_word... " >&6; }
34393if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34394  $as_echo_n "(cached) " >&6
34395else
34396  case $POTENTIAL_CXX in
34397  [\\/]* | ?:[\\/]*)
34398  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34399  ;;
34400  *)
34401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34402for as_dir in $PATH
34403do
34404  IFS=$as_save_IFS
34405  test -z "$as_dir" && as_dir=.
34406    for ac_exec_ext in '' $ac_executable_extensions; do
34407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34408    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34410    break 2
34411  fi
34412done
34413  done
34414IFS=$as_save_IFS
34415
34416  ;;
34417esac
34418fi
34419POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34420if test -n "$POTENTIAL_CXX"; then
34421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34422$as_echo "$POTENTIAL_CXX" >&6; }
34423else
34424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34425$as_echo "no" >&6; }
34426fi
34427
34428
34429  test -n "$POTENTIAL_CXX" && break
34430done
34431
34432      if test "x$POTENTIAL_CXX" != x; then
34433        CXX=$POTENTIAL_CXX
34434      else
34435        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34436      fi
34437    else
34438      # Otherwise it might already be a complete path
34439      if test ! -x "$CXX"; then
34440        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34441      fi
34442    fi
34443  else
34444    # No user supplied value. Locate compiler ourselves.
34445
34446    # If we are cross compiling, assume cross compilation tools follows the
34447    # cross compilation standard where they are prefixed with the autoconf
34448    # standard name for the target. For example the binary
34449    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34450    # If we are not cross compiling, then the default compiler name will be
34451    # used.
34452
34453    CXX=
34454    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34455    # before checking the rest of the PATH.
34456    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34457    # step, this should not be necessary.
34458    if test -n "$TOOLCHAIN_PATH"; then
34459      PATH_save="$PATH"
34460      PATH="$TOOLCHAIN_PATH"
34461      for ac_prog in $SEARCH_LIST
34462do
34463  # Extract the first word of "$ac_prog", so it can be a program name with args.
34464set dummy $ac_prog; ac_word=$2
34465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34466$as_echo_n "checking for $ac_word... " >&6; }
34467if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34468  $as_echo_n "(cached) " >&6
34469else
34470  case $TOOLCHAIN_PATH_CXX in
34471  [\\/]* | ?:[\\/]*)
34472  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34473  ;;
34474  *)
34475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34476for as_dir in $PATH
34477do
34478  IFS=$as_save_IFS
34479  test -z "$as_dir" && as_dir=.
34480    for ac_exec_ext in '' $ac_executable_extensions; do
34481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34482    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34484    break 2
34485  fi
34486done
34487  done
34488IFS=$as_save_IFS
34489
34490  ;;
34491esac
34492fi
34493TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34494if test -n "$TOOLCHAIN_PATH_CXX"; then
34495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34496$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34497else
34498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34499$as_echo "no" >&6; }
34500fi
34501
34502
34503  test -n "$TOOLCHAIN_PATH_CXX" && break
34504done
34505
34506      CXX=$TOOLCHAIN_PATH_CXX
34507      PATH="$PATH_save"
34508    fi
34509
34510    # AC_PATH_PROGS can't be run multiple times with the same variable,
34511    # so create a new name for this run.
34512    if test "x$CXX" = x; then
34513      for ac_prog in $SEARCH_LIST
34514do
34515  # Extract the first word of "$ac_prog", so it can be a program name with args.
34516set dummy $ac_prog; ac_word=$2
34517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34518$as_echo_n "checking for $ac_word... " >&6; }
34519if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34520  $as_echo_n "(cached) " >&6
34521else
34522  case $POTENTIAL_CXX in
34523  [\\/]* | ?:[\\/]*)
34524  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34525  ;;
34526  *)
34527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34528for as_dir in $PATH
34529do
34530  IFS=$as_save_IFS
34531  test -z "$as_dir" && as_dir=.
34532    for ac_exec_ext in '' $ac_executable_extensions; do
34533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34534    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34536    break 2
34537  fi
34538done
34539  done
34540IFS=$as_save_IFS
34541
34542  ;;
34543esac
34544fi
34545POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34546if test -n "$POTENTIAL_CXX"; then
34547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34548$as_echo "$POTENTIAL_CXX" >&6; }
34549else
34550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34551$as_echo "no" >&6; }
34552fi
34553
34554
34555  test -n "$POTENTIAL_CXX" && break
34556done
34557
34558      CXX=$POTENTIAL_CXX
34559    fi
34560
34561    if test "x$CXX" = x; then
34562
34563  # Print a helpful message on how to acquire the necessary build dependency.
34564  # devkit is the help tag: freetype, cups, alsa etc
34565  MISSING_DEPENDENCY=devkit
34566
34567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34568    cygwin_help $MISSING_DEPENDENCY
34569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34570    msys_help $MISSING_DEPENDENCY
34571  else
34572    PKGHANDLER_COMMAND=
34573
34574    case $PKGHANDLER in
34575      apt-get)
34576        apt_help     $MISSING_DEPENDENCY ;;
34577      yum)
34578        yum_help     $MISSING_DEPENDENCY ;;
34579      brew)
34580        brew_help    $MISSING_DEPENDENCY ;;
34581      port)
34582        port_help    $MISSING_DEPENDENCY ;;
34583      pkgutil)
34584        pkgutil_help $MISSING_DEPENDENCY ;;
34585      pkgadd)
34586        pkgadd_help  $MISSING_DEPENDENCY ;;
34587    esac
34588
34589    if test "x$PKGHANDLER_COMMAND" != x; then
34590      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34591    fi
34592  fi
34593
34594      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34595    fi
34596  fi
34597
34598  # Now we have a compiler binary in CXX. Make sure it's okay.
34599
34600  # Only process if variable expands to non-empty
34601
34602  if test "x$CXX" != x; then
34603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34604
34605  # First separate the path from the arguments. This will split at the first
34606  # space.
34607  complete="$CXX"
34608  path="${complete%% *}"
34609  tmp="$complete EOL"
34610  arguments="${tmp#* }"
34611
34612  # Input might be given as Windows format, start by converting to
34613  # unix format.
34614  new_path=`$CYGPATH -u "$path"`
34615
34616  # Now try to locate executable using which
34617  new_path=`$WHICH "$new_path" 2> /dev/null`
34618  # bat and cmd files are not always considered executable in cygwin causing which
34619  # to not find them
34620  if test "x$new_path" = x \
34621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34623    new_path=`$CYGPATH -u "$path"`
34624  fi
34625  if test "x$new_path" = x; then
34626    # Oops. Which didn't find the executable.
34627    # The splitting of arguments from the executable at a space might have been incorrect,
34628    # since paths with space are more likely in Windows. Give it another try with the whole
34629    # argument.
34630    path="$complete"
34631    arguments="EOL"
34632    new_path=`$CYGPATH -u "$path"`
34633    new_path=`$WHICH "$new_path" 2> /dev/null`
34634    # bat and cmd files are not always considered executable in cygwin causing which
34635    # to not find them
34636    if test "x$new_path" = x \
34637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34639      new_path=`$CYGPATH -u "$path"`
34640    fi
34641    if test "x$new_path" = x; then
34642      # It's still not found. Now this is an unrecoverable error.
34643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34644$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34645      has_space=`$ECHO "$complete" | $GREP " "`
34646      if test "x$has_space" != x; then
34647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34649      fi
34650      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34651    fi
34652  fi
34653
34654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34657  # "foo.exe" is OK but "foo" is an error.
34658  #
34659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34660  # It is also a way to make sure we got the proper file name for the real test later on.
34661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34662  if test "x$test_shortpath" = x; then
34663    # Short path failed, file does not exist as specified.
34664    # Try adding .exe or .cmd
34665    if test -f "${new_path}.exe"; then
34666      input_to_shortpath="${new_path}.exe"
34667    elif test -f "${new_path}.cmd"; then
34668      input_to_shortpath="${new_path}.cmd"
34669    else
34670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34671$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34674      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34675    fi
34676  else
34677    input_to_shortpath="$new_path"
34678  fi
34679
34680  # Call helper function which possibly converts this using DOS-style short mode.
34681  # If so, the updated path is stored in $new_path.
34682  new_path="$input_to_shortpath"
34683
34684  input_path="$input_to_shortpath"
34685  # Check if we need to convert this using DOS-style short mode. If the path
34686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34687  # take no chances and rewrite it.
34688  # Note: m4 eats our [], so we need to use [ and ] instead.
34689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34690  if test "x$has_forbidden_chars" != x; then
34691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34695      # Going to short mode and back again did indeed matter. Since short mode is
34696      # case insensitive, let's make it lowercase to improve readability.
34697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34698      # Now convert it back to Unix-style (cygpath)
34699      input_path=`$CYGPATH -u "$shortmode_path"`
34700      new_path="$input_path"
34701    fi
34702  fi
34703
34704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34705  if test "x$test_cygdrive_prefix" = x; then
34706    # As a simple fix, exclude /usr/bin since it's not a real path.
34707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34709      # a path prefixed by /cygdrive for fixpath to work.
34710      new_path="$CYGWIN_ROOT_PATH$input_path"
34711    fi
34712  fi
34713
34714  # remove trailing .exe if any
34715  new_path="${new_path/%.exe/}"
34716
34717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34718
34719  # First separate the path from the arguments. This will split at the first
34720  # space.
34721  complete="$CXX"
34722  path="${complete%% *}"
34723  tmp="$complete EOL"
34724  arguments="${tmp#* }"
34725
34726  # Input might be given as Windows format, start by converting to
34727  # unix format.
34728  new_path="$path"
34729
34730  windows_path="$new_path"
34731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34732    unix_path=`$CYGPATH -u "$windows_path"`
34733    new_path="$unix_path"
34734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34736    new_path="$unix_path"
34737  fi
34738
34739
34740  # Now try to locate executable using which
34741  new_path=`$WHICH "$new_path" 2> /dev/null`
34742
34743  if test "x$new_path" = x; then
34744    # Oops. Which didn't find the executable.
34745    # The splitting of arguments from the executable at a space might have been incorrect,
34746    # since paths with space are more likely in Windows. Give it another try with the whole
34747    # argument.
34748    path="$complete"
34749    arguments="EOL"
34750    new_path="$path"
34751
34752  windows_path="$new_path"
34753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34754    unix_path=`$CYGPATH -u "$windows_path"`
34755    new_path="$unix_path"
34756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34758    new_path="$unix_path"
34759  fi
34760
34761
34762    new_path=`$WHICH "$new_path" 2> /dev/null`
34763    # bat and cmd files are not always considered executable in MSYS causing which
34764    # to not find them
34765    if test "x$new_path" = x \
34766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34768      new_path="$path"
34769
34770  windows_path="$new_path"
34771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34772    unix_path=`$CYGPATH -u "$windows_path"`
34773    new_path="$unix_path"
34774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34776    new_path="$unix_path"
34777  fi
34778
34779    fi
34780
34781    if test "x$new_path" = x; then
34782      # It's still not found. Now this is an unrecoverable error.
34783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34784$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34785      has_space=`$ECHO "$complete" | $GREP " "`
34786      if test "x$has_space" != x; then
34787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34789      fi
34790      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34791    fi
34792  fi
34793
34794  # Now new_path has a complete unix path to the binary
34795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34796    # Keep paths in /bin as-is, but remove trailing .exe if any
34797    new_path="${new_path/%.exe/}"
34798    # Do not save /bin paths to all_fixpath_prefixes!
34799  else
34800    # Not in mixed or Windows style, start by that.
34801    new_path=`cmd //c echo $new_path`
34802
34803  input_path="$new_path"
34804  # Check if we need to convert this using DOS-style short mode. If the path
34805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34806  # take no chances and rewrite it.
34807  # Note: m4 eats our [], so we need to use [ and ] instead.
34808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34809  if test "x$has_forbidden_chars" != x; then
34810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34812  fi
34813
34814    # Output is in $new_path
34815
34816  windows_path="$new_path"
34817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34818    unix_path=`$CYGPATH -u "$windows_path"`
34819    new_path="$unix_path"
34820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34822    new_path="$unix_path"
34823  fi
34824
34825    # remove trailing .exe if any
34826    new_path="${new_path/%.exe/}"
34827
34828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34830  fi
34831
34832    else
34833      # We're on a unix platform. Hooray! :)
34834      # First separate the path from the arguments. This will split at the first
34835      # space.
34836      complete="$CXX"
34837      path="${complete%% *}"
34838      tmp="$complete EOL"
34839      arguments="${tmp#* }"
34840
34841      # Cannot rely on the command "which" here since it doesn't always work.
34842      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34843      if test -z "$is_absolute_path"; then
34844        # Path to executable is not absolute. Find it.
34845        IFS_save="$IFS"
34846        IFS=:
34847        for p in $PATH; do
34848          if test -f "$p/$path" && test -x "$p/$path"; then
34849            new_path="$p/$path"
34850            break
34851          fi
34852        done
34853        IFS="$IFS_save"
34854      else
34855        # This is an absolute path, we can use it without further modifications.
34856        new_path="$path"
34857      fi
34858
34859      if test "x$new_path" = x; then
34860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34861$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34862        has_space=`$ECHO "$complete" | $GREP " "`
34863        if test "x$has_space" != x; then
34864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34866        fi
34867        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34868      fi
34869    fi
34870
34871    # Now join together the path and the arguments once again
34872    if test "x$arguments" != xEOL; then
34873      new_complete="$new_path ${arguments% *}"
34874    else
34875      new_complete="$new_path"
34876    fi
34877
34878    if test "x$complete" != "x$new_complete"; then
34879      CXX="$new_complete"
34880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34881$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34882    fi
34883  fi
34884
34885  TEST_COMPILER="$CXX"
34886
34887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34888$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34889  SYMLINK_ORIGINAL="$TEST_COMPILER"
34890
34891  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34892    # Follow a chain of symbolic links. Use readlink
34893    # where it exists, else fall back to horribly
34894    # complicated shell code.
34895    if test "x$READLINK_TESTED" != yes; then
34896      # On MacOSX there is a readlink tool with a different
34897      # purpose than the GNU readlink tool. Check the found readlink.
34898      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34899      if test "x$ISGNU" = x; then
34900        # A readlink that we do not know how to use.
34901        # Are there other non-GNU readlinks out there?
34902        READLINK_TESTED=yes
34903        READLINK=
34904      fi
34905    fi
34906
34907    if test "x$READLINK" != x; then
34908      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34909    else
34910      # Save the current directory for restoring afterwards
34911      STARTDIR=$PWD
34912      COUNTER=0
34913      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34914      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34915      cd $sym_link_dir
34916      # Use -P flag to resolve symlinks in directories.
34917      cd `$THEPWDCMD -P`
34918      sym_link_dir=`$THEPWDCMD -P`
34919      # Resolve file symlinks
34920      while test $COUNTER -lt 20; do
34921        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34922        if test "x$ISLINK" == x; then
34923          # This is not a symbolic link! We are done!
34924          break
34925        fi
34926        # Again resolve directory symlinks since the target of the just found
34927        # link could be in a different directory
34928        cd `$DIRNAME $ISLINK`
34929        sym_link_dir=`$THEPWDCMD -P`
34930        sym_link_file=`$BASENAME $ISLINK`
34931        let COUNTER=COUNTER+1
34932      done
34933      cd $STARTDIR
34934      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34935    fi
34936  fi
34937
34938  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34940$as_echo "no symlink" >&6; }
34941  else
34942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34943$as_echo "$SYMLINK_ORIGINAL" >&6; }
34944
34945    # We can't handle ccache by gcc wrappers, since we need to know if we're
34946    # using ccache. Instead ccache usage must be controlled by a configure option.
34947    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34948    if test "x$COMPILER_BASENAME" = "xccache"; then
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34950$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34951      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34952    fi
34953  fi
34954
34955
34956  COMPILER=$CXX
34957  COMPILER_NAME=$COMPILER_NAME
34958
34959  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34960    # cc -V output typically looks like
34961    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34962    # or
34963    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34964    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34965    # Check that this is likely to be the Solaris Studio cc.
34966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34967    if test $? -ne 0; then
34968      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34969      { $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
34970$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34972$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34974$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34976    fi
34977    # Remove usage instructions (if present), and
34978    # collapse compiler output into a single line
34979    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34980        $SED -e 's/ *[Uu]sage:.*//'`
34981    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34982        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34983  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34984    # xlc -qversion output typically looks like
34985    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34986    #     Version: 11.01.0000.0015
34987    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34988    # Check that this is likely to be the IBM XL C compiler.
34989    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34990    if test $? -ne 0; then
34991      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34992      { $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
34993$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34995$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34997$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34998      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34999    fi
35000    # Collapse compiler output into a single line
35001    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35002    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35003        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35004  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35005    # There is no specific version flag, but all output starts with a version string.
35006    # First line typically looks something like:
35007    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35008    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35009    # Check that this is likely to be Microsoft CL.EXE.
35010    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35011    if test $? -ne 0; then
35012      { $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
35013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35015$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35016      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35017    fi
35018    # Collapse compiler output into a single line
35019    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35020    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35021        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35022  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35023    # gcc --version output typically looks like
35024    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35025    #     Copyright (C) 2013 Free Software Foundation, Inc.
35026    #     This is free software; see the source for copying conditions.  There is NO
35027    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35028    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35029    # Check that this is likely to be GCC.
35030    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35031    if test $? -ne 0; then
35032      { $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
35033$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35034      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35035$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35036      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35037    fi
35038    # Remove Copyright and legalese from version string, and
35039    # collapse into a single line
35040    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35041        $SED -e 's/ *Copyright .*//'`
35042    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35043        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35044  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35045    # clang --version output typically looks like
35046    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35047    #    clang version 3.3 (tags/RELEASE_33/final)
35048    # or
35049    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35050    #    Target: x86_64-pc-linux-gnu
35051    #    Thread model: posix
35052    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35053    # Check that this is likely to be clang
35054    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35055    if test $? -ne 0; then
35056      { $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
35057$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35058      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35059$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35060      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35061    fi
35062    # Collapse compiler output into a single line
35063    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35064    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35065        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35066  else
35067      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35068  fi
35069  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35070  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35071  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35072  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35073
35074  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35075$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35076
35077
35078  # Now that we have resolved CXX ourself, let autoconf have its go at it
35079  ac_ext=cpp
35080ac_cpp='$CXXCPP $CPPFLAGS'
35081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35084if test -z "$CXX"; then
35085  if test -n "$CCC"; then
35086    CXX=$CCC
35087  else
35088    if test -n "$ac_tool_prefix"; then
35089  for ac_prog in $CXX
35090  do
35091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094$as_echo_n "checking for $ac_word... " >&6; }
35095if ${ac_cv_prog_CXX+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  if test -n "$CXX"; then
35099  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35100else
35101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102for as_dir in $PATH
35103do
35104  IFS=$as_save_IFS
35105  test -z "$as_dir" && as_dir=.
35106    for ac_exec_ext in '' $ac_executable_extensions; do
35107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110    break 2
35111  fi
35112done
35113  done
35114IFS=$as_save_IFS
35115
35116fi
35117fi
35118CXX=$ac_cv_prog_CXX
35119if test -n "$CXX"; then
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35121$as_echo "$CXX" >&6; }
35122else
35123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35124$as_echo "no" >&6; }
35125fi
35126
35127
35128    test -n "$CXX" && break
35129  done
35130fi
35131if test -z "$CXX"; then
35132  ac_ct_CXX=$CXX
35133  for ac_prog in $CXX
35134do
35135  # Extract the first word of "$ac_prog", so it can be a program name with args.
35136set dummy $ac_prog; ac_word=$2
35137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35138$as_echo_n "checking for $ac_word... " >&6; }
35139if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35140  $as_echo_n "(cached) " >&6
35141else
35142  if test -n "$ac_ct_CXX"; then
35143  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35144else
35145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35146for as_dir in $PATH
35147do
35148  IFS=$as_save_IFS
35149  test -z "$as_dir" && as_dir=.
35150    for ac_exec_ext in '' $ac_executable_extensions; do
35151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35152    ac_cv_prog_ac_ct_CXX="$ac_prog"
35153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35154    break 2
35155  fi
35156done
35157  done
35158IFS=$as_save_IFS
35159
35160fi
35161fi
35162ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35163if test -n "$ac_ct_CXX"; then
35164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35165$as_echo "$ac_ct_CXX" >&6; }
35166else
35167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35168$as_echo "no" >&6; }
35169fi
35170
35171
35172  test -n "$ac_ct_CXX" && break
35173done
35174
35175  if test "x$ac_ct_CXX" = x; then
35176    CXX="g++"
35177  else
35178    case $cross_compiling:$ac_tool_warned in
35179yes:)
35180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35182ac_tool_warned=yes ;;
35183esac
35184    CXX=$ac_ct_CXX
35185  fi
35186fi
35187
35188  fi
35189fi
35190# Provide some information about the compiler.
35191$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35192set X $ac_compile
35193ac_compiler=$2
35194for ac_option in --version -v -V -qversion; do
35195  { { ac_try="$ac_compiler $ac_option >&5"
35196case "(($ac_try" in
35197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35198  *) ac_try_echo=$ac_try;;
35199esac
35200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35201$as_echo "$ac_try_echo"; } >&5
35202  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35203  ac_status=$?
35204  if test -s conftest.err; then
35205    sed '10a\
35206... rest of stderr output deleted ...
35207         10q' conftest.err >conftest.er1
35208    cat conftest.er1 >&5
35209  fi
35210  rm -f conftest.er1 conftest.err
35211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35212  test $ac_status = 0; }
35213done
35214
35215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35216$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35217if ${ac_cv_cxx_compiler_gnu+:} false; then :
35218  $as_echo_n "(cached) " >&6
35219else
35220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35221/* end confdefs.h.  */
35222
35223int
35224main ()
35225{
35226#ifndef __GNUC__
35227       choke me
35228#endif
35229
35230  ;
35231  return 0;
35232}
35233_ACEOF
35234if ac_fn_cxx_try_compile "$LINENO"; then :
35235  ac_compiler_gnu=yes
35236else
35237  ac_compiler_gnu=no
35238fi
35239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35240ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35241
35242fi
35243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35244$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35245if test $ac_compiler_gnu = yes; then
35246  GXX=yes
35247else
35248  GXX=
35249fi
35250ac_test_CXXFLAGS=${CXXFLAGS+set}
35251ac_save_CXXFLAGS=$CXXFLAGS
35252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35253$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35254if ${ac_cv_prog_cxx_g+:} false; then :
35255  $as_echo_n "(cached) " >&6
35256else
35257  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35258   ac_cxx_werror_flag=yes
35259   ac_cv_prog_cxx_g=no
35260   CXXFLAGS="-g"
35261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35262/* end confdefs.h.  */
35263
35264int
35265main ()
35266{
35267
35268  ;
35269  return 0;
35270}
35271_ACEOF
35272if ac_fn_cxx_try_compile "$LINENO"; then :
35273  ac_cv_prog_cxx_g=yes
35274else
35275  CXXFLAGS=""
35276      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35277/* end confdefs.h.  */
35278
35279int
35280main ()
35281{
35282
35283  ;
35284  return 0;
35285}
35286_ACEOF
35287if ac_fn_cxx_try_compile "$LINENO"; then :
35288
35289else
35290  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35291	 CXXFLAGS="-g"
35292	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35293/* end confdefs.h.  */
35294
35295int
35296main ()
35297{
35298
35299  ;
35300  return 0;
35301}
35302_ACEOF
35303if ac_fn_cxx_try_compile "$LINENO"; then :
35304  ac_cv_prog_cxx_g=yes
35305fi
35306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35307fi
35308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35309fi
35310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35311   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35312fi
35313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35314$as_echo "$ac_cv_prog_cxx_g" >&6; }
35315if test "$ac_test_CXXFLAGS" = set; then
35316  CXXFLAGS=$ac_save_CXXFLAGS
35317elif test $ac_cv_prog_cxx_g = yes; then
35318  if test "$GXX" = yes; then
35319    CXXFLAGS="-g -O2"
35320  else
35321    CXXFLAGS="-g"
35322  fi
35323else
35324  if test "$GXX" = yes; then
35325    CXXFLAGS="-O2"
35326  else
35327    CXXFLAGS=
35328  fi
35329fi
35330ac_ext=cpp
35331ac_cpp='$CXXCPP $CPPFLAGS'
35332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35335
35336
35337  # This is the compiler version number on the form X.Y[.Z]
35338
35339
35340
35341
35342  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35343    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35344$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35345    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35346$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35347  fi
35348
35349  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35350  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35351    { $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
35352$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;}
35353  fi
35354
35355  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35356    { $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
35357$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35358  fi
35359
35360  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35361
35362
35363  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
35408
35409
35410
35411
35412
35413    # Execute function body
35414
35415  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35416  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35417
35418  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35419    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35420  fi
35421
35422  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35423    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35424  fi
35425
35426  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35427  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35428
35429  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35430    :
35431
35432  else
35433    :
35434
35435          { $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
35436$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35437
35438
35439  fi
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454  fi
35455
35456  #
35457  # Setup the preprocessor (CPP and CXXCPP)
35458  #
35459  ac_ext=c
35460ac_cpp='$CPP $CPPFLAGS'
35461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35463ac_compiler_gnu=$ac_cv_c_compiler_gnu
35464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35465$as_echo_n "checking how to run the C preprocessor... " >&6; }
35466# On Suns, sometimes $CPP names a directory.
35467if test -n "$CPP" && test -d "$CPP"; then
35468  CPP=
35469fi
35470if test -z "$CPP"; then
35471  if ${ac_cv_prog_CPP+:} false; then :
35472  $as_echo_n "(cached) " >&6
35473else
35474      # Double quotes because CPP needs to be expanded
35475    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35476    do
35477      ac_preproc_ok=false
35478for ac_c_preproc_warn_flag in '' yes
35479do
35480  # Use a header file that comes with gcc, so configuring glibc
35481  # with a fresh cross-compiler works.
35482  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35483  # <limits.h> exists even on freestanding compilers.
35484  # On the NeXT, cc -E runs the code through the compiler's parser,
35485  # not just through cpp. "Syntax error" is here to catch this case.
35486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35487/* end confdefs.h.  */
35488#ifdef __STDC__
35489# include <limits.h>
35490#else
35491# include <assert.h>
35492#endif
35493		     Syntax error
35494_ACEOF
35495if ac_fn_c_try_cpp "$LINENO"; then :
35496
35497else
35498  # Broken: fails on valid input.
35499continue
35500fi
35501rm -f conftest.err conftest.i conftest.$ac_ext
35502
35503  # OK, works on sane cases.  Now check whether nonexistent headers
35504  # can be detected and how.
35505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35506/* end confdefs.h.  */
35507#include <ac_nonexistent.h>
35508_ACEOF
35509if ac_fn_c_try_cpp "$LINENO"; then :
35510  # Broken: success on invalid input.
35511continue
35512else
35513  # Passes both tests.
35514ac_preproc_ok=:
35515break
35516fi
35517rm -f conftest.err conftest.i conftest.$ac_ext
35518
35519done
35520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35521rm -f conftest.i conftest.err conftest.$ac_ext
35522if $ac_preproc_ok; then :
35523  break
35524fi
35525
35526    done
35527    ac_cv_prog_CPP=$CPP
35528
35529fi
35530  CPP=$ac_cv_prog_CPP
35531else
35532  ac_cv_prog_CPP=$CPP
35533fi
35534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35535$as_echo "$CPP" >&6; }
35536ac_preproc_ok=false
35537for ac_c_preproc_warn_flag in '' yes
35538do
35539  # Use a header file that comes with gcc, so configuring glibc
35540  # with a fresh cross-compiler works.
35541  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35542  # <limits.h> exists even on freestanding compilers.
35543  # On the NeXT, cc -E runs the code through the compiler's parser,
35544  # not just through cpp. "Syntax error" is here to catch this case.
35545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35546/* end confdefs.h.  */
35547#ifdef __STDC__
35548# include <limits.h>
35549#else
35550# include <assert.h>
35551#endif
35552		     Syntax error
35553_ACEOF
35554if ac_fn_c_try_cpp "$LINENO"; then :
35555
35556else
35557  # Broken: fails on valid input.
35558continue
35559fi
35560rm -f conftest.err conftest.i conftest.$ac_ext
35561
35562  # OK, works on sane cases.  Now check whether nonexistent headers
35563  # can be detected and how.
35564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35565/* end confdefs.h.  */
35566#include <ac_nonexistent.h>
35567_ACEOF
35568if ac_fn_c_try_cpp "$LINENO"; then :
35569  # Broken: success on invalid input.
35570continue
35571else
35572  # Passes both tests.
35573ac_preproc_ok=:
35574break
35575fi
35576rm -f conftest.err conftest.i conftest.$ac_ext
35577
35578done
35579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35580rm -f conftest.i conftest.err conftest.$ac_ext
35581if $ac_preproc_ok; then :
35582
35583else
35584  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35586as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35587See \`config.log' for more details" "$LINENO" 5; }
35588fi
35589
35590ac_ext=cpp
35591ac_cpp='$CXXCPP $CPPFLAGS'
35592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35595
35596
35597  # Only process if variable expands to non-empty
35598
35599  if test "x$CPP" != x; then
35600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35601
35602  # First separate the path from the arguments. This will split at the first
35603  # space.
35604  complete="$CPP"
35605  path="${complete%% *}"
35606  tmp="$complete EOL"
35607  arguments="${tmp#* }"
35608
35609  # Input might be given as Windows format, start by converting to
35610  # unix format.
35611  new_path=`$CYGPATH -u "$path"`
35612
35613  # Now try to locate executable using which
35614  new_path=`$WHICH "$new_path" 2> /dev/null`
35615  # bat and cmd files are not always considered executable in cygwin causing which
35616  # to not find them
35617  if test "x$new_path" = x \
35618      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35619      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35620    new_path=`$CYGPATH -u "$path"`
35621  fi
35622  if test "x$new_path" = x; then
35623    # Oops. Which didn't find the executable.
35624    # The splitting of arguments from the executable at a space might have been incorrect,
35625    # since paths with space are more likely in Windows. Give it another try with the whole
35626    # argument.
35627    path="$complete"
35628    arguments="EOL"
35629    new_path=`$CYGPATH -u "$path"`
35630    new_path=`$WHICH "$new_path" 2> /dev/null`
35631    # bat and cmd files are not always considered executable in cygwin causing which
35632    # to not find them
35633    if test "x$new_path" = x \
35634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35636      new_path=`$CYGPATH -u "$path"`
35637    fi
35638    if test "x$new_path" = x; then
35639      # It's still not found. Now this is an unrecoverable error.
35640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35641$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35642      has_space=`$ECHO "$complete" | $GREP " "`
35643      if test "x$has_space" != x; then
35644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35646      fi
35647      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35648    fi
35649  fi
35650
35651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35654  # "foo.exe" is OK but "foo" is an error.
35655  #
35656  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35657  # It is also a way to make sure we got the proper file name for the real test later on.
35658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35659  if test "x$test_shortpath" = x; then
35660    # Short path failed, file does not exist as specified.
35661    # Try adding .exe or .cmd
35662    if test -f "${new_path}.exe"; then
35663      input_to_shortpath="${new_path}.exe"
35664    elif test -f "${new_path}.cmd"; then
35665      input_to_shortpath="${new_path}.cmd"
35666    else
35667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35668$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35669      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35670$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35671      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35672    fi
35673  else
35674    input_to_shortpath="$new_path"
35675  fi
35676
35677  # Call helper function which possibly converts this using DOS-style short mode.
35678  # If so, the updated path is stored in $new_path.
35679  new_path="$input_to_shortpath"
35680
35681  input_path="$input_to_shortpath"
35682  # Check if we need to convert this using DOS-style short mode. If the path
35683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35684  # take no chances and rewrite it.
35685  # Note: m4 eats our [], so we need to use [ and ] instead.
35686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35687  if test "x$has_forbidden_chars" != x; then
35688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35692      # Going to short mode and back again did indeed matter. Since short mode is
35693      # case insensitive, let's make it lowercase to improve readability.
35694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35695      # Now convert it back to Unix-style (cygpath)
35696      input_path=`$CYGPATH -u "$shortmode_path"`
35697      new_path="$input_path"
35698    fi
35699  fi
35700
35701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35702  if test "x$test_cygdrive_prefix" = x; then
35703    # As a simple fix, exclude /usr/bin since it's not a real path.
35704    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35706      # a path prefixed by /cygdrive for fixpath to work.
35707      new_path="$CYGWIN_ROOT_PATH$input_path"
35708    fi
35709  fi
35710
35711  # remove trailing .exe if any
35712  new_path="${new_path/%.exe/}"
35713
35714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35715
35716  # First separate the path from the arguments. This will split at the first
35717  # space.
35718  complete="$CPP"
35719  path="${complete%% *}"
35720  tmp="$complete EOL"
35721  arguments="${tmp#* }"
35722
35723  # Input might be given as Windows format, start by converting to
35724  # unix format.
35725  new_path="$path"
35726
35727  windows_path="$new_path"
35728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35729    unix_path=`$CYGPATH -u "$windows_path"`
35730    new_path="$unix_path"
35731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35733    new_path="$unix_path"
35734  fi
35735
35736
35737  # Now try to locate executable using which
35738  new_path=`$WHICH "$new_path" 2> /dev/null`
35739
35740  if test "x$new_path" = x; then
35741    # Oops. Which didn't find the executable.
35742    # The splitting of arguments from the executable at a space might have been incorrect,
35743    # since paths with space are more likely in Windows. Give it another try with the whole
35744    # argument.
35745    path="$complete"
35746    arguments="EOL"
35747    new_path="$path"
35748
35749  windows_path="$new_path"
35750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35751    unix_path=`$CYGPATH -u "$windows_path"`
35752    new_path="$unix_path"
35753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35755    new_path="$unix_path"
35756  fi
35757
35758
35759    new_path=`$WHICH "$new_path" 2> /dev/null`
35760    # bat and cmd files are not always considered executable in MSYS causing which
35761    # to not find them
35762    if test "x$new_path" = x \
35763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35765      new_path="$path"
35766
35767  windows_path="$new_path"
35768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35769    unix_path=`$CYGPATH -u "$windows_path"`
35770    new_path="$unix_path"
35771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35773    new_path="$unix_path"
35774  fi
35775
35776    fi
35777
35778    if test "x$new_path" = x; then
35779      # It's still not found. Now this is an unrecoverable error.
35780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35781$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35782      has_space=`$ECHO "$complete" | $GREP " "`
35783      if test "x$has_space" != x; then
35784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35786      fi
35787      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35788    fi
35789  fi
35790
35791  # Now new_path has a complete unix path to the binary
35792  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35793    # Keep paths in /bin as-is, but remove trailing .exe if any
35794    new_path="${new_path/%.exe/}"
35795    # Do not save /bin paths to all_fixpath_prefixes!
35796  else
35797    # Not in mixed or Windows style, start by that.
35798    new_path=`cmd //c echo $new_path`
35799
35800  input_path="$new_path"
35801  # Check if we need to convert this using DOS-style short mode. If the path
35802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35803  # take no chances and rewrite it.
35804  # Note: m4 eats our [], so we need to use [ and ] instead.
35805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35806  if test "x$has_forbidden_chars" != x; then
35807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35809  fi
35810
35811    # Output is in $new_path
35812
35813  windows_path="$new_path"
35814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35815    unix_path=`$CYGPATH -u "$windows_path"`
35816    new_path="$unix_path"
35817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35819    new_path="$unix_path"
35820  fi
35821
35822    # remove trailing .exe if any
35823    new_path="${new_path/%.exe/}"
35824
35825    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35826    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35827  fi
35828
35829    else
35830      # We're on a unix platform. Hooray! :)
35831      # First separate the path from the arguments. This will split at the first
35832      # space.
35833      complete="$CPP"
35834      path="${complete%% *}"
35835      tmp="$complete EOL"
35836      arguments="${tmp#* }"
35837
35838      # Cannot rely on the command "which" here since it doesn't always work.
35839      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35840      if test -z "$is_absolute_path"; then
35841        # Path to executable is not absolute. Find it.
35842        IFS_save="$IFS"
35843        IFS=:
35844        for p in $PATH; do
35845          if test -f "$p/$path" && test -x "$p/$path"; then
35846            new_path="$p/$path"
35847            break
35848          fi
35849        done
35850        IFS="$IFS_save"
35851      else
35852        # This is an absolute path, we can use it without further modifications.
35853        new_path="$path"
35854      fi
35855
35856      if test "x$new_path" = x; then
35857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35858$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35859        has_space=`$ECHO "$complete" | $GREP " "`
35860        if test "x$has_space" != x; then
35861          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35862$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35863        fi
35864        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35865      fi
35866    fi
35867
35868    # Now join together the path and the arguments once again
35869    if test "x$arguments" != xEOL; then
35870      new_complete="$new_path ${arguments% *}"
35871    else
35872      new_complete="$new_path"
35873    fi
35874
35875    if test "x$complete" != "x$new_complete"; then
35876      CPP="$new_complete"
35877      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35878$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35879    fi
35880  fi
35881
35882  ac_ext=cpp
35883ac_cpp='$CXXCPP $CPPFLAGS'
35884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35888$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35889if test -z "$CXXCPP"; then
35890  if ${ac_cv_prog_CXXCPP+:} false; then :
35891  $as_echo_n "(cached) " >&6
35892else
35893      # Double quotes because CXXCPP needs to be expanded
35894    for CXXCPP in "$CXX -E" "/lib/cpp"
35895    do
35896      ac_preproc_ok=false
35897for ac_cxx_preproc_warn_flag in '' yes
35898do
35899  # Use a header file that comes with gcc, so configuring glibc
35900  # with a fresh cross-compiler works.
35901  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35902  # <limits.h> exists even on freestanding compilers.
35903  # On the NeXT, cc -E runs the code through the compiler's parser,
35904  # not just through cpp. "Syntax error" is here to catch this case.
35905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35906/* end confdefs.h.  */
35907#ifdef __STDC__
35908# include <limits.h>
35909#else
35910# include <assert.h>
35911#endif
35912		     Syntax error
35913_ACEOF
35914if ac_fn_cxx_try_cpp "$LINENO"; then :
35915
35916else
35917  # Broken: fails on valid input.
35918continue
35919fi
35920rm -f conftest.err conftest.i conftest.$ac_ext
35921
35922  # OK, works on sane cases.  Now check whether nonexistent headers
35923  # can be detected and how.
35924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35925/* end confdefs.h.  */
35926#include <ac_nonexistent.h>
35927_ACEOF
35928if ac_fn_cxx_try_cpp "$LINENO"; then :
35929  # Broken: success on invalid input.
35930continue
35931else
35932  # Passes both tests.
35933ac_preproc_ok=:
35934break
35935fi
35936rm -f conftest.err conftest.i conftest.$ac_ext
35937
35938done
35939# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35940rm -f conftest.i conftest.err conftest.$ac_ext
35941if $ac_preproc_ok; then :
35942  break
35943fi
35944
35945    done
35946    ac_cv_prog_CXXCPP=$CXXCPP
35947
35948fi
35949  CXXCPP=$ac_cv_prog_CXXCPP
35950else
35951  ac_cv_prog_CXXCPP=$CXXCPP
35952fi
35953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35954$as_echo "$CXXCPP" >&6; }
35955ac_preproc_ok=false
35956for ac_cxx_preproc_warn_flag in '' yes
35957do
35958  # Use a header file that comes with gcc, so configuring glibc
35959  # with a fresh cross-compiler works.
35960  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35961  # <limits.h> exists even on freestanding compilers.
35962  # On the NeXT, cc -E runs the code through the compiler's parser,
35963  # not just through cpp. "Syntax error" is here to catch this case.
35964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35965/* end confdefs.h.  */
35966#ifdef __STDC__
35967# include <limits.h>
35968#else
35969# include <assert.h>
35970#endif
35971		     Syntax error
35972_ACEOF
35973if ac_fn_cxx_try_cpp "$LINENO"; then :
35974
35975else
35976  # Broken: fails on valid input.
35977continue
35978fi
35979rm -f conftest.err conftest.i conftest.$ac_ext
35980
35981  # OK, works on sane cases.  Now check whether nonexistent headers
35982  # can be detected and how.
35983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35984/* end confdefs.h.  */
35985#include <ac_nonexistent.h>
35986_ACEOF
35987if ac_fn_cxx_try_cpp "$LINENO"; then :
35988  # Broken: success on invalid input.
35989continue
35990else
35991  # Passes both tests.
35992ac_preproc_ok=:
35993break
35994fi
35995rm -f conftest.err conftest.i conftest.$ac_ext
35996
35997done
35998# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35999rm -f conftest.i conftest.err conftest.$ac_ext
36000if $ac_preproc_ok; then :
36001
36002else
36003  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36005as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36006See \`config.log' for more details" "$LINENO" 5; }
36007fi
36008
36009ac_ext=cpp
36010ac_cpp='$CXXCPP $CPPFLAGS'
36011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36014
36015
36016  # Only process if variable expands to non-empty
36017
36018  if test "x$CXXCPP" != x; then
36019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36020
36021  # First separate the path from the arguments. This will split at the first
36022  # space.
36023  complete="$CXXCPP"
36024  path="${complete%% *}"
36025  tmp="$complete EOL"
36026  arguments="${tmp#* }"
36027
36028  # Input might be given as Windows format, start by converting to
36029  # unix format.
36030  new_path=`$CYGPATH -u "$path"`
36031
36032  # Now try to locate executable using which
36033  new_path=`$WHICH "$new_path" 2> /dev/null`
36034  # bat and cmd files are not always considered executable in cygwin causing which
36035  # to not find them
36036  if test "x$new_path" = x \
36037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36039    new_path=`$CYGPATH -u "$path"`
36040  fi
36041  if test "x$new_path" = x; then
36042    # Oops. Which didn't find the executable.
36043    # The splitting of arguments from the executable at a space might have been incorrect,
36044    # since paths with space are more likely in Windows. Give it another try with the whole
36045    # argument.
36046    path="$complete"
36047    arguments="EOL"
36048    new_path=`$CYGPATH -u "$path"`
36049    new_path=`$WHICH "$new_path" 2> /dev/null`
36050    # bat and cmd files are not always considered executable in cygwin causing which
36051    # to not find them
36052    if test "x$new_path" = x \
36053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36055      new_path=`$CYGPATH -u "$path"`
36056    fi
36057    if test "x$new_path" = x; then
36058      # It's still not found. Now this is an unrecoverable error.
36059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36060$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36061      has_space=`$ECHO "$complete" | $GREP " "`
36062      if test "x$has_space" != x; then
36063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36065      fi
36066      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36067    fi
36068  fi
36069
36070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36073  # "foo.exe" is OK but "foo" is an error.
36074  #
36075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36076  # It is also a way to make sure we got the proper file name for the real test later on.
36077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36078  if test "x$test_shortpath" = x; then
36079    # Short path failed, file does not exist as specified.
36080    # Try adding .exe or .cmd
36081    if test -f "${new_path}.exe"; then
36082      input_to_shortpath="${new_path}.exe"
36083    elif test -f "${new_path}.cmd"; then
36084      input_to_shortpath="${new_path}.cmd"
36085    else
36086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36087$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36090      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36091    fi
36092  else
36093    input_to_shortpath="$new_path"
36094  fi
36095
36096  # Call helper function which possibly converts this using DOS-style short mode.
36097  # If so, the updated path is stored in $new_path.
36098  new_path="$input_to_shortpath"
36099
36100  input_path="$input_to_shortpath"
36101  # Check if we need to convert this using DOS-style short mode. If the path
36102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36103  # take no chances and rewrite it.
36104  # Note: m4 eats our [], so we need to use [ and ] instead.
36105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36106  if test "x$has_forbidden_chars" != x; then
36107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36111      # Going to short mode and back again did indeed matter. Since short mode is
36112      # case insensitive, let's make it lowercase to improve readability.
36113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36114      # Now convert it back to Unix-style (cygpath)
36115      input_path=`$CYGPATH -u "$shortmode_path"`
36116      new_path="$input_path"
36117    fi
36118  fi
36119
36120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36121  if test "x$test_cygdrive_prefix" = x; then
36122    # As a simple fix, exclude /usr/bin since it's not a real path.
36123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36125      # a path prefixed by /cygdrive for fixpath to work.
36126      new_path="$CYGWIN_ROOT_PATH$input_path"
36127    fi
36128  fi
36129
36130  # remove trailing .exe if any
36131  new_path="${new_path/%.exe/}"
36132
36133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36134
36135  # First separate the path from the arguments. This will split at the first
36136  # space.
36137  complete="$CXXCPP"
36138  path="${complete%% *}"
36139  tmp="$complete EOL"
36140  arguments="${tmp#* }"
36141
36142  # Input might be given as Windows format, start by converting to
36143  # unix format.
36144  new_path="$path"
36145
36146  windows_path="$new_path"
36147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36148    unix_path=`$CYGPATH -u "$windows_path"`
36149    new_path="$unix_path"
36150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36152    new_path="$unix_path"
36153  fi
36154
36155
36156  # Now try to locate executable using which
36157  new_path=`$WHICH "$new_path" 2> /dev/null`
36158
36159  if test "x$new_path" = x; then
36160    # Oops. Which didn't find the executable.
36161    # The splitting of arguments from the executable at a space might have been incorrect,
36162    # since paths with space are more likely in Windows. Give it another try with the whole
36163    # argument.
36164    path="$complete"
36165    arguments="EOL"
36166    new_path="$path"
36167
36168  windows_path="$new_path"
36169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36170    unix_path=`$CYGPATH -u "$windows_path"`
36171    new_path="$unix_path"
36172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36174    new_path="$unix_path"
36175  fi
36176
36177
36178    new_path=`$WHICH "$new_path" 2> /dev/null`
36179    # bat and cmd files are not always considered executable in MSYS causing which
36180    # to not find them
36181    if test "x$new_path" = x \
36182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36184      new_path="$path"
36185
36186  windows_path="$new_path"
36187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36188    unix_path=`$CYGPATH -u "$windows_path"`
36189    new_path="$unix_path"
36190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36192    new_path="$unix_path"
36193  fi
36194
36195    fi
36196
36197    if test "x$new_path" = x; then
36198      # It's still not found. Now this is an unrecoverable error.
36199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36200$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36201      has_space=`$ECHO "$complete" | $GREP " "`
36202      if test "x$has_space" != x; then
36203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36205      fi
36206      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36207    fi
36208  fi
36209
36210  # Now new_path has a complete unix path to the binary
36211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36212    # Keep paths in /bin as-is, but remove trailing .exe if any
36213    new_path="${new_path/%.exe/}"
36214    # Do not save /bin paths to all_fixpath_prefixes!
36215  else
36216    # Not in mixed or Windows style, start by that.
36217    new_path=`cmd //c echo $new_path`
36218
36219  input_path="$new_path"
36220  # Check if we need to convert this using DOS-style short mode. If the path
36221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36222  # take no chances and rewrite it.
36223  # Note: m4 eats our [], so we need to use [ and ] instead.
36224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36225  if test "x$has_forbidden_chars" != x; then
36226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36228  fi
36229
36230    # Output is in $new_path
36231
36232  windows_path="$new_path"
36233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36234    unix_path=`$CYGPATH -u "$windows_path"`
36235    new_path="$unix_path"
36236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36238    new_path="$unix_path"
36239  fi
36240
36241    # remove trailing .exe if any
36242    new_path="${new_path/%.exe/}"
36243
36244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36246  fi
36247
36248    else
36249      # We're on a unix platform. Hooray! :)
36250      # First separate the path from the arguments. This will split at the first
36251      # space.
36252      complete="$CXXCPP"
36253      path="${complete%% *}"
36254      tmp="$complete EOL"
36255      arguments="${tmp#* }"
36256
36257      # Cannot rely on the command "which" here since it doesn't always work.
36258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36259      if test -z "$is_absolute_path"; then
36260        # Path to executable is not absolute. Find it.
36261        IFS_save="$IFS"
36262        IFS=:
36263        for p in $PATH; do
36264          if test -f "$p/$path" && test -x "$p/$path"; then
36265            new_path="$p/$path"
36266            break
36267          fi
36268        done
36269        IFS="$IFS_save"
36270      else
36271        # This is an absolute path, we can use it without further modifications.
36272        new_path="$path"
36273      fi
36274
36275      if test "x$new_path" = x; then
36276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36277$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36278        has_space=`$ECHO "$complete" | $GREP " "`
36279        if test "x$has_space" != x; then
36280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36282        fi
36283        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36284      fi
36285    fi
36286
36287    # Now join together the path and the arguments once again
36288    if test "x$arguments" != xEOL; then
36289      new_complete="$new_path ${arguments% *}"
36290    else
36291      new_complete="$new_path"
36292    fi
36293
36294    if test "x$complete" != "x$new_complete"; then
36295      CXXCPP="$new_complete"
36296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36297$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36298    fi
36299  fi
36300
36301
36302  #
36303  # Setup the linker (LD)
36304  #
36305  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36306    # In the Microsoft toolchain we have a separate LD command "link".
36307    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36308    # a cygwin program for something completely different.
36309    # Extract the first word of "link", so it can be a program name with args.
36310set dummy link; ac_word=$2
36311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36312$as_echo_n "checking for $ac_word... " >&6; }
36313if ${ac_cv_prog_LD+:} false; then :
36314  $as_echo_n "(cached) " >&6
36315else
36316  if test -n "$LD"; then
36317  ac_cv_prog_LD="$LD" # Let the user override the test.
36318else
36319  ac_prog_rejected=no
36320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36321for as_dir in $PATH
36322do
36323  IFS=$as_save_IFS
36324  test -z "$as_dir" && as_dir=.
36325    for ac_exec_ext in '' $ac_executable_extensions; do
36326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36327    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36328       ac_prog_rejected=yes
36329       continue
36330     fi
36331    ac_cv_prog_LD="link"
36332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36333    break 2
36334  fi
36335done
36336  done
36337IFS=$as_save_IFS
36338
36339if test $ac_prog_rejected = yes; then
36340  # We found a bogon in the path, so make sure we never use it.
36341  set dummy $ac_cv_prog_LD
36342  shift
36343  if test $# != 0; then
36344    # We chose a different compiler from the bogus one.
36345    # However, it has the same basename, so the bogon will be chosen
36346    # first if we set LD to just the basename; use the full file name.
36347    shift
36348    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36349  fi
36350fi
36351fi
36352fi
36353LD=$ac_cv_prog_LD
36354if test -n "$LD"; then
36355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36356$as_echo "$LD" >&6; }
36357else
36358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36359$as_echo "no" >&6; }
36360fi
36361
36362
36363
36364  # Only process if variable expands to non-empty
36365
36366  if test "x$LD" != x; then
36367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36368
36369  # First separate the path from the arguments. This will split at the first
36370  # space.
36371  complete="$LD"
36372  path="${complete%% *}"
36373  tmp="$complete EOL"
36374  arguments="${tmp#* }"
36375
36376  # Input might be given as Windows format, start by converting to
36377  # unix format.
36378  new_path=`$CYGPATH -u "$path"`
36379
36380  # Now try to locate executable using which
36381  new_path=`$WHICH "$new_path" 2> /dev/null`
36382  # bat and cmd files are not always considered executable in cygwin causing which
36383  # to not find them
36384  if test "x$new_path" = x \
36385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36387    new_path=`$CYGPATH -u "$path"`
36388  fi
36389  if test "x$new_path" = x; then
36390    # Oops. Which didn't find the executable.
36391    # The splitting of arguments from the executable at a space might have been incorrect,
36392    # since paths with space are more likely in Windows. Give it another try with the whole
36393    # argument.
36394    path="$complete"
36395    arguments="EOL"
36396    new_path=`$CYGPATH -u "$path"`
36397    new_path=`$WHICH "$new_path" 2> /dev/null`
36398    # bat and cmd files are not always considered executable in cygwin causing which
36399    # to not find them
36400    if test "x$new_path" = x \
36401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36403      new_path=`$CYGPATH -u "$path"`
36404    fi
36405    if test "x$new_path" = x; then
36406      # It's still not found. Now this is an unrecoverable error.
36407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36408$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36409      has_space=`$ECHO "$complete" | $GREP " "`
36410      if test "x$has_space" != x; then
36411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36413      fi
36414      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36415    fi
36416  fi
36417
36418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36421  # "foo.exe" is OK but "foo" is an error.
36422  #
36423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36424  # It is also a way to make sure we got the proper file name for the real test later on.
36425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36426  if test "x$test_shortpath" = x; then
36427    # Short path failed, file does not exist as specified.
36428    # Try adding .exe or .cmd
36429    if test -f "${new_path}.exe"; then
36430      input_to_shortpath="${new_path}.exe"
36431    elif test -f "${new_path}.cmd"; then
36432      input_to_shortpath="${new_path}.cmd"
36433    else
36434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36435$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36438      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36439    fi
36440  else
36441    input_to_shortpath="$new_path"
36442  fi
36443
36444  # Call helper function which possibly converts this using DOS-style short mode.
36445  # If so, the updated path is stored in $new_path.
36446  new_path="$input_to_shortpath"
36447
36448  input_path="$input_to_shortpath"
36449  # Check if we need to convert this using DOS-style short mode. If the path
36450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36451  # take no chances and rewrite it.
36452  # Note: m4 eats our [], so we need to use [ and ] instead.
36453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36454  if test "x$has_forbidden_chars" != x; then
36455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36459      # Going to short mode and back again did indeed matter. Since short mode is
36460      # case insensitive, let's make it lowercase to improve readability.
36461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36462      # Now convert it back to Unix-style (cygpath)
36463      input_path=`$CYGPATH -u "$shortmode_path"`
36464      new_path="$input_path"
36465    fi
36466  fi
36467
36468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36469  if test "x$test_cygdrive_prefix" = x; then
36470    # As a simple fix, exclude /usr/bin since it's not a real path.
36471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36473      # a path prefixed by /cygdrive for fixpath to work.
36474      new_path="$CYGWIN_ROOT_PATH$input_path"
36475    fi
36476  fi
36477
36478  # remove trailing .exe if any
36479  new_path="${new_path/%.exe/}"
36480
36481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36482
36483  # First separate the path from the arguments. This will split at the first
36484  # space.
36485  complete="$LD"
36486  path="${complete%% *}"
36487  tmp="$complete EOL"
36488  arguments="${tmp#* }"
36489
36490  # Input might be given as Windows format, start by converting to
36491  # unix format.
36492  new_path="$path"
36493
36494  windows_path="$new_path"
36495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36496    unix_path=`$CYGPATH -u "$windows_path"`
36497    new_path="$unix_path"
36498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36500    new_path="$unix_path"
36501  fi
36502
36503
36504  # Now try to locate executable using which
36505  new_path=`$WHICH "$new_path" 2> /dev/null`
36506
36507  if test "x$new_path" = x; then
36508    # Oops. Which didn't find the executable.
36509    # The splitting of arguments from the executable at a space might have been incorrect,
36510    # since paths with space are more likely in Windows. Give it another try with the whole
36511    # argument.
36512    path="$complete"
36513    arguments="EOL"
36514    new_path="$path"
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525
36526    new_path=`$WHICH "$new_path" 2> /dev/null`
36527    # bat and cmd files are not always considered executable in MSYS causing which
36528    # to not find them
36529    if test "x$new_path" = x \
36530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36532      new_path="$path"
36533
36534  windows_path="$new_path"
36535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36536    unix_path=`$CYGPATH -u "$windows_path"`
36537    new_path="$unix_path"
36538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36540    new_path="$unix_path"
36541  fi
36542
36543    fi
36544
36545    if test "x$new_path" = x; then
36546      # It's still not found. Now this is an unrecoverable error.
36547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36548$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36549      has_space=`$ECHO "$complete" | $GREP " "`
36550      if test "x$has_space" != x; then
36551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36553      fi
36554      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36555    fi
36556  fi
36557
36558  # Now new_path has a complete unix path to the binary
36559  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36560    # Keep paths in /bin as-is, but remove trailing .exe if any
36561    new_path="${new_path/%.exe/}"
36562    # Do not save /bin paths to all_fixpath_prefixes!
36563  else
36564    # Not in mixed or Windows style, start by that.
36565    new_path=`cmd //c echo $new_path`
36566
36567  input_path="$new_path"
36568  # Check if we need to convert this using DOS-style short mode. If the path
36569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36570  # take no chances and rewrite it.
36571  # Note: m4 eats our [], so we need to use [ and ] instead.
36572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36573  if test "x$has_forbidden_chars" != x; then
36574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36576  fi
36577
36578    # Output is in $new_path
36579
36580  windows_path="$new_path"
36581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36582    unix_path=`$CYGPATH -u "$windows_path"`
36583    new_path="$unix_path"
36584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36586    new_path="$unix_path"
36587  fi
36588
36589    # remove trailing .exe if any
36590    new_path="${new_path/%.exe/}"
36591
36592    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36593    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36594  fi
36595
36596    else
36597      # We're on a unix platform. Hooray! :)
36598      # First separate the path from the arguments. This will split at the first
36599      # space.
36600      complete="$LD"
36601      path="${complete%% *}"
36602      tmp="$complete EOL"
36603      arguments="${tmp#* }"
36604
36605      # Cannot rely on the command "which" here since it doesn't always work.
36606      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36607      if test -z "$is_absolute_path"; then
36608        # Path to executable is not absolute. Find it.
36609        IFS_save="$IFS"
36610        IFS=:
36611        for p in $PATH; do
36612          if test -f "$p/$path" && test -x "$p/$path"; then
36613            new_path="$p/$path"
36614            break
36615          fi
36616        done
36617        IFS="$IFS_save"
36618      else
36619        # This is an absolute path, we can use it without further modifications.
36620        new_path="$path"
36621      fi
36622
36623      if test "x$new_path" = x; then
36624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36625$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36626        has_space=`$ECHO "$complete" | $GREP " "`
36627        if test "x$has_space" != x; then
36628          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36629$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36630        fi
36631        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36632      fi
36633    fi
36634
36635    # Now join together the path and the arguments once again
36636    if test "x$arguments" != xEOL; then
36637      new_complete="$new_path ${arguments% *}"
36638    else
36639      new_complete="$new_path"
36640    fi
36641
36642    if test "x$complete" != "x$new_complete"; then
36643      LD="$new_complete"
36644      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36645$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36646    fi
36647  fi
36648
36649    # Verify that we indeed succeeded with this trick.
36650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36651$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36652    "$LD" --version > /dev/null
36653    if test $? -eq 0 ; then
36654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36655$as_echo "no" >&6; }
36656      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36657    else
36658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36659$as_echo "yes" >&6; }
36660    fi
36661    LDCXX="$LD"
36662  else
36663    # All other toolchains use the compiler to link.
36664    LD="$CC"
36665    LDCXX="$CXX"
36666  fi
36667
36668  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36669
36670
36671  #
36672  # Setup the assembler (AS)
36673  #
36674  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36675
36676
36677  # Publish this variable in the help.
36678
36679
36680  if [ -z "${AS+x}" ]; then
36681    # The variable is not set by user, try to locate tool using the code snippet
36682    for ac_prog in as
36683do
36684  # Extract the first word of "$ac_prog", so it can be a program name with args.
36685set dummy $ac_prog; ac_word=$2
36686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36687$as_echo_n "checking for $ac_word... " >&6; }
36688if ${ac_cv_path_AS+:} false; then :
36689  $as_echo_n "(cached) " >&6
36690else
36691  case $AS in
36692  [\\/]* | ?:[\\/]*)
36693  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36694  ;;
36695  *)
36696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36697for as_dir in $PATH
36698do
36699  IFS=$as_save_IFS
36700  test -z "$as_dir" && as_dir=.
36701    for ac_exec_ext in '' $ac_executable_extensions; do
36702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36703    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36705    break 2
36706  fi
36707done
36708  done
36709IFS=$as_save_IFS
36710
36711  ;;
36712esac
36713fi
36714AS=$ac_cv_path_AS
36715if test -n "$AS"; then
36716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36717$as_echo "$AS" >&6; }
36718else
36719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36720$as_echo "no" >&6; }
36721fi
36722
36723
36724  test -n "$AS" && break
36725done
36726
36727  else
36728    # The variable is set, but is it from the command line or the environment?
36729
36730    # Try to remove the string !AS! from our list.
36731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36733      # If it failed, the variable was not from the command line. Ignore it,
36734      # but warn the user (except for BASH, which is always set by the calling BASH).
36735      if test "xAS" != xBASH; then
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36737$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36738      fi
36739      # Try to locate tool using the code snippet
36740      for ac_prog in as
36741do
36742  # Extract the first word of "$ac_prog", so it can be a program name with args.
36743set dummy $ac_prog; ac_word=$2
36744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36745$as_echo_n "checking for $ac_word... " >&6; }
36746if ${ac_cv_path_AS+:} false; then :
36747  $as_echo_n "(cached) " >&6
36748else
36749  case $AS in
36750  [\\/]* | ?:[\\/]*)
36751  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36752  ;;
36753  *)
36754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36755for as_dir in $PATH
36756do
36757  IFS=$as_save_IFS
36758  test -z "$as_dir" && as_dir=.
36759    for ac_exec_ext in '' $ac_executable_extensions; do
36760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36761    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36763    break 2
36764  fi
36765done
36766  done
36767IFS=$as_save_IFS
36768
36769  ;;
36770esac
36771fi
36772AS=$ac_cv_path_AS
36773if test -n "$AS"; then
36774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36775$as_echo "$AS" >&6; }
36776else
36777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36778$as_echo "no" >&6; }
36779fi
36780
36781
36782  test -n "$AS" && break
36783done
36784
36785    else
36786      # If it succeeded, then it was overridden by the user. We will use it
36787      # for the tool.
36788
36789      # First remove it from the list of overridden variables, so we can test
36790      # for unknown variables in the end.
36791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36792
36793      # Check if we try to supply an empty value
36794      if test "x$AS" = x; then
36795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36796$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36798$as_echo_n "checking for AS... " >&6; }
36799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36800$as_echo "disabled" >&6; }
36801      else
36802        # Check if the provided tool contains a complete path.
36803        tool_specified="$AS"
36804        tool_basename="${tool_specified##*/}"
36805        if test "x$tool_basename" = "x$tool_specified"; then
36806          # A command without a complete path is provided, search $PATH.
36807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36808$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36809          # Extract the first word of "$tool_basename", so it can be a program name with args.
36810set dummy $tool_basename; ac_word=$2
36811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36812$as_echo_n "checking for $ac_word... " >&6; }
36813if ${ac_cv_path_AS+:} false; then :
36814  $as_echo_n "(cached) " >&6
36815else
36816  case $AS in
36817  [\\/]* | ?:[\\/]*)
36818  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36819  ;;
36820  *)
36821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36822for as_dir in $PATH
36823do
36824  IFS=$as_save_IFS
36825  test -z "$as_dir" && as_dir=.
36826    for ac_exec_ext in '' $ac_executable_extensions; do
36827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36828    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36830    break 2
36831  fi
36832done
36833  done
36834IFS=$as_save_IFS
36835
36836  ;;
36837esac
36838fi
36839AS=$ac_cv_path_AS
36840if test -n "$AS"; then
36841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36842$as_echo "$AS" >&6; }
36843else
36844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36845$as_echo "no" >&6; }
36846fi
36847
36848
36849          if test "x$AS" = x; then
36850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36851          fi
36852        else
36853          # Otherwise we believe it is a complete path. Use it as it is.
36854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36855$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36857$as_echo_n "checking for AS... " >&6; }
36858          if test ! -x "$tool_specified"; then
36859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36860$as_echo "not found" >&6; }
36861            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36862          fi
36863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36864$as_echo "$tool_specified" >&6; }
36865        fi
36866      fi
36867    fi
36868
36869  fi
36870
36871
36872
36873  # Only process if variable expands to non-empty
36874
36875  if test "x$AS" != x; then
36876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36877
36878  # First separate the path from the arguments. This will split at the first
36879  # space.
36880  complete="$AS"
36881  path="${complete%% *}"
36882  tmp="$complete EOL"
36883  arguments="${tmp#* }"
36884
36885  # Input might be given as Windows format, start by converting to
36886  # unix format.
36887  new_path=`$CYGPATH -u "$path"`
36888
36889  # Now try to locate executable using which
36890  new_path=`$WHICH "$new_path" 2> /dev/null`
36891  # bat and cmd files are not always considered executable in cygwin causing which
36892  # to not find them
36893  if test "x$new_path" = x \
36894      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36895      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36896    new_path=`$CYGPATH -u "$path"`
36897  fi
36898  if test "x$new_path" = x; then
36899    # Oops. Which didn't find the executable.
36900    # The splitting of arguments from the executable at a space might have been incorrect,
36901    # since paths with space are more likely in Windows. Give it another try with the whole
36902    # argument.
36903    path="$complete"
36904    arguments="EOL"
36905    new_path=`$CYGPATH -u "$path"`
36906    new_path=`$WHICH "$new_path" 2> /dev/null`
36907    # bat and cmd files are not always considered executable in cygwin causing which
36908    # to not find them
36909    if test "x$new_path" = x \
36910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36912      new_path=`$CYGPATH -u "$path"`
36913    fi
36914    if test "x$new_path" = x; then
36915      # It's still not found. Now this is an unrecoverable error.
36916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36917$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36918      has_space=`$ECHO "$complete" | $GREP " "`
36919      if test "x$has_space" != x; then
36920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36922      fi
36923      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36924    fi
36925  fi
36926
36927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36930  # "foo.exe" is OK but "foo" is an error.
36931  #
36932  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36933  # It is also a way to make sure we got the proper file name for the real test later on.
36934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36935  if test "x$test_shortpath" = x; then
36936    # Short path failed, file does not exist as specified.
36937    # Try adding .exe or .cmd
36938    if test -f "${new_path}.exe"; then
36939      input_to_shortpath="${new_path}.exe"
36940    elif test -f "${new_path}.cmd"; then
36941      input_to_shortpath="${new_path}.cmd"
36942    else
36943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36944$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36945      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36946$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36947      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36948    fi
36949  else
36950    input_to_shortpath="$new_path"
36951  fi
36952
36953  # Call helper function which possibly converts this using DOS-style short mode.
36954  # If so, the updated path is stored in $new_path.
36955  new_path="$input_to_shortpath"
36956
36957  input_path="$input_to_shortpath"
36958  # Check if we need to convert this using DOS-style short mode. If the path
36959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36960  # take no chances and rewrite it.
36961  # Note: m4 eats our [], so we need to use [ and ] instead.
36962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36963  if test "x$has_forbidden_chars" != x; then
36964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36968      # Going to short mode and back again did indeed matter. Since short mode is
36969      # case insensitive, let's make it lowercase to improve readability.
36970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36971      # Now convert it back to Unix-style (cygpath)
36972      input_path=`$CYGPATH -u "$shortmode_path"`
36973      new_path="$input_path"
36974    fi
36975  fi
36976
36977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36978  if test "x$test_cygdrive_prefix" = x; then
36979    # As a simple fix, exclude /usr/bin since it's not a real path.
36980    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36982      # a path prefixed by /cygdrive for fixpath to work.
36983      new_path="$CYGWIN_ROOT_PATH$input_path"
36984    fi
36985  fi
36986
36987  # remove trailing .exe if any
36988  new_path="${new_path/%.exe/}"
36989
36990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36991
36992  # First separate the path from the arguments. This will split at the first
36993  # space.
36994  complete="$AS"
36995  path="${complete%% *}"
36996  tmp="$complete EOL"
36997  arguments="${tmp#* }"
36998
36999  # Input might be given as Windows format, start by converting to
37000  # unix format.
37001  new_path="$path"
37002
37003  windows_path="$new_path"
37004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37005    unix_path=`$CYGPATH -u "$windows_path"`
37006    new_path="$unix_path"
37007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37009    new_path="$unix_path"
37010  fi
37011
37012
37013  # Now try to locate executable using which
37014  new_path=`$WHICH "$new_path" 2> /dev/null`
37015
37016  if test "x$new_path" = x; then
37017    # Oops. Which didn't find the executable.
37018    # The splitting of arguments from the executable at a space might have been incorrect,
37019    # since paths with space are more likely in Windows. Give it another try with the whole
37020    # argument.
37021    path="$complete"
37022    arguments="EOL"
37023    new_path="$path"
37024
37025  windows_path="$new_path"
37026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37027    unix_path=`$CYGPATH -u "$windows_path"`
37028    new_path="$unix_path"
37029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37031    new_path="$unix_path"
37032  fi
37033
37034
37035    new_path=`$WHICH "$new_path" 2> /dev/null`
37036    # bat and cmd files are not always considered executable in MSYS causing which
37037    # to not find them
37038    if test "x$new_path" = x \
37039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37041      new_path="$path"
37042
37043  windows_path="$new_path"
37044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37045    unix_path=`$CYGPATH -u "$windows_path"`
37046    new_path="$unix_path"
37047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37049    new_path="$unix_path"
37050  fi
37051
37052    fi
37053
37054    if test "x$new_path" = x; then
37055      # It's still not found. Now this is an unrecoverable error.
37056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37057$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37058      has_space=`$ECHO "$complete" | $GREP " "`
37059      if test "x$has_space" != x; then
37060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37062      fi
37063      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37064    fi
37065  fi
37066
37067  # Now new_path has a complete unix path to the binary
37068  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37069    # Keep paths in /bin as-is, but remove trailing .exe if any
37070    new_path="${new_path/%.exe/}"
37071    # Do not save /bin paths to all_fixpath_prefixes!
37072  else
37073    # Not in mixed or Windows style, start by that.
37074    new_path=`cmd //c echo $new_path`
37075
37076  input_path="$new_path"
37077  # Check if we need to convert this using DOS-style short mode. If the path
37078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37079  # take no chances and rewrite it.
37080  # Note: m4 eats our [], so we need to use [ and ] instead.
37081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37082  if test "x$has_forbidden_chars" != x; then
37083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37085  fi
37086
37087    # Output is in $new_path
37088
37089  windows_path="$new_path"
37090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37091    unix_path=`$CYGPATH -u "$windows_path"`
37092    new_path="$unix_path"
37093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37095    new_path="$unix_path"
37096  fi
37097
37098    # remove trailing .exe if any
37099    new_path="${new_path/%.exe/}"
37100
37101    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37102    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37103  fi
37104
37105    else
37106      # We're on a unix platform. Hooray! :)
37107      # First separate the path from the arguments. This will split at the first
37108      # space.
37109      complete="$AS"
37110      path="${complete%% *}"
37111      tmp="$complete EOL"
37112      arguments="${tmp#* }"
37113
37114      # Cannot rely on the command "which" here since it doesn't always work.
37115      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37116      if test -z "$is_absolute_path"; then
37117        # Path to executable is not absolute. Find it.
37118        IFS_save="$IFS"
37119        IFS=:
37120        for p in $PATH; do
37121          if test -f "$p/$path" && test -x "$p/$path"; then
37122            new_path="$p/$path"
37123            break
37124          fi
37125        done
37126        IFS="$IFS_save"
37127      else
37128        # This is an absolute path, we can use it without further modifications.
37129        new_path="$path"
37130      fi
37131
37132      if test "x$new_path" = x; then
37133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37134$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37135        has_space=`$ECHO "$complete" | $GREP " "`
37136        if test "x$has_space" != x; then
37137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37139        fi
37140        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37141      fi
37142    fi
37143
37144    # Now join together the path and the arguments once again
37145    if test "x$arguments" != xEOL; then
37146      new_complete="$new_path ${arguments% *}"
37147    else
37148      new_complete="$new_path"
37149    fi
37150
37151    if test "x$complete" != "x$new_complete"; then
37152      AS="$new_complete"
37153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37154$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37155    fi
37156  fi
37157
37158    if test "x$AS" = x; then
37159      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37160    fi
37161  else
37162    # FIXME: is this correct for microsoft?
37163    AS="$CC -c"
37164  fi
37165
37166
37167  #
37168  # Setup the archiver (AR)
37169  #
37170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37171    # The corresponding ar tool is lib.exe (used to create static libraries)
37172    # Extract the first word of "lib", so it can be a program name with args.
37173set dummy lib; ac_word=$2
37174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37175$as_echo_n "checking for $ac_word... " >&6; }
37176if ${ac_cv_prog_AR+:} false; then :
37177  $as_echo_n "(cached) " >&6
37178else
37179  if test -n "$AR"; then
37180  ac_cv_prog_AR="$AR" # Let the user override the test.
37181else
37182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37183for as_dir in $PATH
37184do
37185  IFS=$as_save_IFS
37186  test -z "$as_dir" && as_dir=.
37187    for ac_exec_ext in '' $ac_executable_extensions; do
37188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37189    ac_cv_prog_AR="lib"
37190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37191    break 2
37192  fi
37193done
37194  done
37195IFS=$as_save_IFS
37196
37197fi
37198fi
37199AR=$ac_cv_prog_AR
37200if test -n "$AR"; then
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37202$as_echo "$AR" >&6; }
37203else
37204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37205$as_echo "no" >&6; }
37206fi
37207
37208
37209  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37210
37211
37212  # Publish this variable in the help.
37213
37214
37215  if [ -z "${AR+x}" ]; then
37216    # The variable is not set by user, try to locate tool using the code snippet
37217    if test -n "$ac_tool_prefix"; then
37218  for ac_prog in ar gcc-ar
37219  do
37220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223$as_echo_n "checking for $ac_word... " >&6; }
37224if ${ac_cv_prog_AR+:} false; then :
37225  $as_echo_n "(cached) " >&6
37226else
37227  if test -n "$AR"; then
37228  ac_cv_prog_AR="$AR" # Let the user override the test.
37229else
37230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231for as_dir in $PATH
37232do
37233  IFS=$as_save_IFS
37234  test -z "$as_dir" && as_dir=.
37235    for ac_exec_ext in '' $ac_executable_extensions; do
37236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239    break 2
37240  fi
37241done
37242  done
37243IFS=$as_save_IFS
37244
37245fi
37246fi
37247AR=$ac_cv_prog_AR
37248if test -n "$AR"; then
37249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37250$as_echo "$AR" >&6; }
37251else
37252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37253$as_echo "no" >&6; }
37254fi
37255
37256
37257    test -n "$AR" && break
37258  done
37259fi
37260if test -z "$AR"; then
37261  ac_ct_AR=$AR
37262  for ac_prog in ar gcc-ar
37263do
37264  # Extract the first word of "$ac_prog", so it can be a program name with args.
37265set dummy $ac_prog; ac_word=$2
37266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37267$as_echo_n "checking for $ac_word... " >&6; }
37268if ${ac_cv_prog_ac_ct_AR+:} false; then :
37269  $as_echo_n "(cached) " >&6
37270else
37271  if test -n "$ac_ct_AR"; then
37272  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37273else
37274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37275for as_dir in $PATH
37276do
37277  IFS=$as_save_IFS
37278  test -z "$as_dir" && as_dir=.
37279    for ac_exec_ext in '' $ac_executable_extensions; do
37280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37281    ac_cv_prog_ac_ct_AR="$ac_prog"
37282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37283    break 2
37284  fi
37285done
37286  done
37287IFS=$as_save_IFS
37288
37289fi
37290fi
37291ac_ct_AR=$ac_cv_prog_ac_ct_AR
37292if test -n "$ac_ct_AR"; then
37293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37294$as_echo "$ac_ct_AR" >&6; }
37295else
37296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37297$as_echo "no" >&6; }
37298fi
37299
37300
37301  test -n "$ac_ct_AR" && break
37302done
37303
37304  if test "x$ac_ct_AR" = x; then
37305    AR=""
37306  else
37307    case $cross_compiling:$ac_tool_warned in
37308yes:)
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37311ac_tool_warned=yes ;;
37312esac
37313    AR=$ac_ct_AR
37314  fi
37315fi
37316
37317  else
37318    # The variable is set, but is it from the command line or the environment?
37319
37320    # Try to remove the string !AR! from our list.
37321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37323      # If it failed, the variable was not from the command line. Ignore it,
37324      # but warn the user (except for BASH, which is always set by the calling BASH).
37325      if test "xAR" != xBASH; then
37326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37327$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37328      fi
37329      # Try to locate tool using the code snippet
37330      if test -n "$ac_tool_prefix"; then
37331  for ac_prog in ar gcc-ar
37332  do
37333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37336$as_echo_n "checking for $ac_word... " >&6; }
37337if ${ac_cv_prog_AR+:} false; then :
37338  $as_echo_n "(cached) " >&6
37339else
37340  if test -n "$AR"; then
37341  ac_cv_prog_AR="$AR" # Let the user override the test.
37342else
37343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37344for as_dir in $PATH
37345do
37346  IFS=$as_save_IFS
37347  test -z "$as_dir" && as_dir=.
37348    for ac_exec_ext in '' $ac_executable_extensions; do
37349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37350    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37352    break 2
37353  fi
37354done
37355  done
37356IFS=$as_save_IFS
37357
37358fi
37359fi
37360AR=$ac_cv_prog_AR
37361if test -n "$AR"; then
37362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37363$as_echo "$AR" >&6; }
37364else
37365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37366$as_echo "no" >&6; }
37367fi
37368
37369
37370    test -n "$AR" && break
37371  done
37372fi
37373if test -z "$AR"; then
37374  ac_ct_AR=$AR
37375  for ac_prog in ar gcc-ar
37376do
37377  # Extract the first word of "$ac_prog", so it can be a program name with args.
37378set dummy $ac_prog; ac_word=$2
37379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37380$as_echo_n "checking for $ac_word... " >&6; }
37381if ${ac_cv_prog_ac_ct_AR+:} false; then :
37382  $as_echo_n "(cached) " >&6
37383else
37384  if test -n "$ac_ct_AR"; then
37385  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37386else
37387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37388for as_dir in $PATH
37389do
37390  IFS=$as_save_IFS
37391  test -z "$as_dir" && as_dir=.
37392    for ac_exec_ext in '' $ac_executable_extensions; do
37393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37394    ac_cv_prog_ac_ct_AR="$ac_prog"
37395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37396    break 2
37397  fi
37398done
37399  done
37400IFS=$as_save_IFS
37401
37402fi
37403fi
37404ac_ct_AR=$ac_cv_prog_ac_ct_AR
37405if test -n "$ac_ct_AR"; then
37406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37407$as_echo "$ac_ct_AR" >&6; }
37408else
37409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37410$as_echo "no" >&6; }
37411fi
37412
37413
37414  test -n "$ac_ct_AR" && break
37415done
37416
37417  if test "x$ac_ct_AR" = x; then
37418    AR=""
37419  else
37420    case $cross_compiling:$ac_tool_warned in
37421yes:)
37422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37424ac_tool_warned=yes ;;
37425esac
37426    AR=$ac_ct_AR
37427  fi
37428fi
37429
37430    else
37431      # If it succeeded, then it was overridden by the user. We will use it
37432      # for the tool.
37433
37434      # First remove it from the list of overridden variables, so we can test
37435      # for unknown variables in the end.
37436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37437
37438      # Check if we try to supply an empty value
37439      if test "x$AR" = x; then
37440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37441$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37443$as_echo_n "checking for AR... " >&6; }
37444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37445$as_echo "disabled" >&6; }
37446      else
37447        # Check if the provided tool contains a complete path.
37448        tool_specified="$AR"
37449        tool_basename="${tool_specified##*/}"
37450        if test "x$tool_basename" = "x$tool_specified"; then
37451          # A command without a complete path is provided, search $PATH.
37452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37453$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37454          # Extract the first word of "$tool_basename", so it can be a program name with args.
37455set dummy $tool_basename; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_path_AR+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  case $AR in
37462  [\\/]* | ?:[\\/]*)
37463  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37464  ;;
37465  *)
37466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37467for as_dir in $PATH
37468do
37469  IFS=$as_save_IFS
37470  test -z "$as_dir" && as_dir=.
37471    for ac_exec_ext in '' $ac_executable_extensions; do
37472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37473    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37475    break 2
37476  fi
37477done
37478  done
37479IFS=$as_save_IFS
37480
37481  ;;
37482esac
37483fi
37484AR=$ac_cv_path_AR
37485if test -n "$AR"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37487$as_echo "$AR" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494          if test "x$AR" = x; then
37495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37496          fi
37497        else
37498          # Otherwise we believe it is a complete path. Use it as it is.
37499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37500$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37502$as_echo_n "checking for AR... " >&6; }
37503          if test ! -x "$tool_specified"; then
37504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37505$as_echo "not found" >&6; }
37506            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37507          fi
37508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37509$as_echo "$tool_specified" >&6; }
37510        fi
37511      fi
37512    fi
37513
37514  fi
37515
37516
37517  else
37518
37519
37520  # Publish this variable in the help.
37521
37522
37523  if [ -z "${AR+x}" ]; then
37524    # The variable is not set by user, try to locate tool using the code snippet
37525    if test -n "$ac_tool_prefix"; then
37526  for ac_prog in ar
37527  do
37528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37531$as_echo_n "checking for $ac_word... " >&6; }
37532if ${ac_cv_prog_AR+:} false; then :
37533  $as_echo_n "(cached) " >&6
37534else
37535  if test -n "$AR"; then
37536  ac_cv_prog_AR="$AR" # Let the user override the test.
37537else
37538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37539for as_dir in $PATH
37540do
37541  IFS=$as_save_IFS
37542  test -z "$as_dir" && as_dir=.
37543    for ac_exec_ext in '' $ac_executable_extensions; do
37544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37545    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547    break 2
37548  fi
37549done
37550  done
37551IFS=$as_save_IFS
37552
37553fi
37554fi
37555AR=$ac_cv_prog_AR
37556if test -n "$AR"; then
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37558$as_echo "$AR" >&6; }
37559else
37560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561$as_echo "no" >&6; }
37562fi
37563
37564
37565    test -n "$AR" && break
37566  done
37567fi
37568if test -z "$AR"; then
37569  ac_ct_AR=$AR
37570  for ac_prog in ar
37571do
37572  # Extract the first word of "$ac_prog", so it can be a program name with args.
37573set dummy $ac_prog; ac_word=$2
37574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575$as_echo_n "checking for $ac_word... " >&6; }
37576if ${ac_cv_prog_ac_ct_AR+:} false; then :
37577  $as_echo_n "(cached) " >&6
37578else
37579  if test -n "$ac_ct_AR"; then
37580  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37581else
37582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37583for as_dir in $PATH
37584do
37585  IFS=$as_save_IFS
37586  test -z "$as_dir" && as_dir=.
37587    for ac_exec_ext in '' $ac_executable_extensions; do
37588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37589    ac_cv_prog_ac_ct_AR="$ac_prog"
37590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37591    break 2
37592  fi
37593done
37594  done
37595IFS=$as_save_IFS
37596
37597fi
37598fi
37599ac_ct_AR=$ac_cv_prog_ac_ct_AR
37600if test -n "$ac_ct_AR"; then
37601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37602$as_echo "$ac_ct_AR" >&6; }
37603else
37604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37605$as_echo "no" >&6; }
37606fi
37607
37608
37609  test -n "$ac_ct_AR" && break
37610done
37611
37612  if test "x$ac_ct_AR" = x; then
37613    AR=""
37614  else
37615    case $cross_compiling:$ac_tool_warned in
37616yes:)
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37619ac_tool_warned=yes ;;
37620esac
37621    AR=$ac_ct_AR
37622  fi
37623fi
37624
37625  else
37626    # The variable is set, but is it from the command line or the environment?
37627
37628    # Try to remove the string !AR! from our list.
37629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37631      # If it failed, the variable was not from the command line. Ignore it,
37632      # but warn the user (except for BASH, which is always set by the calling BASH).
37633      if test "xAR" != xBASH; then
37634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37635$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37636      fi
37637      # Try to locate tool using the code snippet
37638      if test -n "$ac_tool_prefix"; then
37639  for ac_prog in ar
37640  do
37641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37644$as_echo_n "checking for $ac_word... " >&6; }
37645if ${ac_cv_prog_AR+:} false; then :
37646  $as_echo_n "(cached) " >&6
37647else
37648  if test -n "$AR"; then
37649  ac_cv_prog_AR="$AR" # Let the user override the test.
37650else
37651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37652for as_dir in $PATH
37653do
37654  IFS=$as_save_IFS
37655  test -z "$as_dir" && as_dir=.
37656    for ac_exec_ext in '' $ac_executable_extensions; do
37657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37658    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37660    break 2
37661  fi
37662done
37663  done
37664IFS=$as_save_IFS
37665
37666fi
37667fi
37668AR=$ac_cv_prog_AR
37669if test -n "$AR"; then
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37671$as_echo "$AR" >&6; }
37672else
37673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674$as_echo "no" >&6; }
37675fi
37676
37677
37678    test -n "$AR" && break
37679  done
37680fi
37681if test -z "$AR"; then
37682  ac_ct_AR=$AR
37683  for ac_prog in ar
37684do
37685  # Extract the first word of "$ac_prog", so it can be a program name with args.
37686set dummy $ac_prog; ac_word=$2
37687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37688$as_echo_n "checking for $ac_word... " >&6; }
37689if ${ac_cv_prog_ac_ct_AR+:} false; then :
37690  $as_echo_n "(cached) " >&6
37691else
37692  if test -n "$ac_ct_AR"; then
37693  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37694else
37695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37696for as_dir in $PATH
37697do
37698  IFS=$as_save_IFS
37699  test -z "$as_dir" && as_dir=.
37700    for ac_exec_ext in '' $ac_executable_extensions; do
37701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37702    ac_cv_prog_ac_ct_AR="$ac_prog"
37703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37704    break 2
37705  fi
37706done
37707  done
37708IFS=$as_save_IFS
37709
37710fi
37711fi
37712ac_ct_AR=$ac_cv_prog_ac_ct_AR
37713if test -n "$ac_ct_AR"; then
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37715$as_echo "$ac_ct_AR" >&6; }
37716else
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718$as_echo "no" >&6; }
37719fi
37720
37721
37722  test -n "$ac_ct_AR" && break
37723done
37724
37725  if test "x$ac_ct_AR" = x; then
37726    AR=""
37727  else
37728    case $cross_compiling:$ac_tool_warned in
37729yes:)
37730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37732ac_tool_warned=yes ;;
37733esac
37734    AR=$ac_ct_AR
37735  fi
37736fi
37737
37738    else
37739      # If it succeeded, then it was overridden by the user. We will use it
37740      # for the tool.
37741
37742      # First remove it from the list of overridden variables, so we can test
37743      # for unknown variables in the end.
37744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37745
37746      # Check if we try to supply an empty value
37747      if test "x$AR" = x; then
37748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37749$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37751$as_echo_n "checking for AR... " >&6; }
37752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37753$as_echo "disabled" >&6; }
37754      else
37755        # Check if the provided tool contains a complete path.
37756        tool_specified="$AR"
37757        tool_basename="${tool_specified##*/}"
37758        if test "x$tool_basename" = "x$tool_specified"; then
37759          # A command without a complete path is provided, search $PATH.
37760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37761$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37762          # Extract the first word of "$tool_basename", so it can be a program name with args.
37763set dummy $tool_basename; ac_word=$2
37764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37765$as_echo_n "checking for $ac_word... " >&6; }
37766if ${ac_cv_path_AR+:} false; then :
37767  $as_echo_n "(cached) " >&6
37768else
37769  case $AR in
37770  [\\/]* | ?:[\\/]*)
37771  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37772  ;;
37773  *)
37774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37775for as_dir in $PATH
37776do
37777  IFS=$as_save_IFS
37778  test -z "$as_dir" && as_dir=.
37779    for ac_exec_ext in '' $ac_executable_extensions; do
37780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37781    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37783    break 2
37784  fi
37785done
37786  done
37787IFS=$as_save_IFS
37788
37789  ;;
37790esac
37791fi
37792AR=$ac_cv_path_AR
37793if test -n "$AR"; then
37794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37795$as_echo "$AR" >&6; }
37796else
37797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37798$as_echo "no" >&6; }
37799fi
37800
37801
37802          if test "x$AR" = x; then
37803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37804          fi
37805        else
37806          # Otherwise we believe it is a complete path. Use it as it is.
37807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37808$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37810$as_echo_n "checking for AR... " >&6; }
37811          if test ! -x "$tool_specified"; then
37812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37813$as_echo "not found" >&6; }
37814            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37815          fi
37816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37817$as_echo "$tool_specified" >&6; }
37818        fi
37819      fi
37820    fi
37821
37822  fi
37823
37824
37825  fi
37826
37827  # Only process if variable expands to non-empty
37828
37829  if test "x$AR" != x; then
37830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37831
37832  # First separate the path from the arguments. This will split at the first
37833  # space.
37834  complete="$AR"
37835  path="${complete%% *}"
37836  tmp="$complete EOL"
37837  arguments="${tmp#* }"
37838
37839  # Input might be given as Windows format, start by converting to
37840  # unix format.
37841  new_path=`$CYGPATH -u "$path"`
37842
37843  # Now try to locate executable using which
37844  new_path=`$WHICH "$new_path" 2> /dev/null`
37845  # bat and cmd files are not always considered executable in cygwin causing which
37846  # to not find them
37847  if test "x$new_path" = x \
37848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37850    new_path=`$CYGPATH -u "$path"`
37851  fi
37852  if test "x$new_path" = x; then
37853    # Oops. Which didn't find the executable.
37854    # The splitting of arguments from the executable at a space might have been incorrect,
37855    # since paths with space are more likely in Windows. Give it another try with the whole
37856    # argument.
37857    path="$complete"
37858    arguments="EOL"
37859    new_path=`$CYGPATH -u "$path"`
37860    new_path=`$WHICH "$new_path" 2> /dev/null`
37861    # bat and cmd files are not always considered executable in cygwin causing which
37862    # to not find them
37863    if test "x$new_path" = x \
37864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37866      new_path=`$CYGPATH -u "$path"`
37867    fi
37868    if test "x$new_path" = x; then
37869      # It's still not found. Now this is an unrecoverable error.
37870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37871$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37872      has_space=`$ECHO "$complete" | $GREP " "`
37873      if test "x$has_space" != x; then
37874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37876      fi
37877      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37878    fi
37879  fi
37880
37881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37884  # "foo.exe" is OK but "foo" is an error.
37885  #
37886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37887  # It is also a way to make sure we got the proper file name for the real test later on.
37888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37889  if test "x$test_shortpath" = x; then
37890    # Short path failed, file does not exist as specified.
37891    # Try adding .exe or .cmd
37892    if test -f "${new_path}.exe"; then
37893      input_to_shortpath="${new_path}.exe"
37894    elif test -f "${new_path}.cmd"; then
37895      input_to_shortpath="${new_path}.cmd"
37896    else
37897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37898$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37901      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37902    fi
37903  else
37904    input_to_shortpath="$new_path"
37905  fi
37906
37907  # Call helper function which possibly converts this using DOS-style short mode.
37908  # If so, the updated path is stored in $new_path.
37909  new_path="$input_to_shortpath"
37910
37911  input_path="$input_to_shortpath"
37912  # Check if we need to convert this using DOS-style short mode. If the path
37913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37914  # take no chances and rewrite it.
37915  # Note: m4 eats our [], so we need to use [ and ] instead.
37916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37917  if test "x$has_forbidden_chars" != x; then
37918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37922      # Going to short mode and back again did indeed matter. Since short mode is
37923      # case insensitive, let's make it lowercase to improve readability.
37924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37925      # Now convert it back to Unix-style (cygpath)
37926      input_path=`$CYGPATH -u "$shortmode_path"`
37927      new_path="$input_path"
37928    fi
37929  fi
37930
37931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37932  if test "x$test_cygdrive_prefix" = x; then
37933    # As a simple fix, exclude /usr/bin since it's not a real path.
37934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37936      # a path prefixed by /cygdrive for fixpath to work.
37937      new_path="$CYGWIN_ROOT_PATH$input_path"
37938    fi
37939  fi
37940
37941  # remove trailing .exe if any
37942  new_path="${new_path/%.exe/}"
37943
37944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37945
37946  # First separate the path from the arguments. This will split at the first
37947  # space.
37948  complete="$AR"
37949  path="${complete%% *}"
37950  tmp="$complete EOL"
37951  arguments="${tmp#* }"
37952
37953  # Input might be given as Windows format, start by converting to
37954  # unix format.
37955  new_path="$path"
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966
37967  # Now try to locate executable using which
37968  new_path=`$WHICH "$new_path" 2> /dev/null`
37969
37970  if test "x$new_path" = x; then
37971    # Oops. Which didn't find the executable.
37972    # The splitting of arguments from the executable at a space might have been incorrect,
37973    # since paths with space are more likely in Windows. Give it another try with the whole
37974    # argument.
37975    path="$complete"
37976    arguments="EOL"
37977    new_path="$path"
37978
37979  windows_path="$new_path"
37980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37981    unix_path=`$CYGPATH -u "$windows_path"`
37982    new_path="$unix_path"
37983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37985    new_path="$unix_path"
37986  fi
37987
37988
37989    new_path=`$WHICH "$new_path" 2> /dev/null`
37990    # bat and cmd files are not always considered executable in MSYS causing which
37991    # to not find them
37992    if test "x$new_path" = x \
37993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37995      new_path="$path"
37996
37997  windows_path="$new_path"
37998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37999    unix_path=`$CYGPATH -u "$windows_path"`
38000    new_path="$unix_path"
38001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38003    new_path="$unix_path"
38004  fi
38005
38006    fi
38007
38008    if test "x$new_path" = x; then
38009      # It's still not found. Now this is an unrecoverable error.
38010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38011$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38012      has_space=`$ECHO "$complete" | $GREP " "`
38013      if test "x$has_space" != x; then
38014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38016      fi
38017      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38018    fi
38019  fi
38020
38021  # Now new_path has a complete unix path to the binary
38022  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38023    # Keep paths in /bin as-is, but remove trailing .exe if any
38024    new_path="${new_path/%.exe/}"
38025    # Do not save /bin paths to all_fixpath_prefixes!
38026  else
38027    # Not in mixed or Windows style, start by that.
38028    new_path=`cmd //c echo $new_path`
38029
38030  input_path="$new_path"
38031  # Check if we need to convert this using DOS-style short mode. If the path
38032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38033  # take no chances and rewrite it.
38034  # Note: m4 eats our [], so we need to use [ and ] instead.
38035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38036  if test "x$has_forbidden_chars" != x; then
38037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38039  fi
38040
38041    # Output is in $new_path
38042
38043  windows_path="$new_path"
38044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38045    unix_path=`$CYGPATH -u "$windows_path"`
38046    new_path="$unix_path"
38047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38049    new_path="$unix_path"
38050  fi
38051
38052    # remove trailing .exe if any
38053    new_path="${new_path/%.exe/}"
38054
38055    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38056    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38057  fi
38058
38059    else
38060      # We're on a unix platform. Hooray! :)
38061      # First separate the path from the arguments. This will split at the first
38062      # space.
38063      complete="$AR"
38064      path="${complete%% *}"
38065      tmp="$complete EOL"
38066      arguments="${tmp#* }"
38067
38068      # Cannot rely on the command "which" here since it doesn't always work.
38069      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38070      if test -z "$is_absolute_path"; then
38071        # Path to executable is not absolute. Find it.
38072        IFS_save="$IFS"
38073        IFS=:
38074        for p in $PATH; do
38075          if test -f "$p/$path" && test -x "$p/$path"; then
38076            new_path="$p/$path"
38077            break
38078          fi
38079        done
38080        IFS="$IFS_save"
38081      else
38082        # This is an absolute path, we can use it without further modifications.
38083        new_path="$path"
38084      fi
38085
38086      if test "x$new_path" = x; then
38087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38088$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38089        has_space=`$ECHO "$complete" | $GREP " "`
38090        if test "x$has_space" != x; then
38091          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38092$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38093        fi
38094        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38095      fi
38096    fi
38097
38098    # Now join together the path and the arguments once again
38099    if test "x$arguments" != xEOL; then
38100      new_complete="$new_path ${arguments% *}"
38101    else
38102      new_complete="$new_path"
38103    fi
38104
38105    if test "x$complete" != "x$new_complete"; then
38106      AR="$new_complete"
38107      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38108$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38109    fi
38110  fi
38111
38112
38113
38114  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38115
38116
38117  # Publish this variable in the help.
38118
38119
38120  if [ -z "${LIPO+x}" ]; then
38121    # The variable is not set by user, try to locate tool using the code snippet
38122    for ac_prog in lipo
38123do
38124  # Extract the first word of "$ac_prog", so it can be a program name with args.
38125set dummy $ac_prog; ac_word=$2
38126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38127$as_echo_n "checking for $ac_word... " >&6; }
38128if ${ac_cv_path_LIPO+:} false; then :
38129  $as_echo_n "(cached) " >&6
38130else
38131  case $LIPO in
38132  [\\/]* | ?:[\\/]*)
38133  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38134  ;;
38135  *)
38136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38137for as_dir in $PATH
38138do
38139  IFS=$as_save_IFS
38140  test -z "$as_dir" && as_dir=.
38141    for ac_exec_ext in '' $ac_executable_extensions; do
38142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38143    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38145    break 2
38146  fi
38147done
38148  done
38149IFS=$as_save_IFS
38150
38151  ;;
38152esac
38153fi
38154LIPO=$ac_cv_path_LIPO
38155if test -n "$LIPO"; then
38156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38157$as_echo "$LIPO" >&6; }
38158else
38159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38160$as_echo "no" >&6; }
38161fi
38162
38163
38164  test -n "$LIPO" && break
38165done
38166
38167  else
38168    # The variable is set, but is it from the command line or the environment?
38169
38170    # Try to remove the string !LIPO! from our list.
38171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38173      # If it failed, the variable was not from the command line. Ignore it,
38174      # but warn the user (except for BASH, which is always set by the calling BASH).
38175      if test "xLIPO" != xBASH; then
38176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38177$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38178      fi
38179      # Try to locate tool using the code snippet
38180      for ac_prog in lipo
38181do
38182  # Extract the first word of "$ac_prog", so it can be a program name with args.
38183set dummy $ac_prog; ac_word=$2
38184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38185$as_echo_n "checking for $ac_word... " >&6; }
38186if ${ac_cv_path_LIPO+:} false; then :
38187  $as_echo_n "(cached) " >&6
38188else
38189  case $LIPO in
38190  [\\/]* | ?:[\\/]*)
38191  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38192  ;;
38193  *)
38194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38195for as_dir in $PATH
38196do
38197  IFS=$as_save_IFS
38198  test -z "$as_dir" && as_dir=.
38199    for ac_exec_ext in '' $ac_executable_extensions; do
38200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38201    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38203    break 2
38204  fi
38205done
38206  done
38207IFS=$as_save_IFS
38208
38209  ;;
38210esac
38211fi
38212LIPO=$ac_cv_path_LIPO
38213if test -n "$LIPO"; then
38214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38215$as_echo "$LIPO" >&6; }
38216else
38217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38218$as_echo "no" >&6; }
38219fi
38220
38221
38222  test -n "$LIPO" && break
38223done
38224
38225    else
38226      # If it succeeded, then it was overridden by the user. We will use it
38227      # for the tool.
38228
38229      # First remove it from the list of overridden variables, so we can test
38230      # for unknown variables in the end.
38231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38232
38233      # Check if we try to supply an empty value
38234      if test "x$LIPO" = x; then
38235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38236$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38238$as_echo_n "checking for LIPO... " >&6; }
38239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38240$as_echo "disabled" >&6; }
38241      else
38242        # Check if the provided tool contains a complete path.
38243        tool_specified="$LIPO"
38244        tool_basename="${tool_specified##*/}"
38245        if test "x$tool_basename" = "x$tool_specified"; then
38246          # A command without a complete path is provided, search $PATH.
38247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38248$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38249          # Extract the first word of "$tool_basename", so it can be a program name with args.
38250set dummy $tool_basename; ac_word=$2
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38252$as_echo_n "checking for $ac_word... " >&6; }
38253if ${ac_cv_path_LIPO+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  case $LIPO in
38257  [\\/]* | ?:[\\/]*)
38258  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38259  ;;
38260  *)
38261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38262for as_dir in $PATH
38263do
38264  IFS=$as_save_IFS
38265  test -z "$as_dir" && as_dir=.
38266    for ac_exec_ext in '' $ac_executable_extensions; do
38267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38268    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38270    break 2
38271  fi
38272done
38273  done
38274IFS=$as_save_IFS
38275
38276  ;;
38277esac
38278fi
38279LIPO=$ac_cv_path_LIPO
38280if test -n "$LIPO"; then
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38282$as_echo "$LIPO" >&6; }
38283else
38284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38285$as_echo "no" >&6; }
38286fi
38287
38288
38289          if test "x$LIPO" = x; then
38290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38291          fi
38292        else
38293          # Otherwise we believe it is a complete path. Use it as it is.
38294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38295$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38297$as_echo_n "checking for LIPO... " >&6; }
38298          if test ! -x "$tool_specified"; then
38299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38300$as_echo "not found" >&6; }
38301            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38302          fi
38303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38304$as_echo "$tool_specified" >&6; }
38305        fi
38306      fi
38307    fi
38308
38309  fi
38310
38311
38312
38313  # Only process if variable expands to non-empty
38314
38315  if test "x$LIPO" != x; then
38316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38317
38318  # First separate the path from the arguments. This will split at the first
38319  # space.
38320  complete="$LIPO"
38321  path="${complete%% *}"
38322  tmp="$complete EOL"
38323  arguments="${tmp#* }"
38324
38325  # Input might be given as Windows format, start by converting to
38326  # unix format.
38327  new_path=`$CYGPATH -u "$path"`
38328
38329  # Now try to locate executable using which
38330  new_path=`$WHICH "$new_path" 2> /dev/null`
38331  # bat and cmd files are not always considered executable in cygwin causing which
38332  # to not find them
38333  if test "x$new_path" = x \
38334      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38335      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38336    new_path=`$CYGPATH -u "$path"`
38337  fi
38338  if test "x$new_path" = x; then
38339    # Oops. Which didn't find the executable.
38340    # The splitting of arguments from the executable at a space might have been incorrect,
38341    # since paths with space are more likely in Windows. Give it another try with the whole
38342    # argument.
38343    path="$complete"
38344    arguments="EOL"
38345    new_path=`$CYGPATH -u "$path"`
38346    new_path=`$WHICH "$new_path" 2> /dev/null`
38347    # bat and cmd files are not always considered executable in cygwin causing which
38348    # to not find them
38349    if test "x$new_path" = x \
38350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38352      new_path=`$CYGPATH -u "$path"`
38353    fi
38354    if test "x$new_path" = x; then
38355      # It's still not found. Now this is an unrecoverable error.
38356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38357$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38358      has_space=`$ECHO "$complete" | $GREP " "`
38359      if test "x$has_space" != x; then
38360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38362      fi
38363      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38364    fi
38365  fi
38366
38367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38370  # "foo.exe" is OK but "foo" is an error.
38371  #
38372  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38373  # It is also a way to make sure we got the proper file name for the real test later on.
38374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38375  if test "x$test_shortpath" = x; then
38376    # Short path failed, file does not exist as specified.
38377    # Try adding .exe or .cmd
38378    if test -f "${new_path}.exe"; then
38379      input_to_shortpath="${new_path}.exe"
38380    elif test -f "${new_path}.cmd"; then
38381      input_to_shortpath="${new_path}.cmd"
38382    else
38383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38384$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38387      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38388    fi
38389  else
38390    input_to_shortpath="$new_path"
38391  fi
38392
38393  # Call helper function which possibly converts this using DOS-style short mode.
38394  # If so, the updated path is stored in $new_path.
38395  new_path="$input_to_shortpath"
38396
38397  input_path="$input_to_shortpath"
38398  # Check if we need to convert this using DOS-style short mode. If the path
38399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38400  # take no chances and rewrite it.
38401  # Note: m4 eats our [], so we need to use [ and ] instead.
38402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38403  if test "x$has_forbidden_chars" != x; then
38404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38408      # Going to short mode and back again did indeed matter. Since short mode is
38409      # case insensitive, let's make it lowercase to improve readability.
38410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38411      # Now convert it back to Unix-style (cygpath)
38412      input_path=`$CYGPATH -u "$shortmode_path"`
38413      new_path="$input_path"
38414    fi
38415  fi
38416
38417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38418  if test "x$test_cygdrive_prefix" = x; then
38419    # As a simple fix, exclude /usr/bin since it's not a real path.
38420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38422      # a path prefixed by /cygdrive for fixpath to work.
38423      new_path="$CYGWIN_ROOT_PATH$input_path"
38424    fi
38425  fi
38426
38427  # remove trailing .exe if any
38428  new_path="${new_path/%.exe/}"
38429
38430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38431
38432  # First separate the path from the arguments. This will split at the first
38433  # space.
38434  complete="$LIPO"
38435  path="${complete%% *}"
38436  tmp="$complete EOL"
38437  arguments="${tmp#* }"
38438
38439  # Input might be given as Windows format, start by converting to
38440  # unix format.
38441  new_path="$path"
38442
38443  windows_path="$new_path"
38444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38445    unix_path=`$CYGPATH -u "$windows_path"`
38446    new_path="$unix_path"
38447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38449    new_path="$unix_path"
38450  fi
38451
38452
38453  # Now try to locate executable using which
38454  new_path=`$WHICH "$new_path" 2> /dev/null`
38455
38456  if test "x$new_path" = x; then
38457    # Oops. Which didn't find the executable.
38458    # The splitting of arguments from the executable at a space might have been incorrect,
38459    # since paths with space are more likely in Windows. Give it another try with the whole
38460    # argument.
38461    path="$complete"
38462    arguments="EOL"
38463    new_path="$path"
38464
38465  windows_path="$new_path"
38466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38467    unix_path=`$CYGPATH -u "$windows_path"`
38468    new_path="$unix_path"
38469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38471    new_path="$unix_path"
38472  fi
38473
38474
38475    new_path=`$WHICH "$new_path" 2> /dev/null`
38476    # bat and cmd files are not always considered executable in MSYS causing which
38477    # to not find them
38478    if test "x$new_path" = x \
38479        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38480        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38481      new_path="$path"
38482
38483  windows_path="$new_path"
38484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38485    unix_path=`$CYGPATH -u "$windows_path"`
38486    new_path="$unix_path"
38487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38489    new_path="$unix_path"
38490  fi
38491
38492    fi
38493
38494    if test "x$new_path" = x; then
38495      # It's still not found. Now this is an unrecoverable error.
38496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38497$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38498      has_space=`$ECHO "$complete" | $GREP " "`
38499      if test "x$has_space" != x; then
38500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38502      fi
38503      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38504    fi
38505  fi
38506
38507  # Now new_path has a complete unix path to the binary
38508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38509    # Keep paths in /bin as-is, but remove trailing .exe if any
38510    new_path="${new_path/%.exe/}"
38511    # Do not save /bin paths to all_fixpath_prefixes!
38512  else
38513    # Not in mixed or Windows style, start by that.
38514    new_path=`cmd //c echo $new_path`
38515
38516  input_path="$new_path"
38517  # Check if we need to convert this using DOS-style short mode. If the path
38518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38519  # take no chances and rewrite it.
38520  # Note: m4 eats our [], so we need to use [ and ] instead.
38521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38522  if test "x$has_forbidden_chars" != x; then
38523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38525  fi
38526
38527    # Output is in $new_path
38528
38529  windows_path="$new_path"
38530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38531    unix_path=`$CYGPATH -u "$windows_path"`
38532    new_path="$unix_path"
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38535    new_path="$unix_path"
38536  fi
38537
38538    # remove trailing .exe if any
38539    new_path="${new_path/%.exe/}"
38540
38541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38543  fi
38544
38545    else
38546      # We're on a unix platform. Hooray! :)
38547      # First separate the path from the arguments. This will split at the first
38548      # space.
38549      complete="$LIPO"
38550      path="${complete%% *}"
38551      tmp="$complete EOL"
38552      arguments="${tmp#* }"
38553
38554      # Cannot rely on the command "which" here since it doesn't always work.
38555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38556      if test -z "$is_absolute_path"; then
38557        # Path to executable is not absolute. Find it.
38558        IFS_save="$IFS"
38559        IFS=:
38560        for p in $PATH; do
38561          if test -f "$p/$path" && test -x "$p/$path"; then
38562            new_path="$p/$path"
38563            break
38564          fi
38565        done
38566        IFS="$IFS_save"
38567      else
38568        # This is an absolute path, we can use it without further modifications.
38569        new_path="$path"
38570      fi
38571
38572      if test "x$new_path" = x; then
38573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38574$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38575        has_space=`$ECHO "$complete" | $GREP " "`
38576        if test "x$has_space" != x; then
38577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38579        fi
38580        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38581      fi
38582    fi
38583
38584    # Now join together the path and the arguments once again
38585    if test "x$arguments" != xEOL; then
38586      new_complete="$new_path ${arguments% *}"
38587    else
38588      new_complete="$new_path"
38589    fi
38590
38591    if test "x$complete" != "x$new_complete"; then
38592      LIPO="$new_complete"
38593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38594$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38595    fi
38596  fi
38597
38598  fi
38599
38600  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38601    # Extract the first word of "mt", so it can be a program name with args.
38602set dummy mt; ac_word=$2
38603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38604$as_echo_n "checking for $ac_word... " >&6; }
38605if ${ac_cv_prog_MT+:} false; then :
38606  $as_echo_n "(cached) " >&6
38607else
38608  if test -n "$MT"; then
38609  ac_cv_prog_MT="$MT" # Let the user override the test.
38610else
38611  ac_prog_rejected=no
38612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38613for as_dir in $PATH
38614do
38615  IFS=$as_save_IFS
38616  test -z "$as_dir" && as_dir=.
38617    for ac_exec_ext in '' $ac_executable_extensions; do
38618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38619    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38620       ac_prog_rejected=yes
38621       continue
38622     fi
38623    ac_cv_prog_MT="mt"
38624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38625    break 2
38626  fi
38627done
38628  done
38629IFS=$as_save_IFS
38630
38631if test $ac_prog_rejected = yes; then
38632  # We found a bogon in the path, so make sure we never use it.
38633  set dummy $ac_cv_prog_MT
38634  shift
38635  if test $# != 0; then
38636    # We chose a different compiler from the bogus one.
38637    # However, it has the same basename, so the bogon will be chosen
38638    # first if we set MT to just the basename; use the full file name.
38639    shift
38640    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38641  fi
38642fi
38643fi
38644fi
38645MT=$ac_cv_prog_MT
38646if test -n "$MT"; then
38647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38648$as_echo "$MT" >&6; }
38649else
38650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38651$as_echo "no" >&6; }
38652fi
38653
38654
38655
38656  # Only process if variable expands to non-empty
38657
38658  if test "x$MT" != x; then
38659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38660
38661  # First separate the path from the arguments. This will split at the first
38662  # space.
38663  complete="$MT"
38664  path="${complete%% *}"
38665  tmp="$complete EOL"
38666  arguments="${tmp#* }"
38667
38668  # Input might be given as Windows format, start by converting to
38669  # unix format.
38670  new_path=`$CYGPATH -u "$path"`
38671
38672  # Now try to locate executable using which
38673  new_path=`$WHICH "$new_path" 2> /dev/null`
38674  # bat and cmd files are not always considered executable in cygwin causing which
38675  # to not find them
38676  if test "x$new_path" = x \
38677      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38678      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38679    new_path=`$CYGPATH -u "$path"`
38680  fi
38681  if test "x$new_path" = x; then
38682    # Oops. Which didn't find the executable.
38683    # The splitting of arguments from the executable at a space might have been incorrect,
38684    # since paths with space are more likely in Windows. Give it another try with the whole
38685    # argument.
38686    path="$complete"
38687    arguments="EOL"
38688    new_path=`$CYGPATH -u "$path"`
38689    new_path=`$WHICH "$new_path" 2> /dev/null`
38690    # bat and cmd files are not always considered executable in cygwin causing which
38691    # to not find them
38692    if test "x$new_path" = x \
38693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38695      new_path=`$CYGPATH -u "$path"`
38696    fi
38697    if test "x$new_path" = x; then
38698      # It's still not found. Now this is an unrecoverable error.
38699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38700$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38701      has_space=`$ECHO "$complete" | $GREP " "`
38702      if test "x$has_space" != x; then
38703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38705      fi
38706      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38707    fi
38708  fi
38709
38710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38713  # "foo.exe" is OK but "foo" is an error.
38714  #
38715  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38716  # It is also a way to make sure we got the proper file name for the real test later on.
38717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38718  if test "x$test_shortpath" = x; then
38719    # Short path failed, file does not exist as specified.
38720    # Try adding .exe or .cmd
38721    if test -f "${new_path}.exe"; then
38722      input_to_shortpath="${new_path}.exe"
38723    elif test -f "${new_path}.cmd"; then
38724      input_to_shortpath="${new_path}.cmd"
38725    else
38726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38727$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38730      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38731    fi
38732  else
38733    input_to_shortpath="$new_path"
38734  fi
38735
38736  # Call helper function which possibly converts this using DOS-style short mode.
38737  # If so, the updated path is stored in $new_path.
38738  new_path="$input_to_shortpath"
38739
38740  input_path="$input_to_shortpath"
38741  # Check if we need to convert this using DOS-style short mode. If the path
38742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38743  # take no chances and rewrite it.
38744  # Note: m4 eats our [], so we need to use [ and ] instead.
38745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38746  if test "x$has_forbidden_chars" != x; then
38747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38751      # Going to short mode and back again did indeed matter. Since short mode is
38752      # case insensitive, let's make it lowercase to improve readability.
38753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38754      # Now convert it back to Unix-style (cygpath)
38755      input_path=`$CYGPATH -u "$shortmode_path"`
38756      new_path="$input_path"
38757    fi
38758  fi
38759
38760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38761  if test "x$test_cygdrive_prefix" = x; then
38762    # As a simple fix, exclude /usr/bin since it's not a real path.
38763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38765      # a path prefixed by /cygdrive for fixpath to work.
38766      new_path="$CYGWIN_ROOT_PATH$input_path"
38767    fi
38768  fi
38769
38770  # remove trailing .exe if any
38771  new_path="${new_path/%.exe/}"
38772
38773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38774
38775  # First separate the path from the arguments. This will split at the first
38776  # space.
38777  complete="$MT"
38778  path="${complete%% *}"
38779  tmp="$complete EOL"
38780  arguments="${tmp#* }"
38781
38782  # Input might be given as Windows format, start by converting to
38783  # unix format.
38784  new_path="$path"
38785
38786  windows_path="$new_path"
38787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38788    unix_path=`$CYGPATH -u "$windows_path"`
38789    new_path="$unix_path"
38790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38792    new_path="$unix_path"
38793  fi
38794
38795
38796  # Now try to locate executable using which
38797  new_path=`$WHICH "$new_path" 2> /dev/null`
38798
38799  if test "x$new_path" = x; then
38800    # Oops. Which didn't find the executable.
38801    # The splitting of arguments from the executable at a space might have been incorrect,
38802    # since paths with space are more likely in Windows. Give it another try with the whole
38803    # argument.
38804    path="$complete"
38805    arguments="EOL"
38806    new_path="$path"
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817
38818    new_path=`$WHICH "$new_path" 2> /dev/null`
38819    # bat and cmd files are not always considered executable in MSYS causing which
38820    # to not find them
38821    if test "x$new_path" = x \
38822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38824      new_path="$path"
38825
38826  windows_path="$new_path"
38827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38828    unix_path=`$CYGPATH -u "$windows_path"`
38829    new_path="$unix_path"
38830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38832    new_path="$unix_path"
38833  fi
38834
38835    fi
38836
38837    if test "x$new_path" = x; then
38838      # It's still not found. Now this is an unrecoverable error.
38839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38840$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38841      has_space=`$ECHO "$complete" | $GREP " "`
38842      if test "x$has_space" != x; then
38843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38845      fi
38846      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38847    fi
38848  fi
38849
38850  # Now new_path has a complete unix path to the binary
38851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38852    # Keep paths in /bin as-is, but remove trailing .exe if any
38853    new_path="${new_path/%.exe/}"
38854    # Do not save /bin paths to all_fixpath_prefixes!
38855  else
38856    # Not in mixed or Windows style, start by that.
38857    new_path=`cmd //c echo $new_path`
38858
38859  input_path="$new_path"
38860  # Check if we need to convert this using DOS-style short mode. If the path
38861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38862  # take no chances and rewrite it.
38863  # Note: m4 eats our [], so we need to use [ and ] instead.
38864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38865  if test "x$has_forbidden_chars" != x; then
38866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38868  fi
38869
38870    # Output is in $new_path
38871
38872  windows_path="$new_path"
38873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38874    unix_path=`$CYGPATH -u "$windows_path"`
38875    new_path="$unix_path"
38876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38878    new_path="$unix_path"
38879  fi
38880
38881    # remove trailing .exe if any
38882    new_path="${new_path/%.exe/}"
38883
38884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38886  fi
38887
38888    else
38889      # We're on a unix platform. Hooray! :)
38890      # First separate the path from the arguments. This will split at the first
38891      # space.
38892      complete="$MT"
38893      path="${complete%% *}"
38894      tmp="$complete EOL"
38895      arguments="${tmp#* }"
38896
38897      # Cannot rely on the command "which" here since it doesn't always work.
38898      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38899      if test -z "$is_absolute_path"; then
38900        # Path to executable is not absolute. Find it.
38901        IFS_save="$IFS"
38902        IFS=:
38903        for p in $PATH; do
38904          if test -f "$p/$path" && test -x "$p/$path"; then
38905            new_path="$p/$path"
38906            break
38907          fi
38908        done
38909        IFS="$IFS_save"
38910      else
38911        # This is an absolute path, we can use it without further modifications.
38912        new_path="$path"
38913      fi
38914
38915      if test "x$new_path" = x; then
38916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38917$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38918        has_space=`$ECHO "$complete" | $GREP " "`
38919        if test "x$has_space" != x; then
38920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38922        fi
38923        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38924      fi
38925    fi
38926
38927    # Now join together the path and the arguments once again
38928    if test "x$arguments" != xEOL; then
38929      new_complete="$new_path ${arguments% *}"
38930    else
38931      new_complete="$new_path"
38932    fi
38933
38934    if test "x$complete" != "x$new_complete"; then
38935      MT="$new_complete"
38936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38937$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38938    fi
38939  fi
38940
38941    # Setup the resource compiler (RC)
38942    # Extract the first word of "rc", so it can be a program name with args.
38943set dummy rc; ac_word=$2
38944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38945$as_echo_n "checking for $ac_word... " >&6; }
38946if ${ac_cv_prog_RC+:} false; then :
38947  $as_echo_n "(cached) " >&6
38948else
38949  if test -n "$RC"; then
38950  ac_cv_prog_RC="$RC" # Let the user override the test.
38951else
38952  ac_prog_rejected=no
38953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38954for as_dir in $PATH
38955do
38956  IFS=$as_save_IFS
38957  test -z "$as_dir" && as_dir=.
38958    for ac_exec_ext in '' $ac_executable_extensions; do
38959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38960    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38961       ac_prog_rejected=yes
38962       continue
38963     fi
38964    ac_cv_prog_RC="rc"
38965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38966    break 2
38967  fi
38968done
38969  done
38970IFS=$as_save_IFS
38971
38972if test $ac_prog_rejected = yes; then
38973  # We found a bogon in the path, so make sure we never use it.
38974  set dummy $ac_cv_prog_RC
38975  shift
38976  if test $# != 0; then
38977    # We chose a different compiler from the bogus one.
38978    # However, it has the same basename, so the bogon will be chosen
38979    # first if we set RC to just the basename; use the full file name.
38980    shift
38981    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38982  fi
38983fi
38984fi
38985fi
38986RC=$ac_cv_prog_RC
38987if test -n "$RC"; then
38988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38989$as_echo "$RC" >&6; }
38990else
38991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38992$as_echo "no" >&6; }
38993fi
38994
38995
38996
38997  # Only process if variable expands to non-empty
38998
38999  if test "x$RC" != x; then
39000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39001
39002  # First separate the path from the arguments. This will split at the first
39003  # space.
39004  complete="$RC"
39005  path="${complete%% *}"
39006  tmp="$complete EOL"
39007  arguments="${tmp#* }"
39008
39009  # Input might be given as Windows format, start by converting to
39010  # unix format.
39011  new_path=`$CYGPATH -u "$path"`
39012
39013  # Now try to locate executable using which
39014  new_path=`$WHICH "$new_path" 2> /dev/null`
39015  # bat and cmd files are not always considered executable in cygwin causing which
39016  # to not find them
39017  if test "x$new_path" = x \
39018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39020    new_path=`$CYGPATH -u "$path"`
39021  fi
39022  if test "x$new_path" = x; then
39023    # Oops. Which didn't find the executable.
39024    # The splitting of arguments from the executable at a space might have been incorrect,
39025    # since paths with space are more likely in Windows. Give it another try with the whole
39026    # argument.
39027    path="$complete"
39028    arguments="EOL"
39029    new_path=`$CYGPATH -u "$path"`
39030    new_path=`$WHICH "$new_path" 2> /dev/null`
39031    # bat and cmd files are not always considered executable in cygwin causing which
39032    # to not find them
39033    if test "x$new_path" = x \
39034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39036      new_path=`$CYGPATH -u "$path"`
39037    fi
39038    if test "x$new_path" = x; then
39039      # It's still not found. Now this is an unrecoverable error.
39040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39041$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39042      has_space=`$ECHO "$complete" | $GREP " "`
39043      if test "x$has_space" != x; then
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39046      fi
39047      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39048    fi
39049  fi
39050
39051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39054  # "foo.exe" is OK but "foo" is an error.
39055  #
39056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39057  # It is also a way to make sure we got the proper file name for the real test later on.
39058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39059  if test "x$test_shortpath" = x; then
39060    # Short path failed, file does not exist as specified.
39061    # Try adding .exe or .cmd
39062    if test -f "${new_path}.exe"; then
39063      input_to_shortpath="${new_path}.exe"
39064    elif test -f "${new_path}.cmd"; then
39065      input_to_shortpath="${new_path}.cmd"
39066    else
39067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39068$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39071      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39072    fi
39073  else
39074    input_to_shortpath="$new_path"
39075  fi
39076
39077  # Call helper function which possibly converts this using DOS-style short mode.
39078  # If so, the updated path is stored in $new_path.
39079  new_path="$input_to_shortpath"
39080
39081  input_path="$input_to_shortpath"
39082  # Check if we need to convert this using DOS-style short mode. If the path
39083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39084  # take no chances and rewrite it.
39085  # Note: m4 eats our [], so we need to use [ and ] instead.
39086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39087  if test "x$has_forbidden_chars" != x; then
39088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39092      # Going to short mode and back again did indeed matter. Since short mode is
39093      # case insensitive, let's make it lowercase to improve readability.
39094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39095      # Now convert it back to Unix-style (cygpath)
39096      input_path=`$CYGPATH -u "$shortmode_path"`
39097      new_path="$input_path"
39098    fi
39099  fi
39100
39101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39102  if test "x$test_cygdrive_prefix" = x; then
39103    # As a simple fix, exclude /usr/bin since it's not a real path.
39104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39106      # a path prefixed by /cygdrive for fixpath to work.
39107      new_path="$CYGWIN_ROOT_PATH$input_path"
39108    fi
39109  fi
39110
39111  # remove trailing .exe if any
39112  new_path="${new_path/%.exe/}"
39113
39114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39115
39116  # First separate the path from the arguments. This will split at the first
39117  # space.
39118  complete="$RC"
39119  path="${complete%% *}"
39120  tmp="$complete EOL"
39121  arguments="${tmp#* }"
39122
39123  # Input might be given as Windows format, start by converting to
39124  # unix format.
39125  new_path="$path"
39126
39127  windows_path="$new_path"
39128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39129    unix_path=`$CYGPATH -u "$windows_path"`
39130    new_path="$unix_path"
39131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39133    new_path="$unix_path"
39134  fi
39135
39136
39137  # Now try to locate executable using which
39138  new_path=`$WHICH "$new_path" 2> /dev/null`
39139
39140  if test "x$new_path" = x; then
39141    # Oops. Which didn't find the executable.
39142    # The splitting of arguments from the executable at a space might have been incorrect,
39143    # since paths with space are more likely in Windows. Give it another try with the whole
39144    # argument.
39145    path="$complete"
39146    arguments="EOL"
39147    new_path="$path"
39148
39149  windows_path="$new_path"
39150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39151    unix_path=`$CYGPATH -u "$windows_path"`
39152    new_path="$unix_path"
39153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39155    new_path="$unix_path"
39156  fi
39157
39158
39159    new_path=`$WHICH "$new_path" 2> /dev/null`
39160    # bat and cmd files are not always considered executable in MSYS causing which
39161    # to not find them
39162    if test "x$new_path" = x \
39163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39165      new_path="$path"
39166
39167  windows_path="$new_path"
39168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39169    unix_path=`$CYGPATH -u "$windows_path"`
39170    new_path="$unix_path"
39171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39173    new_path="$unix_path"
39174  fi
39175
39176    fi
39177
39178    if test "x$new_path" = x; then
39179      # It's still not found. Now this is an unrecoverable error.
39180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39181$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39182      has_space=`$ECHO "$complete" | $GREP " "`
39183      if test "x$has_space" != x; then
39184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39186      fi
39187      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39188    fi
39189  fi
39190
39191  # Now new_path has a complete unix path to the binary
39192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39193    # Keep paths in /bin as-is, but remove trailing .exe if any
39194    new_path="${new_path/%.exe/}"
39195    # Do not save /bin paths to all_fixpath_prefixes!
39196  else
39197    # Not in mixed or Windows style, start by that.
39198    new_path=`cmd //c echo $new_path`
39199
39200  input_path="$new_path"
39201  # Check if we need to convert this using DOS-style short mode. If the path
39202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39203  # take no chances and rewrite it.
39204  # Note: m4 eats our [], so we need to use [ and ] instead.
39205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39206  if test "x$has_forbidden_chars" != x; then
39207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39209  fi
39210
39211    # Output is in $new_path
39212
39213  windows_path="$new_path"
39214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39215    unix_path=`$CYGPATH -u "$windows_path"`
39216    new_path="$unix_path"
39217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39219    new_path="$unix_path"
39220  fi
39221
39222    # remove trailing .exe if any
39223    new_path="${new_path/%.exe/}"
39224
39225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39227  fi
39228
39229    else
39230      # We're on a unix platform. Hooray! :)
39231      # First separate the path from the arguments. This will split at the first
39232      # space.
39233      complete="$RC"
39234      path="${complete%% *}"
39235      tmp="$complete EOL"
39236      arguments="${tmp#* }"
39237
39238      # Cannot rely on the command "which" here since it doesn't always work.
39239      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39240      if test -z "$is_absolute_path"; then
39241        # Path to executable is not absolute. Find it.
39242        IFS_save="$IFS"
39243        IFS=:
39244        for p in $PATH; do
39245          if test -f "$p/$path" && test -x "$p/$path"; then
39246            new_path="$p/$path"
39247            break
39248          fi
39249        done
39250        IFS="$IFS_save"
39251      else
39252        # This is an absolute path, we can use it without further modifications.
39253        new_path="$path"
39254      fi
39255
39256      if test "x$new_path" = x; then
39257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39258$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39259        has_space=`$ECHO "$complete" | $GREP " "`
39260        if test "x$has_space" != x; then
39261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39263        fi
39264        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39265      fi
39266    fi
39267
39268    # Now join together the path and the arguments once again
39269    if test "x$arguments" != xEOL; then
39270      new_complete="$new_path ${arguments% *}"
39271    else
39272      new_complete="$new_path"
39273    fi
39274
39275    if test "x$complete" != "x$new_complete"; then
39276      RC="$new_complete"
39277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39278$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39279    fi
39280  fi
39281
39282    # Extract the first word of "dumpbin", so it can be a program name with args.
39283set dummy dumpbin; ac_word=$2
39284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39285$as_echo_n "checking for $ac_word... " >&6; }
39286if ${ac_cv_prog_DUMPBIN+:} false; then :
39287  $as_echo_n "(cached) " >&6
39288else
39289  if test -n "$DUMPBIN"; then
39290  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39291else
39292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39293for as_dir in $PATH
39294do
39295  IFS=$as_save_IFS
39296  test -z "$as_dir" && as_dir=.
39297    for ac_exec_ext in '' $ac_executable_extensions; do
39298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39299    ac_cv_prog_DUMPBIN="dumpbin"
39300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39301    break 2
39302  fi
39303done
39304  done
39305IFS=$as_save_IFS
39306
39307fi
39308fi
39309DUMPBIN=$ac_cv_prog_DUMPBIN
39310if test -n "$DUMPBIN"; then
39311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39312$as_echo "$DUMPBIN" >&6; }
39313else
39314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39315$as_echo "no" >&6; }
39316fi
39317
39318
39319
39320  # Only process if variable expands to non-empty
39321
39322  if test "x$DUMPBIN" != x; then
39323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39324
39325  # First separate the path from the arguments. This will split at the first
39326  # space.
39327  complete="$DUMPBIN"
39328  path="${complete%% *}"
39329  tmp="$complete EOL"
39330  arguments="${tmp#* }"
39331
39332  # Input might be given as Windows format, start by converting to
39333  # unix format.
39334  new_path=`$CYGPATH -u "$path"`
39335
39336  # Now try to locate executable using which
39337  new_path=`$WHICH "$new_path" 2> /dev/null`
39338  # bat and cmd files are not always considered executable in cygwin causing which
39339  # to not find them
39340  if test "x$new_path" = x \
39341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39343    new_path=`$CYGPATH -u "$path"`
39344  fi
39345  if test "x$new_path" = x; then
39346    # Oops. Which didn't find the executable.
39347    # The splitting of arguments from the executable at a space might have been incorrect,
39348    # since paths with space are more likely in Windows. Give it another try with the whole
39349    # argument.
39350    path="$complete"
39351    arguments="EOL"
39352    new_path=`$CYGPATH -u "$path"`
39353    new_path=`$WHICH "$new_path" 2> /dev/null`
39354    # bat and cmd files are not always considered executable in cygwin causing which
39355    # to not find them
39356    if test "x$new_path" = x \
39357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39359      new_path=`$CYGPATH -u "$path"`
39360    fi
39361    if test "x$new_path" = x; then
39362      # It's still not found. Now this is an unrecoverable error.
39363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39364$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39365      has_space=`$ECHO "$complete" | $GREP " "`
39366      if test "x$has_space" != x; then
39367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39369      fi
39370      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39371    fi
39372  fi
39373
39374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39377  # "foo.exe" is OK but "foo" is an error.
39378  #
39379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39380  # It is also a way to make sure we got the proper file name for the real test later on.
39381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39382  if test "x$test_shortpath" = x; then
39383    # Short path failed, file does not exist as specified.
39384    # Try adding .exe or .cmd
39385    if test -f "${new_path}.exe"; then
39386      input_to_shortpath="${new_path}.exe"
39387    elif test -f "${new_path}.cmd"; then
39388      input_to_shortpath="${new_path}.cmd"
39389    else
39390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39391$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39394      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39395    fi
39396  else
39397    input_to_shortpath="$new_path"
39398  fi
39399
39400  # Call helper function which possibly converts this using DOS-style short mode.
39401  # If so, the updated path is stored in $new_path.
39402  new_path="$input_to_shortpath"
39403
39404  input_path="$input_to_shortpath"
39405  # Check if we need to convert this using DOS-style short mode. If the path
39406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39407  # take no chances and rewrite it.
39408  # Note: m4 eats our [], so we need to use [ and ] instead.
39409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39410  if test "x$has_forbidden_chars" != x; then
39411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39415      # Going to short mode and back again did indeed matter. Since short mode is
39416      # case insensitive, let's make it lowercase to improve readability.
39417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39418      # Now convert it back to Unix-style (cygpath)
39419      input_path=`$CYGPATH -u "$shortmode_path"`
39420      new_path="$input_path"
39421    fi
39422  fi
39423
39424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39425  if test "x$test_cygdrive_prefix" = x; then
39426    # As a simple fix, exclude /usr/bin since it's not a real path.
39427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39429      # a path prefixed by /cygdrive for fixpath to work.
39430      new_path="$CYGWIN_ROOT_PATH$input_path"
39431    fi
39432  fi
39433
39434  # remove trailing .exe if any
39435  new_path="${new_path/%.exe/}"
39436
39437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39438
39439  # First separate the path from the arguments. This will split at the first
39440  # space.
39441  complete="$DUMPBIN"
39442  path="${complete%% *}"
39443  tmp="$complete EOL"
39444  arguments="${tmp#* }"
39445
39446  # Input might be given as Windows format, start by converting to
39447  # unix format.
39448  new_path="$path"
39449
39450  windows_path="$new_path"
39451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39452    unix_path=`$CYGPATH -u "$windows_path"`
39453    new_path="$unix_path"
39454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39456    new_path="$unix_path"
39457  fi
39458
39459
39460  # Now try to locate executable using which
39461  new_path=`$WHICH "$new_path" 2> /dev/null`
39462
39463  if test "x$new_path" = x; then
39464    # Oops. Which didn't find the executable.
39465    # The splitting of arguments from the executable at a space might have been incorrect,
39466    # since paths with space are more likely in Windows. Give it another try with the whole
39467    # argument.
39468    path="$complete"
39469    arguments="EOL"
39470    new_path="$path"
39471
39472  windows_path="$new_path"
39473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39474    unix_path=`$CYGPATH -u "$windows_path"`
39475    new_path="$unix_path"
39476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39478    new_path="$unix_path"
39479  fi
39480
39481
39482    new_path=`$WHICH "$new_path" 2> /dev/null`
39483    # bat and cmd files are not always considered executable in MSYS causing which
39484    # to not find them
39485    if test "x$new_path" = x \
39486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39488      new_path="$path"
39489
39490  windows_path="$new_path"
39491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39492    unix_path=`$CYGPATH -u "$windows_path"`
39493    new_path="$unix_path"
39494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39496    new_path="$unix_path"
39497  fi
39498
39499    fi
39500
39501    if test "x$new_path" = x; then
39502      # It's still not found. Now this is an unrecoverable error.
39503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39504$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39505      has_space=`$ECHO "$complete" | $GREP " "`
39506      if test "x$has_space" != x; then
39507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39509      fi
39510      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39511    fi
39512  fi
39513
39514  # Now new_path has a complete unix path to the binary
39515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39516    # Keep paths in /bin as-is, but remove trailing .exe if any
39517    new_path="${new_path/%.exe/}"
39518    # Do not save /bin paths to all_fixpath_prefixes!
39519  else
39520    # Not in mixed or Windows style, start by that.
39521    new_path=`cmd //c echo $new_path`
39522
39523  input_path="$new_path"
39524  # Check if we need to convert this using DOS-style short mode. If the path
39525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39526  # take no chances and rewrite it.
39527  # Note: m4 eats our [], so we need to use [ and ] instead.
39528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39529  if test "x$has_forbidden_chars" != x; then
39530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39532  fi
39533
39534    # Output is in $new_path
39535
39536  windows_path="$new_path"
39537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39538    unix_path=`$CYGPATH -u "$windows_path"`
39539    new_path="$unix_path"
39540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39542    new_path="$unix_path"
39543  fi
39544
39545    # remove trailing .exe if any
39546    new_path="${new_path/%.exe/}"
39547
39548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39550  fi
39551
39552    else
39553      # We're on a unix platform. Hooray! :)
39554      # First separate the path from the arguments. This will split at the first
39555      # space.
39556      complete="$DUMPBIN"
39557      path="${complete%% *}"
39558      tmp="$complete EOL"
39559      arguments="${tmp#* }"
39560
39561      # Cannot rely on the command "which" here since it doesn't always work.
39562      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39563      if test -z "$is_absolute_path"; then
39564        # Path to executable is not absolute. Find it.
39565        IFS_save="$IFS"
39566        IFS=:
39567        for p in $PATH; do
39568          if test -f "$p/$path" && test -x "$p/$path"; then
39569            new_path="$p/$path"
39570            break
39571          fi
39572        done
39573        IFS="$IFS_save"
39574      else
39575        # This is an absolute path, we can use it without further modifications.
39576        new_path="$path"
39577      fi
39578
39579      if test "x$new_path" = x; then
39580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39581$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39582        has_space=`$ECHO "$complete" | $GREP " "`
39583        if test "x$has_space" != x; then
39584          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39586        fi
39587        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39588      fi
39589    fi
39590
39591    # Now join together the path and the arguments once again
39592    if test "x$arguments" != xEOL; then
39593      new_complete="$new_path ${arguments% *}"
39594    else
39595      new_complete="$new_path"
39596    fi
39597
39598    if test "x$complete" != "x$new_complete"; then
39599      DUMPBIN="$new_complete"
39600      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39601$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39602    fi
39603  fi
39604
39605    # We need to check for 'msbuild.exe' because at the place where we expect to
39606    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39607    # won't find the 'msbuild.exe' executable in that case (and the
39608    # 'ac_executable_extensions' is unusable due to performance reasons).
39609    # Notice that we intentionally don't fix up the path to MSBUILD because we
39610    # will call it in a DOS shell during freetype detection on Windows (see
39611    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39612    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39613set dummy msbuild.exe; ac_word=$2
39614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39615$as_echo_n "checking for $ac_word... " >&6; }
39616if ${ac_cv_prog_MSBUILD+:} false; then :
39617  $as_echo_n "(cached) " >&6
39618else
39619  if test -n "$MSBUILD"; then
39620  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39621else
39622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39623for as_dir in $PATH
39624do
39625  IFS=$as_save_IFS
39626  test -z "$as_dir" && as_dir=.
39627    for ac_exec_ext in '' $ac_executable_extensions; do
39628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39629    ac_cv_prog_MSBUILD="msbuild.exe"
39630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39631    break 2
39632  fi
39633done
39634  done
39635IFS=$as_save_IFS
39636
39637fi
39638fi
39639MSBUILD=$ac_cv_prog_MSBUILD
39640if test -n "$MSBUILD"; then
39641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39642$as_echo "$MSBUILD" >&6; }
39643else
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39645$as_echo "no" >&6; }
39646fi
39647
39648
39649  fi
39650
39651  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39652
39653
39654  # Publish this variable in the help.
39655
39656
39657  if [ -z "${STRIP+x}" ]; then
39658    # The variable is not set by user, try to locate tool using the code snippet
39659    for ac_prog in strip
39660do
39661  # Extract the first word of "$ac_prog", so it can be a program name with args.
39662set dummy $ac_prog; ac_word=$2
39663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39664$as_echo_n "checking for $ac_word... " >&6; }
39665if ${ac_cv_path_STRIP+:} false; then :
39666  $as_echo_n "(cached) " >&6
39667else
39668  case $STRIP in
39669  [\\/]* | ?:[\\/]*)
39670  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39671  ;;
39672  *)
39673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39674for as_dir in $PATH
39675do
39676  IFS=$as_save_IFS
39677  test -z "$as_dir" && as_dir=.
39678    for ac_exec_ext in '' $ac_executable_extensions; do
39679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39680    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39682    break 2
39683  fi
39684done
39685  done
39686IFS=$as_save_IFS
39687
39688  ;;
39689esac
39690fi
39691STRIP=$ac_cv_path_STRIP
39692if test -n "$STRIP"; then
39693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39694$as_echo "$STRIP" >&6; }
39695else
39696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39697$as_echo "no" >&6; }
39698fi
39699
39700
39701  test -n "$STRIP" && break
39702done
39703
39704  else
39705    # The variable is set, but is it from the command line or the environment?
39706
39707    # Try to remove the string !STRIP! from our list.
39708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39710      # If it failed, the variable was not from the command line. Ignore it,
39711      # but warn the user (except for BASH, which is always set by the calling BASH).
39712      if test "xSTRIP" != xBASH; then
39713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39714$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39715      fi
39716      # Try to locate tool using the code snippet
39717      for ac_prog in strip
39718do
39719  # Extract the first word of "$ac_prog", so it can be a program name with args.
39720set dummy $ac_prog; ac_word=$2
39721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39722$as_echo_n "checking for $ac_word... " >&6; }
39723if ${ac_cv_path_STRIP+:} false; then :
39724  $as_echo_n "(cached) " >&6
39725else
39726  case $STRIP in
39727  [\\/]* | ?:[\\/]*)
39728  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39729  ;;
39730  *)
39731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39732for as_dir in $PATH
39733do
39734  IFS=$as_save_IFS
39735  test -z "$as_dir" && as_dir=.
39736    for ac_exec_ext in '' $ac_executable_extensions; do
39737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39738    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39740    break 2
39741  fi
39742done
39743  done
39744IFS=$as_save_IFS
39745
39746  ;;
39747esac
39748fi
39749STRIP=$ac_cv_path_STRIP
39750if test -n "$STRIP"; then
39751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39752$as_echo "$STRIP" >&6; }
39753else
39754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39755$as_echo "no" >&6; }
39756fi
39757
39758
39759  test -n "$STRIP" && break
39760done
39761
39762    else
39763      # If it succeeded, then it was overridden by the user. We will use it
39764      # for the tool.
39765
39766      # First remove it from the list of overridden variables, so we can test
39767      # for unknown variables in the end.
39768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39769
39770      # Check if we try to supply an empty value
39771      if test "x$STRIP" = x; then
39772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39773$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39775$as_echo_n "checking for STRIP... " >&6; }
39776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39777$as_echo "disabled" >&6; }
39778      else
39779        # Check if the provided tool contains a complete path.
39780        tool_specified="$STRIP"
39781        tool_basename="${tool_specified##*/}"
39782        if test "x$tool_basename" = "x$tool_specified"; then
39783          # A command without a complete path is provided, search $PATH.
39784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39785$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39786          # Extract the first word of "$tool_basename", so it can be a program name with args.
39787set dummy $tool_basename; ac_word=$2
39788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39789$as_echo_n "checking for $ac_word... " >&6; }
39790if ${ac_cv_path_STRIP+:} false; then :
39791  $as_echo_n "(cached) " >&6
39792else
39793  case $STRIP in
39794  [\\/]* | ?:[\\/]*)
39795  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39796  ;;
39797  *)
39798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39799for as_dir in $PATH
39800do
39801  IFS=$as_save_IFS
39802  test -z "$as_dir" && as_dir=.
39803    for ac_exec_ext in '' $ac_executable_extensions; do
39804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39805    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39807    break 2
39808  fi
39809done
39810  done
39811IFS=$as_save_IFS
39812
39813  ;;
39814esac
39815fi
39816STRIP=$ac_cv_path_STRIP
39817if test -n "$STRIP"; then
39818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39819$as_echo "$STRIP" >&6; }
39820else
39821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39822$as_echo "no" >&6; }
39823fi
39824
39825
39826          if test "x$STRIP" = x; then
39827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39828          fi
39829        else
39830          # Otherwise we believe it is a complete path. Use it as it is.
39831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39832$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39834$as_echo_n "checking for STRIP... " >&6; }
39835          if test ! -x "$tool_specified"; then
39836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39837$as_echo "not found" >&6; }
39838            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39839          fi
39840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39841$as_echo "$tool_specified" >&6; }
39842        fi
39843      fi
39844    fi
39845
39846  fi
39847
39848
39849
39850  # Only process if variable expands to non-empty
39851
39852  if test "x$STRIP" != x; then
39853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39854
39855  # First separate the path from the arguments. This will split at the first
39856  # space.
39857  complete="$STRIP"
39858  path="${complete%% *}"
39859  tmp="$complete EOL"
39860  arguments="${tmp#* }"
39861
39862  # Input might be given as Windows format, start by converting to
39863  # unix format.
39864  new_path=`$CYGPATH -u "$path"`
39865
39866  # Now try to locate executable using which
39867  new_path=`$WHICH "$new_path" 2> /dev/null`
39868  # bat and cmd files are not always considered executable in cygwin causing which
39869  # to not find them
39870  if test "x$new_path" = x \
39871      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39872      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39873    new_path=`$CYGPATH -u "$path"`
39874  fi
39875  if test "x$new_path" = x; then
39876    # Oops. Which didn't find the executable.
39877    # The splitting of arguments from the executable at a space might have been incorrect,
39878    # since paths with space are more likely in Windows. Give it another try with the whole
39879    # argument.
39880    path="$complete"
39881    arguments="EOL"
39882    new_path=`$CYGPATH -u "$path"`
39883    new_path=`$WHICH "$new_path" 2> /dev/null`
39884    # bat and cmd files are not always considered executable in cygwin causing which
39885    # to not find them
39886    if test "x$new_path" = x \
39887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39889      new_path=`$CYGPATH -u "$path"`
39890    fi
39891    if test "x$new_path" = x; then
39892      # It's still not found. Now this is an unrecoverable error.
39893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39894$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39895      has_space=`$ECHO "$complete" | $GREP " "`
39896      if test "x$has_space" != x; then
39897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39899      fi
39900      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39901    fi
39902  fi
39903
39904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39907  # "foo.exe" is OK but "foo" is an error.
39908  #
39909  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39910  # It is also a way to make sure we got the proper file name for the real test later on.
39911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39912  if test "x$test_shortpath" = x; then
39913    # Short path failed, file does not exist as specified.
39914    # Try adding .exe or .cmd
39915    if test -f "${new_path}.exe"; then
39916      input_to_shortpath="${new_path}.exe"
39917    elif test -f "${new_path}.cmd"; then
39918      input_to_shortpath="${new_path}.cmd"
39919    else
39920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39921$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39922      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39923$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39924      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39925    fi
39926  else
39927    input_to_shortpath="$new_path"
39928  fi
39929
39930  # Call helper function which possibly converts this using DOS-style short mode.
39931  # If so, the updated path is stored in $new_path.
39932  new_path="$input_to_shortpath"
39933
39934  input_path="$input_to_shortpath"
39935  # Check if we need to convert this using DOS-style short mode. If the path
39936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39937  # take no chances and rewrite it.
39938  # Note: m4 eats our [], so we need to use [ and ] instead.
39939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39940  if test "x$has_forbidden_chars" != x; then
39941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39945      # Going to short mode and back again did indeed matter. Since short mode is
39946      # case insensitive, let's make it lowercase to improve readability.
39947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39948      # Now convert it back to Unix-style (cygpath)
39949      input_path=`$CYGPATH -u "$shortmode_path"`
39950      new_path="$input_path"
39951    fi
39952  fi
39953
39954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39955  if test "x$test_cygdrive_prefix" = x; then
39956    # As a simple fix, exclude /usr/bin since it's not a real path.
39957    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39959      # a path prefixed by /cygdrive for fixpath to work.
39960      new_path="$CYGWIN_ROOT_PATH$input_path"
39961    fi
39962  fi
39963
39964  # remove trailing .exe if any
39965  new_path="${new_path/%.exe/}"
39966
39967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39968
39969  # First separate the path from the arguments. This will split at the first
39970  # space.
39971  complete="$STRIP"
39972  path="${complete%% *}"
39973  tmp="$complete EOL"
39974  arguments="${tmp#* }"
39975
39976  # Input might be given as Windows format, start by converting to
39977  # unix format.
39978  new_path="$path"
39979
39980  windows_path="$new_path"
39981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39982    unix_path=`$CYGPATH -u "$windows_path"`
39983    new_path="$unix_path"
39984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39986    new_path="$unix_path"
39987  fi
39988
39989
39990  # Now try to locate executable using which
39991  new_path=`$WHICH "$new_path" 2> /dev/null`
39992
39993  if test "x$new_path" = x; then
39994    # Oops. Which didn't find the executable.
39995    # The splitting of arguments from the executable at a space might have been incorrect,
39996    # since paths with space are more likely in Windows. Give it another try with the whole
39997    # argument.
39998    path="$complete"
39999    arguments="EOL"
40000    new_path="$path"
40001
40002  windows_path="$new_path"
40003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40004    unix_path=`$CYGPATH -u "$windows_path"`
40005    new_path="$unix_path"
40006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40008    new_path="$unix_path"
40009  fi
40010
40011
40012    new_path=`$WHICH "$new_path" 2> /dev/null`
40013    # bat and cmd files are not always considered executable in MSYS causing which
40014    # to not find them
40015    if test "x$new_path" = x \
40016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40018      new_path="$path"
40019
40020  windows_path="$new_path"
40021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40022    unix_path=`$CYGPATH -u "$windows_path"`
40023    new_path="$unix_path"
40024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40026    new_path="$unix_path"
40027  fi
40028
40029    fi
40030
40031    if test "x$new_path" = x; then
40032      # It's still not found. Now this is an unrecoverable error.
40033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40034$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40035      has_space=`$ECHO "$complete" | $GREP " "`
40036      if test "x$has_space" != x; then
40037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40039      fi
40040      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40041    fi
40042  fi
40043
40044  # Now new_path has a complete unix path to the binary
40045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40046    # Keep paths in /bin as-is, but remove trailing .exe if any
40047    new_path="${new_path/%.exe/}"
40048    # Do not save /bin paths to all_fixpath_prefixes!
40049  else
40050    # Not in mixed or Windows style, start by that.
40051    new_path=`cmd //c echo $new_path`
40052
40053  input_path="$new_path"
40054  # Check if we need to convert this using DOS-style short mode. If the path
40055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40056  # take no chances and rewrite it.
40057  # Note: m4 eats our [], so we need to use [ and ] instead.
40058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40059  if test "x$has_forbidden_chars" != x; then
40060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40062  fi
40063
40064    # Output is in $new_path
40065
40066  windows_path="$new_path"
40067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40068    unix_path=`$CYGPATH -u "$windows_path"`
40069    new_path="$unix_path"
40070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40072    new_path="$unix_path"
40073  fi
40074
40075    # remove trailing .exe if any
40076    new_path="${new_path/%.exe/}"
40077
40078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40080  fi
40081
40082    else
40083      # We're on a unix platform. Hooray! :)
40084      # First separate the path from the arguments. This will split at the first
40085      # space.
40086      complete="$STRIP"
40087      path="${complete%% *}"
40088      tmp="$complete EOL"
40089      arguments="${tmp#* }"
40090
40091      # Cannot rely on the command "which" here since it doesn't always work.
40092      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40093      if test -z "$is_absolute_path"; then
40094        # Path to executable is not absolute. Find it.
40095        IFS_save="$IFS"
40096        IFS=:
40097        for p in $PATH; do
40098          if test -f "$p/$path" && test -x "$p/$path"; then
40099            new_path="$p/$path"
40100            break
40101          fi
40102        done
40103        IFS="$IFS_save"
40104      else
40105        # This is an absolute path, we can use it without further modifications.
40106        new_path="$path"
40107      fi
40108
40109      if test "x$new_path" = x; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40111$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40112        has_space=`$ECHO "$complete" | $GREP " "`
40113        if test "x$has_space" != x; then
40114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40116        fi
40117        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40118      fi
40119    fi
40120
40121    # Now join together the path and the arguments once again
40122    if test "x$arguments" != xEOL; then
40123      new_complete="$new_path ${arguments% *}"
40124    else
40125      new_complete="$new_path"
40126    fi
40127
40128    if test "x$complete" != "x$new_complete"; then
40129      STRIP="$new_complete"
40130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40131$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40132    fi
40133  fi
40134
40135
40136
40137  # Publish this variable in the help.
40138
40139
40140  if [ -z "${NM+x}" ]; then
40141    # The variable is not set by user, try to locate tool using the code snippet
40142    for ac_prog in nm
40143do
40144  # Extract the first word of "$ac_prog", so it can be a program name with args.
40145set dummy $ac_prog; ac_word=$2
40146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40147$as_echo_n "checking for $ac_word... " >&6; }
40148if ${ac_cv_path_NM+:} false; then :
40149  $as_echo_n "(cached) " >&6
40150else
40151  case $NM in
40152  [\\/]* | ?:[\\/]*)
40153  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40154  ;;
40155  *)
40156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40157for as_dir in $PATH
40158do
40159  IFS=$as_save_IFS
40160  test -z "$as_dir" && as_dir=.
40161    for ac_exec_ext in '' $ac_executable_extensions; do
40162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40163    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40165    break 2
40166  fi
40167done
40168  done
40169IFS=$as_save_IFS
40170
40171  ;;
40172esac
40173fi
40174NM=$ac_cv_path_NM
40175if test -n "$NM"; then
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40177$as_echo "$NM" >&6; }
40178else
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40180$as_echo "no" >&6; }
40181fi
40182
40183
40184  test -n "$NM" && break
40185done
40186
40187  else
40188    # The variable is set, but is it from the command line or the environment?
40189
40190    # Try to remove the string !NM! from our list.
40191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40193      # If it failed, the variable was not from the command line. Ignore it,
40194      # but warn the user (except for BASH, which is always set by the calling BASH).
40195      if test "xNM" != xBASH; then
40196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40197$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40198      fi
40199      # Try to locate tool using the code snippet
40200      for ac_prog in nm
40201do
40202  # Extract the first word of "$ac_prog", so it can be a program name with args.
40203set dummy $ac_prog; ac_word=$2
40204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40205$as_echo_n "checking for $ac_word... " >&6; }
40206if ${ac_cv_path_NM+:} false; then :
40207  $as_echo_n "(cached) " >&6
40208else
40209  case $NM in
40210  [\\/]* | ?:[\\/]*)
40211  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40212  ;;
40213  *)
40214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40215for as_dir in $PATH
40216do
40217  IFS=$as_save_IFS
40218  test -z "$as_dir" && as_dir=.
40219    for ac_exec_ext in '' $ac_executable_extensions; do
40220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40221    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40223    break 2
40224  fi
40225done
40226  done
40227IFS=$as_save_IFS
40228
40229  ;;
40230esac
40231fi
40232NM=$ac_cv_path_NM
40233if test -n "$NM"; then
40234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40235$as_echo "$NM" >&6; }
40236else
40237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40238$as_echo "no" >&6; }
40239fi
40240
40241
40242  test -n "$NM" && break
40243done
40244
40245    else
40246      # If it succeeded, then it was overridden by the user. We will use it
40247      # for the tool.
40248
40249      # First remove it from the list of overridden variables, so we can test
40250      # for unknown variables in the end.
40251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40252
40253      # Check if we try to supply an empty value
40254      if test "x$NM" = x; then
40255        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40256$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40258$as_echo_n "checking for NM... " >&6; }
40259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40260$as_echo "disabled" >&6; }
40261      else
40262        # Check if the provided tool contains a complete path.
40263        tool_specified="$NM"
40264        tool_basename="${tool_specified##*/}"
40265        if test "x$tool_basename" = "x$tool_specified"; then
40266          # A command without a complete path is provided, search $PATH.
40267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40268$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40269          # Extract the first word of "$tool_basename", so it can be a program name with args.
40270set dummy $tool_basename; ac_word=$2
40271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40272$as_echo_n "checking for $ac_word... " >&6; }
40273if ${ac_cv_path_NM+:} false; then :
40274  $as_echo_n "(cached) " >&6
40275else
40276  case $NM in
40277  [\\/]* | ?:[\\/]*)
40278  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40279  ;;
40280  *)
40281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40282for as_dir in $PATH
40283do
40284  IFS=$as_save_IFS
40285  test -z "$as_dir" && as_dir=.
40286    for ac_exec_ext in '' $ac_executable_extensions; do
40287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40288    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40290    break 2
40291  fi
40292done
40293  done
40294IFS=$as_save_IFS
40295
40296  ;;
40297esac
40298fi
40299NM=$ac_cv_path_NM
40300if test -n "$NM"; then
40301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40302$as_echo "$NM" >&6; }
40303else
40304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40305$as_echo "no" >&6; }
40306fi
40307
40308
40309          if test "x$NM" = x; then
40310            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40311          fi
40312        else
40313          # Otherwise we believe it is a complete path. Use it as it is.
40314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40315$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40316          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40317$as_echo_n "checking for NM... " >&6; }
40318          if test ! -x "$tool_specified"; then
40319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40320$as_echo "not found" >&6; }
40321            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40322          fi
40323          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40324$as_echo "$tool_specified" >&6; }
40325        fi
40326      fi
40327    fi
40328
40329  fi
40330
40331
40332
40333  # Only process if variable expands to non-empty
40334
40335  if test "x$NM" != x; then
40336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337
40338  # First separate the path from the arguments. This will split at the first
40339  # space.
40340  complete="$NM"
40341  path="${complete%% *}"
40342  tmp="$complete EOL"
40343  arguments="${tmp#* }"
40344
40345  # Input might be given as Windows format, start by converting to
40346  # unix format.
40347  new_path=`$CYGPATH -u "$path"`
40348
40349  # Now try to locate executable using which
40350  new_path=`$WHICH "$new_path" 2> /dev/null`
40351  # bat and cmd files are not always considered executable in cygwin causing which
40352  # to not find them
40353  if test "x$new_path" = x \
40354      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356    new_path=`$CYGPATH -u "$path"`
40357  fi
40358  if test "x$new_path" = x; then
40359    # Oops. Which didn't find the executable.
40360    # The splitting of arguments from the executable at a space might have been incorrect,
40361    # since paths with space are more likely in Windows. Give it another try with the whole
40362    # argument.
40363    path="$complete"
40364    arguments="EOL"
40365    new_path=`$CYGPATH -u "$path"`
40366    new_path=`$WHICH "$new_path" 2> /dev/null`
40367    # bat and cmd files are not always considered executable in cygwin causing which
40368    # to not find them
40369    if test "x$new_path" = x \
40370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40372      new_path=`$CYGPATH -u "$path"`
40373    fi
40374    if test "x$new_path" = x; then
40375      # It's still not found. Now this is an unrecoverable error.
40376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40377$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40378      has_space=`$ECHO "$complete" | $GREP " "`
40379      if test "x$has_space" != x; then
40380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40382      fi
40383      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40384    fi
40385  fi
40386
40387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40390  # "foo.exe" is OK but "foo" is an error.
40391  #
40392  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40393  # It is also a way to make sure we got the proper file name for the real test later on.
40394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40395  if test "x$test_shortpath" = x; then
40396    # Short path failed, file does not exist as specified.
40397    # Try adding .exe or .cmd
40398    if test -f "${new_path}.exe"; then
40399      input_to_shortpath="${new_path}.exe"
40400    elif test -f "${new_path}.cmd"; then
40401      input_to_shortpath="${new_path}.cmd"
40402    else
40403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40404$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40407      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40408    fi
40409  else
40410    input_to_shortpath="$new_path"
40411  fi
40412
40413  # Call helper function which possibly converts this using DOS-style short mode.
40414  # If so, the updated path is stored in $new_path.
40415  new_path="$input_to_shortpath"
40416
40417  input_path="$input_to_shortpath"
40418  # Check if we need to convert this using DOS-style short mode. If the path
40419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40420  # take no chances and rewrite it.
40421  # Note: m4 eats our [], so we need to use [ and ] instead.
40422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40423  if test "x$has_forbidden_chars" != x; then
40424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40428      # Going to short mode and back again did indeed matter. Since short mode is
40429      # case insensitive, let's make it lowercase to improve readability.
40430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40431      # Now convert it back to Unix-style (cygpath)
40432      input_path=`$CYGPATH -u "$shortmode_path"`
40433      new_path="$input_path"
40434    fi
40435  fi
40436
40437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40438  if test "x$test_cygdrive_prefix" = x; then
40439    # As a simple fix, exclude /usr/bin since it's not a real path.
40440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40442      # a path prefixed by /cygdrive for fixpath to work.
40443      new_path="$CYGWIN_ROOT_PATH$input_path"
40444    fi
40445  fi
40446
40447  # remove trailing .exe if any
40448  new_path="${new_path/%.exe/}"
40449
40450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40451
40452  # First separate the path from the arguments. This will split at the first
40453  # space.
40454  complete="$NM"
40455  path="${complete%% *}"
40456  tmp="$complete EOL"
40457  arguments="${tmp#* }"
40458
40459  # Input might be given as Windows format, start by converting to
40460  # unix format.
40461  new_path="$path"
40462
40463  windows_path="$new_path"
40464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40465    unix_path=`$CYGPATH -u "$windows_path"`
40466    new_path="$unix_path"
40467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40469    new_path="$unix_path"
40470  fi
40471
40472
40473  # Now try to locate executable using which
40474  new_path=`$WHICH "$new_path" 2> /dev/null`
40475
40476  if test "x$new_path" = x; then
40477    # Oops. Which didn't find the executable.
40478    # The splitting of arguments from the executable at a space might have been incorrect,
40479    # since paths with space are more likely in Windows. Give it another try with the whole
40480    # argument.
40481    path="$complete"
40482    arguments="EOL"
40483    new_path="$path"
40484
40485  windows_path="$new_path"
40486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40487    unix_path=`$CYGPATH -u "$windows_path"`
40488    new_path="$unix_path"
40489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40491    new_path="$unix_path"
40492  fi
40493
40494
40495    new_path=`$WHICH "$new_path" 2> /dev/null`
40496    # bat and cmd files are not always considered executable in MSYS causing which
40497    # to not find them
40498    if test "x$new_path" = x \
40499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40501      new_path="$path"
40502
40503  windows_path="$new_path"
40504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40505    unix_path=`$CYGPATH -u "$windows_path"`
40506    new_path="$unix_path"
40507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40509    new_path="$unix_path"
40510  fi
40511
40512    fi
40513
40514    if test "x$new_path" = x; then
40515      # It's still not found. Now this is an unrecoverable error.
40516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40517$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40518      has_space=`$ECHO "$complete" | $GREP " "`
40519      if test "x$has_space" != x; then
40520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40522      fi
40523      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40524    fi
40525  fi
40526
40527  # Now new_path has a complete unix path to the binary
40528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40529    # Keep paths in /bin as-is, but remove trailing .exe if any
40530    new_path="${new_path/%.exe/}"
40531    # Do not save /bin paths to all_fixpath_prefixes!
40532  else
40533    # Not in mixed or Windows style, start by that.
40534    new_path=`cmd //c echo $new_path`
40535
40536  input_path="$new_path"
40537  # Check if we need to convert this using DOS-style short mode. If the path
40538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40539  # take no chances and rewrite it.
40540  # Note: m4 eats our [], so we need to use [ and ] instead.
40541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40542  if test "x$has_forbidden_chars" != x; then
40543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40545  fi
40546
40547    # Output is in $new_path
40548
40549  windows_path="$new_path"
40550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40551    unix_path=`$CYGPATH -u "$windows_path"`
40552    new_path="$unix_path"
40553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40555    new_path="$unix_path"
40556  fi
40557
40558    # remove trailing .exe if any
40559    new_path="${new_path/%.exe/}"
40560
40561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40563  fi
40564
40565    else
40566      # We're on a unix platform. Hooray! :)
40567      # First separate the path from the arguments. This will split at the first
40568      # space.
40569      complete="$NM"
40570      path="${complete%% *}"
40571      tmp="$complete EOL"
40572      arguments="${tmp#* }"
40573
40574      # Cannot rely on the command "which" here since it doesn't always work.
40575      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40576      if test -z "$is_absolute_path"; then
40577        # Path to executable is not absolute. Find it.
40578        IFS_save="$IFS"
40579        IFS=:
40580        for p in $PATH; do
40581          if test -f "$p/$path" && test -x "$p/$path"; then
40582            new_path="$p/$path"
40583            break
40584          fi
40585        done
40586        IFS="$IFS_save"
40587      else
40588        # This is an absolute path, we can use it without further modifications.
40589        new_path="$path"
40590      fi
40591
40592      if test "x$new_path" = x; then
40593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40594$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40595        has_space=`$ECHO "$complete" | $GREP " "`
40596        if test "x$has_space" != x; then
40597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40599        fi
40600        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40601      fi
40602    fi
40603
40604    # Now join together the path and the arguments once again
40605    if test "x$arguments" != xEOL; then
40606      new_complete="$new_path ${arguments% *}"
40607    else
40608      new_complete="$new_path"
40609    fi
40610
40611    if test "x$complete" != "x$new_complete"; then
40612      NM="$new_complete"
40613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40614$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40615    fi
40616  fi
40617
40618
40619
40620  # Publish this variable in the help.
40621
40622
40623  if [ -z "${GNM+x}" ]; then
40624    # The variable is not set by user, try to locate tool using the code snippet
40625    for ac_prog in gnm
40626do
40627  # Extract the first word of "$ac_prog", so it can be a program name with args.
40628set dummy $ac_prog; ac_word=$2
40629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40630$as_echo_n "checking for $ac_word... " >&6; }
40631if ${ac_cv_path_GNM+:} false; then :
40632  $as_echo_n "(cached) " >&6
40633else
40634  case $GNM in
40635  [\\/]* | ?:[\\/]*)
40636  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40637  ;;
40638  *)
40639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40640for as_dir in $PATH
40641do
40642  IFS=$as_save_IFS
40643  test -z "$as_dir" && as_dir=.
40644    for ac_exec_ext in '' $ac_executable_extensions; do
40645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40646    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40648    break 2
40649  fi
40650done
40651  done
40652IFS=$as_save_IFS
40653
40654  ;;
40655esac
40656fi
40657GNM=$ac_cv_path_GNM
40658if test -n "$GNM"; then
40659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40660$as_echo "$GNM" >&6; }
40661else
40662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40663$as_echo "no" >&6; }
40664fi
40665
40666
40667  test -n "$GNM" && break
40668done
40669
40670  else
40671    # The variable is set, but is it from the command line or the environment?
40672
40673    # Try to remove the string !GNM! from our list.
40674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40676      # If it failed, the variable was not from the command line. Ignore it,
40677      # but warn the user (except for BASH, which is always set by the calling BASH).
40678      if test "xGNM" != xBASH; then
40679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40680$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40681      fi
40682      # Try to locate tool using the code snippet
40683      for ac_prog in gnm
40684do
40685  # Extract the first word of "$ac_prog", so it can be a program name with args.
40686set dummy $ac_prog; ac_word=$2
40687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40688$as_echo_n "checking for $ac_word... " >&6; }
40689if ${ac_cv_path_GNM+:} false; then :
40690  $as_echo_n "(cached) " >&6
40691else
40692  case $GNM in
40693  [\\/]* | ?:[\\/]*)
40694  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40695  ;;
40696  *)
40697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40698for as_dir in $PATH
40699do
40700  IFS=$as_save_IFS
40701  test -z "$as_dir" && as_dir=.
40702    for ac_exec_ext in '' $ac_executable_extensions; do
40703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40704    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40706    break 2
40707  fi
40708done
40709  done
40710IFS=$as_save_IFS
40711
40712  ;;
40713esac
40714fi
40715GNM=$ac_cv_path_GNM
40716if test -n "$GNM"; then
40717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40718$as_echo "$GNM" >&6; }
40719else
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40721$as_echo "no" >&6; }
40722fi
40723
40724
40725  test -n "$GNM" && break
40726done
40727
40728    else
40729      # If it succeeded, then it was overridden by the user. We will use it
40730      # for the tool.
40731
40732      # First remove it from the list of overridden variables, so we can test
40733      # for unknown variables in the end.
40734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40735
40736      # Check if we try to supply an empty value
40737      if test "x$GNM" = x; then
40738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40739$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40741$as_echo_n "checking for GNM... " >&6; }
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40743$as_echo "disabled" >&6; }
40744      else
40745        # Check if the provided tool contains a complete path.
40746        tool_specified="$GNM"
40747        tool_basename="${tool_specified##*/}"
40748        if test "x$tool_basename" = "x$tool_specified"; then
40749          # A command without a complete path is provided, search $PATH.
40750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40751$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40752          # Extract the first word of "$tool_basename", so it can be a program name with args.
40753set dummy $tool_basename; ac_word=$2
40754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40755$as_echo_n "checking for $ac_word... " >&6; }
40756if ${ac_cv_path_GNM+:} false; then :
40757  $as_echo_n "(cached) " >&6
40758else
40759  case $GNM in
40760  [\\/]* | ?:[\\/]*)
40761  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40762  ;;
40763  *)
40764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40765for as_dir in $PATH
40766do
40767  IFS=$as_save_IFS
40768  test -z "$as_dir" && as_dir=.
40769    for ac_exec_ext in '' $ac_executable_extensions; do
40770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40771    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40773    break 2
40774  fi
40775done
40776  done
40777IFS=$as_save_IFS
40778
40779  ;;
40780esac
40781fi
40782GNM=$ac_cv_path_GNM
40783if test -n "$GNM"; then
40784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40785$as_echo "$GNM" >&6; }
40786else
40787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40788$as_echo "no" >&6; }
40789fi
40790
40791
40792          if test "x$GNM" = x; then
40793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40794          fi
40795        else
40796          # Otherwise we believe it is a complete path. Use it as it is.
40797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40798$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40800$as_echo_n "checking for GNM... " >&6; }
40801          if test ! -x "$tool_specified"; then
40802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40803$as_echo "not found" >&6; }
40804            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40805          fi
40806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40807$as_echo "$tool_specified" >&6; }
40808        fi
40809      fi
40810    fi
40811
40812  fi
40813
40814
40815
40816  # Only process if variable expands to non-empty
40817
40818  if test "x$GNM" != x; then
40819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40820
40821  # First separate the path from the arguments. This will split at the first
40822  # space.
40823  complete="$GNM"
40824  path="${complete%% *}"
40825  tmp="$complete EOL"
40826  arguments="${tmp#* }"
40827
40828  # Input might be given as Windows format, start by converting to
40829  # unix format.
40830  new_path=`$CYGPATH -u "$path"`
40831
40832  # Now try to locate executable using which
40833  new_path=`$WHICH "$new_path" 2> /dev/null`
40834  # bat and cmd files are not always considered executable in cygwin causing which
40835  # to not find them
40836  if test "x$new_path" = x \
40837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40839    new_path=`$CYGPATH -u "$path"`
40840  fi
40841  if test "x$new_path" = x; then
40842    # Oops. Which didn't find the executable.
40843    # The splitting of arguments from the executable at a space might have been incorrect,
40844    # since paths with space are more likely in Windows. Give it another try with the whole
40845    # argument.
40846    path="$complete"
40847    arguments="EOL"
40848    new_path=`$CYGPATH -u "$path"`
40849    new_path=`$WHICH "$new_path" 2> /dev/null`
40850    # bat and cmd files are not always considered executable in cygwin causing which
40851    # to not find them
40852    if test "x$new_path" = x \
40853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40855      new_path=`$CYGPATH -u "$path"`
40856    fi
40857    if test "x$new_path" = x; then
40858      # It's still not found. Now this is an unrecoverable error.
40859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40860$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40861      has_space=`$ECHO "$complete" | $GREP " "`
40862      if test "x$has_space" != x; then
40863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40865      fi
40866      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40867    fi
40868  fi
40869
40870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40873  # "foo.exe" is OK but "foo" is an error.
40874  #
40875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40876  # It is also a way to make sure we got the proper file name for the real test later on.
40877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40878  if test "x$test_shortpath" = x; then
40879    # Short path failed, file does not exist as specified.
40880    # Try adding .exe or .cmd
40881    if test -f "${new_path}.exe"; then
40882      input_to_shortpath="${new_path}.exe"
40883    elif test -f "${new_path}.cmd"; then
40884      input_to_shortpath="${new_path}.cmd"
40885    else
40886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40887$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40890      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40891    fi
40892  else
40893    input_to_shortpath="$new_path"
40894  fi
40895
40896  # Call helper function which possibly converts this using DOS-style short mode.
40897  # If so, the updated path is stored in $new_path.
40898  new_path="$input_to_shortpath"
40899
40900  input_path="$input_to_shortpath"
40901  # Check if we need to convert this using DOS-style short mode. If the path
40902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40903  # take no chances and rewrite it.
40904  # Note: m4 eats our [], so we need to use [ and ] instead.
40905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40906  if test "x$has_forbidden_chars" != x; then
40907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40911      # Going to short mode and back again did indeed matter. Since short mode is
40912      # case insensitive, let's make it lowercase to improve readability.
40913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40914      # Now convert it back to Unix-style (cygpath)
40915      input_path=`$CYGPATH -u "$shortmode_path"`
40916      new_path="$input_path"
40917    fi
40918  fi
40919
40920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40921  if test "x$test_cygdrive_prefix" = x; then
40922    # As a simple fix, exclude /usr/bin since it's not a real path.
40923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40925      # a path prefixed by /cygdrive for fixpath to work.
40926      new_path="$CYGWIN_ROOT_PATH$input_path"
40927    fi
40928  fi
40929
40930  # remove trailing .exe if any
40931  new_path="${new_path/%.exe/}"
40932
40933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40934
40935  # First separate the path from the arguments. This will split at the first
40936  # space.
40937  complete="$GNM"
40938  path="${complete%% *}"
40939  tmp="$complete EOL"
40940  arguments="${tmp#* }"
40941
40942  # Input might be given as Windows format, start by converting to
40943  # unix format.
40944  new_path="$path"
40945
40946  windows_path="$new_path"
40947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40948    unix_path=`$CYGPATH -u "$windows_path"`
40949    new_path="$unix_path"
40950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40952    new_path="$unix_path"
40953  fi
40954
40955
40956  # Now try to locate executable using which
40957  new_path=`$WHICH "$new_path" 2> /dev/null`
40958
40959  if test "x$new_path" = x; then
40960    # Oops. Which didn't find the executable.
40961    # The splitting of arguments from the executable at a space might have been incorrect,
40962    # since paths with space are more likely in Windows. Give it another try with the whole
40963    # argument.
40964    path="$complete"
40965    arguments="EOL"
40966    new_path="$path"
40967
40968  windows_path="$new_path"
40969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40970    unix_path=`$CYGPATH -u "$windows_path"`
40971    new_path="$unix_path"
40972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40974    new_path="$unix_path"
40975  fi
40976
40977
40978    new_path=`$WHICH "$new_path" 2> /dev/null`
40979    # bat and cmd files are not always considered executable in MSYS causing which
40980    # to not find them
40981    if test "x$new_path" = x \
40982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40984      new_path="$path"
40985
40986  windows_path="$new_path"
40987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40988    unix_path=`$CYGPATH -u "$windows_path"`
40989    new_path="$unix_path"
40990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40992    new_path="$unix_path"
40993  fi
40994
40995    fi
40996
40997    if test "x$new_path" = x; then
40998      # It's still not found. Now this is an unrecoverable error.
40999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41000$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41001      has_space=`$ECHO "$complete" | $GREP " "`
41002      if test "x$has_space" != x; then
41003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41005      fi
41006      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41007    fi
41008  fi
41009
41010  # Now new_path has a complete unix path to the binary
41011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41012    # Keep paths in /bin as-is, but remove trailing .exe if any
41013    new_path="${new_path/%.exe/}"
41014    # Do not save /bin paths to all_fixpath_prefixes!
41015  else
41016    # Not in mixed or Windows style, start by that.
41017    new_path=`cmd //c echo $new_path`
41018
41019  input_path="$new_path"
41020  # Check if we need to convert this using DOS-style short mode. If the path
41021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41022  # take no chances and rewrite it.
41023  # Note: m4 eats our [], so we need to use [ and ] instead.
41024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41025  if test "x$has_forbidden_chars" != x; then
41026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41028  fi
41029
41030    # Output is in $new_path
41031
41032  windows_path="$new_path"
41033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41034    unix_path=`$CYGPATH -u "$windows_path"`
41035    new_path="$unix_path"
41036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41038    new_path="$unix_path"
41039  fi
41040
41041    # remove trailing .exe if any
41042    new_path="${new_path/%.exe/}"
41043
41044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41046  fi
41047
41048    else
41049      # We're on a unix platform. Hooray! :)
41050      # First separate the path from the arguments. This will split at the first
41051      # space.
41052      complete="$GNM"
41053      path="${complete%% *}"
41054      tmp="$complete EOL"
41055      arguments="${tmp#* }"
41056
41057      # Cannot rely on the command "which" here since it doesn't always work.
41058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41059      if test -z "$is_absolute_path"; then
41060        # Path to executable is not absolute. Find it.
41061        IFS_save="$IFS"
41062        IFS=:
41063        for p in $PATH; do
41064          if test -f "$p/$path" && test -x "$p/$path"; then
41065            new_path="$p/$path"
41066            break
41067          fi
41068        done
41069        IFS="$IFS_save"
41070      else
41071        # This is an absolute path, we can use it without further modifications.
41072        new_path="$path"
41073      fi
41074
41075      if test "x$new_path" = x; then
41076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41077$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41078        has_space=`$ECHO "$complete" | $GREP " "`
41079        if test "x$has_space" != x; then
41080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41082        fi
41083        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41084      fi
41085    fi
41086
41087    # Now join together the path and the arguments once again
41088    if test "x$arguments" != xEOL; then
41089      new_complete="$new_path ${arguments% *}"
41090    else
41091      new_complete="$new_path"
41092    fi
41093
41094    if test "x$complete" != "x$new_complete"; then
41095      GNM="$new_complete"
41096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41097$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41098    fi
41099  fi
41100
41101  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41102    # FIXME: we should unify this with the solaris case above.
41103
41104
41105  # Publish this variable in the help.
41106
41107
41108  if [ -z "${STRIP+x}" ]; then
41109    # The variable is not set by user, try to locate tool using the code snippet
41110    if test -n "$ac_tool_prefix"; then
41111  for ac_prog in strip
41112  do
41113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41116$as_echo_n "checking for $ac_word... " >&6; }
41117if ${ac_cv_prog_STRIP+:} false; then :
41118  $as_echo_n "(cached) " >&6
41119else
41120  if test -n "$STRIP"; then
41121  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41122else
41123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41124for as_dir in $PATH
41125do
41126  IFS=$as_save_IFS
41127  test -z "$as_dir" && as_dir=.
41128    for ac_exec_ext in '' $ac_executable_extensions; do
41129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41130    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41132    break 2
41133  fi
41134done
41135  done
41136IFS=$as_save_IFS
41137
41138fi
41139fi
41140STRIP=$ac_cv_prog_STRIP
41141if test -n "$STRIP"; then
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41143$as_echo "$STRIP" >&6; }
41144else
41145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146$as_echo "no" >&6; }
41147fi
41148
41149
41150    test -n "$STRIP" && break
41151  done
41152fi
41153if test -z "$STRIP"; then
41154  ac_ct_STRIP=$STRIP
41155  for ac_prog in strip
41156do
41157  # Extract the first word of "$ac_prog", so it can be a program name with args.
41158set dummy $ac_prog; ac_word=$2
41159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41160$as_echo_n "checking for $ac_word... " >&6; }
41161if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41162  $as_echo_n "(cached) " >&6
41163else
41164  if test -n "$ac_ct_STRIP"; then
41165  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41166else
41167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41168for as_dir in $PATH
41169do
41170  IFS=$as_save_IFS
41171  test -z "$as_dir" && as_dir=.
41172    for ac_exec_ext in '' $ac_executable_extensions; do
41173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41174    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41176    break 2
41177  fi
41178done
41179  done
41180IFS=$as_save_IFS
41181
41182fi
41183fi
41184ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41185if test -n "$ac_ct_STRIP"; then
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41187$as_echo "$ac_ct_STRIP" >&6; }
41188else
41189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41190$as_echo "no" >&6; }
41191fi
41192
41193
41194  test -n "$ac_ct_STRIP" && break
41195done
41196
41197  if test "x$ac_ct_STRIP" = x; then
41198    STRIP=""
41199  else
41200    case $cross_compiling:$ac_tool_warned in
41201yes:)
41202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41204ac_tool_warned=yes ;;
41205esac
41206    STRIP=$ac_ct_STRIP
41207  fi
41208fi
41209
41210  else
41211    # The variable is set, but is it from the command line or the environment?
41212
41213    # Try to remove the string !STRIP! from our list.
41214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41216      # If it failed, the variable was not from the command line. Ignore it,
41217      # but warn the user (except for BASH, which is always set by the calling BASH).
41218      if test "xSTRIP" != xBASH; then
41219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41220$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41221      fi
41222      # Try to locate tool using the code snippet
41223      if test -n "$ac_tool_prefix"; then
41224  for ac_prog in strip
41225  do
41226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_STRIP+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$STRIP"; then
41234  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253STRIP=$ac_cv_prog_STRIP
41254if test -n "$STRIP"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41256$as_echo "$STRIP" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263    test -n "$STRIP" && break
41264  done
41265fi
41266if test -z "$STRIP"; then
41267  ac_ct_STRIP=$STRIP
41268  for ac_prog in strip
41269do
41270  # Extract the first word of "$ac_prog", so it can be a program name with args.
41271set dummy $ac_prog; ac_word=$2
41272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41273$as_echo_n "checking for $ac_word... " >&6; }
41274if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41275  $as_echo_n "(cached) " >&6
41276else
41277  if test -n "$ac_ct_STRIP"; then
41278  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41279else
41280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41281for as_dir in $PATH
41282do
41283  IFS=$as_save_IFS
41284  test -z "$as_dir" && as_dir=.
41285    for ac_exec_ext in '' $ac_executable_extensions; do
41286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41287    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41289    break 2
41290  fi
41291done
41292  done
41293IFS=$as_save_IFS
41294
41295fi
41296fi
41297ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41298if test -n "$ac_ct_STRIP"; then
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41300$as_echo "$ac_ct_STRIP" >&6; }
41301else
41302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41303$as_echo "no" >&6; }
41304fi
41305
41306
41307  test -n "$ac_ct_STRIP" && break
41308done
41309
41310  if test "x$ac_ct_STRIP" = x; then
41311    STRIP=""
41312  else
41313    case $cross_compiling:$ac_tool_warned in
41314yes:)
41315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41317ac_tool_warned=yes ;;
41318esac
41319    STRIP=$ac_ct_STRIP
41320  fi
41321fi
41322
41323    else
41324      # If it succeeded, then it was overridden by the user. We will use it
41325      # for the tool.
41326
41327      # First remove it from the list of overridden variables, so we can test
41328      # for unknown variables in the end.
41329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41330
41331      # Check if we try to supply an empty value
41332      if test "x$STRIP" = x; then
41333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41334$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41336$as_echo_n "checking for STRIP... " >&6; }
41337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41338$as_echo "disabled" >&6; }
41339      else
41340        # Check if the provided tool contains a complete path.
41341        tool_specified="$STRIP"
41342        tool_basename="${tool_specified##*/}"
41343        if test "x$tool_basename" = "x$tool_specified"; then
41344          # A command without a complete path is provided, search $PATH.
41345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41346$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41347          # Extract the first word of "$tool_basename", so it can be a program name with args.
41348set dummy $tool_basename; ac_word=$2
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41350$as_echo_n "checking for $ac_word... " >&6; }
41351if ${ac_cv_path_STRIP+:} false; then :
41352  $as_echo_n "(cached) " >&6
41353else
41354  case $STRIP in
41355  [\\/]* | ?:[\\/]*)
41356  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41357  ;;
41358  *)
41359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41360for as_dir in $PATH
41361do
41362  IFS=$as_save_IFS
41363  test -z "$as_dir" && as_dir=.
41364    for ac_exec_ext in '' $ac_executable_extensions; do
41365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41366    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41368    break 2
41369  fi
41370done
41371  done
41372IFS=$as_save_IFS
41373
41374  ;;
41375esac
41376fi
41377STRIP=$ac_cv_path_STRIP
41378if test -n "$STRIP"; then
41379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41380$as_echo "$STRIP" >&6; }
41381else
41382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41383$as_echo "no" >&6; }
41384fi
41385
41386
41387          if test "x$STRIP" = x; then
41388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41389          fi
41390        else
41391          # Otherwise we believe it is a complete path. Use it as it is.
41392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41393$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41395$as_echo_n "checking for STRIP... " >&6; }
41396          if test ! -x "$tool_specified"; then
41397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41398$as_echo "not found" >&6; }
41399            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41400          fi
41401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41402$as_echo "$tool_specified" >&6; }
41403        fi
41404      fi
41405    fi
41406
41407  fi
41408
41409
41410
41411  # Only process if variable expands to non-empty
41412
41413  if test "x$STRIP" != x; then
41414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41415
41416  # First separate the path from the arguments. This will split at the first
41417  # space.
41418  complete="$STRIP"
41419  path="${complete%% *}"
41420  tmp="$complete EOL"
41421  arguments="${tmp#* }"
41422
41423  # Input might be given as Windows format, start by converting to
41424  # unix format.
41425  new_path=`$CYGPATH -u "$path"`
41426
41427  # Now try to locate executable using which
41428  new_path=`$WHICH "$new_path" 2> /dev/null`
41429  # bat and cmd files are not always considered executable in cygwin causing which
41430  # to not find them
41431  if test "x$new_path" = x \
41432      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41433      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41434    new_path=`$CYGPATH -u "$path"`
41435  fi
41436  if test "x$new_path" = x; then
41437    # Oops. Which didn't find the executable.
41438    # The splitting of arguments from the executable at a space might have been incorrect,
41439    # since paths with space are more likely in Windows. Give it another try with the whole
41440    # argument.
41441    path="$complete"
41442    arguments="EOL"
41443    new_path=`$CYGPATH -u "$path"`
41444    new_path=`$WHICH "$new_path" 2> /dev/null`
41445    # bat and cmd files are not always considered executable in cygwin causing which
41446    # to not find them
41447    if test "x$new_path" = x \
41448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41450      new_path=`$CYGPATH -u "$path"`
41451    fi
41452    if test "x$new_path" = x; then
41453      # It's still not found. Now this is an unrecoverable error.
41454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41455$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41456      has_space=`$ECHO "$complete" | $GREP " "`
41457      if test "x$has_space" != x; then
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41460      fi
41461      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41462    fi
41463  fi
41464
41465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41468  # "foo.exe" is OK but "foo" is an error.
41469  #
41470  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41471  # It is also a way to make sure we got the proper file name for the real test later on.
41472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41473  if test "x$test_shortpath" = x; then
41474    # Short path failed, file does not exist as specified.
41475    # Try adding .exe or .cmd
41476    if test -f "${new_path}.exe"; then
41477      input_to_shortpath="${new_path}.exe"
41478    elif test -f "${new_path}.cmd"; then
41479      input_to_shortpath="${new_path}.cmd"
41480    else
41481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41482$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41483      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41484$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41485      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41486    fi
41487  else
41488    input_to_shortpath="$new_path"
41489  fi
41490
41491  # Call helper function which possibly converts this using DOS-style short mode.
41492  # If so, the updated path is stored in $new_path.
41493  new_path="$input_to_shortpath"
41494
41495  input_path="$input_to_shortpath"
41496  # Check if we need to convert this using DOS-style short mode. If the path
41497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41498  # take no chances and rewrite it.
41499  # Note: m4 eats our [], so we need to use [ and ] instead.
41500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41501  if test "x$has_forbidden_chars" != x; then
41502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41506      # Going to short mode and back again did indeed matter. Since short mode is
41507      # case insensitive, let's make it lowercase to improve readability.
41508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41509      # Now convert it back to Unix-style (cygpath)
41510      input_path=`$CYGPATH -u "$shortmode_path"`
41511      new_path="$input_path"
41512    fi
41513  fi
41514
41515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41516  if test "x$test_cygdrive_prefix" = x; then
41517    # As a simple fix, exclude /usr/bin since it's not a real path.
41518    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41520      # a path prefixed by /cygdrive for fixpath to work.
41521      new_path="$CYGWIN_ROOT_PATH$input_path"
41522    fi
41523  fi
41524
41525  # remove trailing .exe if any
41526  new_path="${new_path/%.exe/}"
41527
41528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41529
41530  # First separate the path from the arguments. This will split at the first
41531  # space.
41532  complete="$STRIP"
41533  path="${complete%% *}"
41534  tmp="$complete EOL"
41535  arguments="${tmp#* }"
41536
41537  # Input might be given as Windows format, start by converting to
41538  # unix format.
41539  new_path="$path"
41540
41541  windows_path="$new_path"
41542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41543    unix_path=`$CYGPATH -u "$windows_path"`
41544    new_path="$unix_path"
41545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41547    new_path="$unix_path"
41548  fi
41549
41550
41551  # Now try to locate executable using which
41552  new_path=`$WHICH "$new_path" 2> /dev/null`
41553
41554  if test "x$new_path" = x; then
41555    # Oops. Which didn't find the executable.
41556    # The splitting of arguments from the executable at a space might have been incorrect,
41557    # since paths with space are more likely in Windows. Give it another try with the whole
41558    # argument.
41559    path="$complete"
41560    arguments="EOL"
41561    new_path="$path"
41562
41563  windows_path="$new_path"
41564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41565    unix_path=`$CYGPATH -u "$windows_path"`
41566    new_path="$unix_path"
41567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41569    new_path="$unix_path"
41570  fi
41571
41572
41573    new_path=`$WHICH "$new_path" 2> /dev/null`
41574    # bat and cmd files are not always considered executable in MSYS causing which
41575    # to not find them
41576    if test "x$new_path" = x \
41577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41579      new_path="$path"
41580
41581  windows_path="$new_path"
41582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41583    unix_path=`$CYGPATH -u "$windows_path"`
41584    new_path="$unix_path"
41585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41587    new_path="$unix_path"
41588  fi
41589
41590    fi
41591
41592    if test "x$new_path" = x; then
41593      # It's still not found. Now this is an unrecoverable error.
41594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41595$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41596      has_space=`$ECHO "$complete" | $GREP " "`
41597      if test "x$has_space" != x; then
41598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41600      fi
41601      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41602    fi
41603  fi
41604
41605  # Now new_path has a complete unix path to the binary
41606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41607    # Keep paths in /bin as-is, but remove trailing .exe if any
41608    new_path="${new_path/%.exe/}"
41609    # Do not save /bin paths to all_fixpath_prefixes!
41610  else
41611    # Not in mixed or Windows style, start by that.
41612    new_path=`cmd //c echo $new_path`
41613
41614  input_path="$new_path"
41615  # Check if we need to convert this using DOS-style short mode. If the path
41616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41617  # take no chances and rewrite it.
41618  # Note: m4 eats our [], so we need to use [ and ] instead.
41619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41620  if test "x$has_forbidden_chars" != x; then
41621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41623  fi
41624
41625    # Output is in $new_path
41626
41627  windows_path="$new_path"
41628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41629    unix_path=`$CYGPATH -u "$windows_path"`
41630    new_path="$unix_path"
41631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41633    new_path="$unix_path"
41634  fi
41635
41636    # remove trailing .exe if any
41637    new_path="${new_path/%.exe/}"
41638
41639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41641  fi
41642
41643    else
41644      # We're on a unix platform. Hooray! :)
41645      # First separate the path from the arguments. This will split at the first
41646      # space.
41647      complete="$STRIP"
41648      path="${complete%% *}"
41649      tmp="$complete EOL"
41650      arguments="${tmp#* }"
41651
41652      # Cannot rely on the command "which" here since it doesn't always work.
41653      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41654      if test -z "$is_absolute_path"; then
41655        # Path to executable is not absolute. Find it.
41656        IFS_save="$IFS"
41657        IFS=:
41658        for p in $PATH; do
41659          if test -f "$p/$path" && test -x "$p/$path"; then
41660            new_path="$p/$path"
41661            break
41662          fi
41663        done
41664        IFS="$IFS_save"
41665      else
41666        # This is an absolute path, we can use it without further modifications.
41667        new_path="$path"
41668      fi
41669
41670      if test "x$new_path" = x; then
41671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41672$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41673        has_space=`$ECHO "$complete" | $GREP " "`
41674        if test "x$has_space" != x; then
41675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41677        fi
41678        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41679      fi
41680    fi
41681
41682    # Now join together the path and the arguments once again
41683    if test "x$arguments" != xEOL; then
41684      new_complete="$new_path ${arguments% *}"
41685    else
41686      new_complete="$new_path"
41687    fi
41688
41689    if test "x$complete" != "x$new_complete"; then
41690      STRIP="$new_complete"
41691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41692$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41693    fi
41694  fi
41695
41696    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41697
41698
41699  # Publish this variable in the help.
41700
41701
41702  if [ -z "${NM+x}" ]; then
41703    # The variable is not set by user, try to locate tool using the code snippet
41704    if test -n "$ac_tool_prefix"; then
41705  for ac_prog in nm gcc-nm
41706  do
41707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41710$as_echo_n "checking for $ac_word... " >&6; }
41711if ${ac_cv_prog_NM+:} false; then :
41712  $as_echo_n "(cached) " >&6
41713else
41714  if test -n "$NM"; then
41715  ac_cv_prog_NM="$NM" # Let the user override the test.
41716else
41717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41718for as_dir in $PATH
41719do
41720  IFS=$as_save_IFS
41721  test -z "$as_dir" && as_dir=.
41722    for ac_exec_ext in '' $ac_executable_extensions; do
41723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41724    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41726    break 2
41727  fi
41728done
41729  done
41730IFS=$as_save_IFS
41731
41732fi
41733fi
41734NM=$ac_cv_prog_NM
41735if test -n "$NM"; then
41736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41737$as_echo "$NM" >&6; }
41738else
41739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41740$as_echo "no" >&6; }
41741fi
41742
41743
41744    test -n "$NM" && break
41745  done
41746fi
41747if test -z "$NM"; then
41748  ac_ct_NM=$NM
41749  for ac_prog in nm gcc-nm
41750do
41751  # Extract the first word of "$ac_prog", so it can be a program name with args.
41752set dummy $ac_prog; ac_word=$2
41753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41754$as_echo_n "checking for $ac_word... " >&6; }
41755if ${ac_cv_prog_ac_ct_NM+:} false; then :
41756  $as_echo_n "(cached) " >&6
41757else
41758  if test -n "$ac_ct_NM"; then
41759  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41760else
41761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41762for as_dir in $PATH
41763do
41764  IFS=$as_save_IFS
41765  test -z "$as_dir" && as_dir=.
41766    for ac_exec_ext in '' $ac_executable_extensions; do
41767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41768    ac_cv_prog_ac_ct_NM="$ac_prog"
41769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41770    break 2
41771  fi
41772done
41773  done
41774IFS=$as_save_IFS
41775
41776fi
41777fi
41778ac_ct_NM=$ac_cv_prog_ac_ct_NM
41779if test -n "$ac_ct_NM"; then
41780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41781$as_echo "$ac_ct_NM" >&6; }
41782else
41783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41784$as_echo "no" >&6; }
41785fi
41786
41787
41788  test -n "$ac_ct_NM" && break
41789done
41790
41791  if test "x$ac_ct_NM" = x; then
41792    NM=""
41793  else
41794    case $cross_compiling:$ac_tool_warned in
41795yes:)
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41798ac_tool_warned=yes ;;
41799esac
41800    NM=$ac_ct_NM
41801  fi
41802fi
41803
41804  else
41805    # The variable is set, but is it from the command line or the environment?
41806
41807    # Try to remove the string !NM! from our list.
41808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41810      # If it failed, the variable was not from the command line. Ignore it,
41811      # but warn the user (except for BASH, which is always set by the calling BASH).
41812      if test "xNM" != xBASH; then
41813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41814$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41815      fi
41816      # Try to locate tool using the code snippet
41817      if test -n "$ac_tool_prefix"; then
41818  for ac_prog in nm gcc-nm
41819  do
41820    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41823$as_echo_n "checking for $ac_word... " >&6; }
41824if ${ac_cv_prog_NM+:} false; then :
41825  $as_echo_n "(cached) " >&6
41826else
41827  if test -n "$NM"; then
41828  ac_cv_prog_NM="$NM" # Let the user override the test.
41829else
41830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41831for as_dir in $PATH
41832do
41833  IFS=$as_save_IFS
41834  test -z "$as_dir" && as_dir=.
41835    for ac_exec_ext in '' $ac_executable_extensions; do
41836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41837    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41839    break 2
41840  fi
41841done
41842  done
41843IFS=$as_save_IFS
41844
41845fi
41846fi
41847NM=$ac_cv_prog_NM
41848if test -n "$NM"; then
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41850$as_echo "$NM" >&6; }
41851else
41852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41853$as_echo "no" >&6; }
41854fi
41855
41856
41857    test -n "$NM" && break
41858  done
41859fi
41860if test -z "$NM"; then
41861  ac_ct_NM=$NM
41862  for ac_prog in nm gcc-nm
41863do
41864  # Extract the first word of "$ac_prog", so it can be a program name with args.
41865set dummy $ac_prog; ac_word=$2
41866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41867$as_echo_n "checking for $ac_word... " >&6; }
41868if ${ac_cv_prog_ac_ct_NM+:} false; then :
41869  $as_echo_n "(cached) " >&6
41870else
41871  if test -n "$ac_ct_NM"; then
41872  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41873else
41874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41875for as_dir in $PATH
41876do
41877  IFS=$as_save_IFS
41878  test -z "$as_dir" && as_dir=.
41879    for ac_exec_ext in '' $ac_executable_extensions; do
41880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41881    ac_cv_prog_ac_ct_NM="$ac_prog"
41882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41883    break 2
41884  fi
41885done
41886  done
41887IFS=$as_save_IFS
41888
41889fi
41890fi
41891ac_ct_NM=$ac_cv_prog_ac_ct_NM
41892if test -n "$ac_ct_NM"; then
41893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41894$as_echo "$ac_ct_NM" >&6; }
41895else
41896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41897$as_echo "no" >&6; }
41898fi
41899
41900
41901  test -n "$ac_ct_NM" && break
41902done
41903
41904  if test "x$ac_ct_NM" = x; then
41905    NM=""
41906  else
41907    case $cross_compiling:$ac_tool_warned in
41908yes:)
41909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41911ac_tool_warned=yes ;;
41912esac
41913    NM=$ac_ct_NM
41914  fi
41915fi
41916
41917    else
41918      # If it succeeded, then it was overridden by the user. We will use it
41919      # for the tool.
41920
41921      # First remove it from the list of overridden variables, so we can test
41922      # for unknown variables in the end.
41923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41924
41925      # Check if we try to supply an empty value
41926      if test "x$NM" = x; then
41927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41928$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41930$as_echo_n "checking for NM... " >&6; }
41931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41932$as_echo "disabled" >&6; }
41933      else
41934        # Check if the provided tool contains a complete path.
41935        tool_specified="$NM"
41936        tool_basename="${tool_specified##*/}"
41937        if test "x$tool_basename" = "x$tool_specified"; then
41938          # A command without a complete path is provided, search $PATH.
41939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41940$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41941          # Extract the first word of "$tool_basename", so it can be a program name with args.
41942set dummy $tool_basename; ac_word=$2
41943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41944$as_echo_n "checking for $ac_word... " >&6; }
41945if ${ac_cv_path_NM+:} false; then :
41946  $as_echo_n "(cached) " >&6
41947else
41948  case $NM in
41949  [\\/]* | ?:[\\/]*)
41950  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41951  ;;
41952  *)
41953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41954for as_dir in $PATH
41955do
41956  IFS=$as_save_IFS
41957  test -z "$as_dir" && as_dir=.
41958    for ac_exec_ext in '' $ac_executable_extensions; do
41959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41960    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41962    break 2
41963  fi
41964done
41965  done
41966IFS=$as_save_IFS
41967
41968  ;;
41969esac
41970fi
41971NM=$ac_cv_path_NM
41972if test -n "$NM"; then
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41974$as_echo "$NM" >&6; }
41975else
41976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41977$as_echo "no" >&6; }
41978fi
41979
41980
41981          if test "x$NM" = x; then
41982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41983          fi
41984        else
41985          # Otherwise we believe it is a complete path. Use it as it is.
41986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41987$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41989$as_echo_n "checking for NM... " >&6; }
41990          if test ! -x "$tool_specified"; then
41991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41992$as_echo "not found" >&6; }
41993            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41994          fi
41995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41996$as_echo "$tool_specified" >&6; }
41997        fi
41998      fi
41999    fi
42000
42001  fi
42002
42003
42004    else
42005
42006
42007  # Publish this variable in the help.
42008
42009
42010  if [ -z "${NM+x}" ]; then
42011    # The variable is not set by user, try to locate tool using the code snippet
42012    if test -n "$ac_tool_prefix"; then
42013  for ac_prog in nm
42014  do
42015    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42016set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42018$as_echo_n "checking for $ac_word... " >&6; }
42019if ${ac_cv_prog_NM+:} false; then :
42020  $as_echo_n "(cached) " >&6
42021else
42022  if test -n "$NM"; then
42023  ac_cv_prog_NM="$NM" # Let the user override the test.
42024else
42025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42026for as_dir in $PATH
42027do
42028  IFS=$as_save_IFS
42029  test -z "$as_dir" && as_dir=.
42030    for ac_exec_ext in '' $ac_executable_extensions; do
42031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42032    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42034    break 2
42035  fi
42036done
42037  done
42038IFS=$as_save_IFS
42039
42040fi
42041fi
42042NM=$ac_cv_prog_NM
42043if test -n "$NM"; then
42044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42045$as_echo "$NM" >&6; }
42046else
42047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048$as_echo "no" >&6; }
42049fi
42050
42051
42052    test -n "$NM" && break
42053  done
42054fi
42055if test -z "$NM"; then
42056  ac_ct_NM=$NM
42057  for ac_prog in nm
42058do
42059  # Extract the first word of "$ac_prog", so it can be a program name with args.
42060set dummy $ac_prog; ac_word=$2
42061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42062$as_echo_n "checking for $ac_word... " >&6; }
42063if ${ac_cv_prog_ac_ct_NM+:} false; then :
42064  $as_echo_n "(cached) " >&6
42065else
42066  if test -n "$ac_ct_NM"; then
42067  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42068else
42069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42070for as_dir in $PATH
42071do
42072  IFS=$as_save_IFS
42073  test -z "$as_dir" && as_dir=.
42074    for ac_exec_ext in '' $ac_executable_extensions; do
42075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42076    ac_cv_prog_ac_ct_NM="$ac_prog"
42077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42078    break 2
42079  fi
42080done
42081  done
42082IFS=$as_save_IFS
42083
42084fi
42085fi
42086ac_ct_NM=$ac_cv_prog_ac_ct_NM
42087if test -n "$ac_ct_NM"; then
42088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42089$as_echo "$ac_ct_NM" >&6; }
42090else
42091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42092$as_echo "no" >&6; }
42093fi
42094
42095
42096  test -n "$ac_ct_NM" && break
42097done
42098
42099  if test "x$ac_ct_NM" = x; then
42100    NM=""
42101  else
42102    case $cross_compiling:$ac_tool_warned in
42103yes:)
42104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42106ac_tool_warned=yes ;;
42107esac
42108    NM=$ac_ct_NM
42109  fi
42110fi
42111
42112  else
42113    # The variable is set, but is it from the command line or the environment?
42114
42115    # Try to remove the string !NM! from our list.
42116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42118      # If it failed, the variable was not from the command line. Ignore it,
42119      # but warn the user (except for BASH, which is always set by the calling BASH).
42120      if test "xNM" != xBASH; then
42121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42122$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42123      fi
42124      # Try to locate tool using the code snippet
42125      if test -n "$ac_tool_prefix"; then
42126  for ac_prog in nm
42127  do
42128    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42129set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42131$as_echo_n "checking for $ac_word... " >&6; }
42132if ${ac_cv_prog_NM+:} false; then :
42133  $as_echo_n "(cached) " >&6
42134else
42135  if test -n "$NM"; then
42136  ac_cv_prog_NM="$NM" # Let the user override the test.
42137else
42138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42139for as_dir in $PATH
42140do
42141  IFS=$as_save_IFS
42142  test -z "$as_dir" && as_dir=.
42143    for ac_exec_ext in '' $ac_executable_extensions; do
42144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42145    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42147    break 2
42148  fi
42149done
42150  done
42151IFS=$as_save_IFS
42152
42153fi
42154fi
42155NM=$ac_cv_prog_NM
42156if test -n "$NM"; then
42157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42158$as_echo "$NM" >&6; }
42159else
42160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42161$as_echo "no" >&6; }
42162fi
42163
42164
42165    test -n "$NM" && break
42166  done
42167fi
42168if test -z "$NM"; then
42169  ac_ct_NM=$NM
42170  for ac_prog in nm
42171do
42172  # Extract the first word of "$ac_prog", so it can be a program name with args.
42173set dummy $ac_prog; ac_word=$2
42174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42175$as_echo_n "checking for $ac_word... " >&6; }
42176if ${ac_cv_prog_ac_ct_NM+:} false; then :
42177  $as_echo_n "(cached) " >&6
42178else
42179  if test -n "$ac_ct_NM"; then
42180  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42181else
42182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42183for as_dir in $PATH
42184do
42185  IFS=$as_save_IFS
42186  test -z "$as_dir" && as_dir=.
42187    for ac_exec_ext in '' $ac_executable_extensions; do
42188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42189    ac_cv_prog_ac_ct_NM="$ac_prog"
42190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42191    break 2
42192  fi
42193done
42194  done
42195IFS=$as_save_IFS
42196
42197fi
42198fi
42199ac_ct_NM=$ac_cv_prog_ac_ct_NM
42200if test -n "$ac_ct_NM"; then
42201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42202$as_echo "$ac_ct_NM" >&6; }
42203else
42204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42205$as_echo "no" >&6; }
42206fi
42207
42208
42209  test -n "$ac_ct_NM" && break
42210done
42211
42212  if test "x$ac_ct_NM" = x; then
42213    NM=""
42214  else
42215    case $cross_compiling:$ac_tool_warned in
42216yes:)
42217{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42218$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42219ac_tool_warned=yes ;;
42220esac
42221    NM=$ac_ct_NM
42222  fi
42223fi
42224
42225    else
42226      # If it succeeded, then it was overridden by the user. We will use it
42227      # for the tool.
42228
42229      # First remove it from the list of overridden variables, so we can test
42230      # for unknown variables in the end.
42231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42232
42233      # Check if we try to supply an empty value
42234      if test "x$NM" = x; then
42235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42236$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42238$as_echo_n "checking for NM... " >&6; }
42239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42240$as_echo "disabled" >&6; }
42241      else
42242        # Check if the provided tool contains a complete path.
42243        tool_specified="$NM"
42244        tool_basename="${tool_specified##*/}"
42245        if test "x$tool_basename" = "x$tool_specified"; then
42246          # A command without a complete path is provided, search $PATH.
42247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42248$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42249          # Extract the first word of "$tool_basename", so it can be a program name with args.
42250set dummy $tool_basename; ac_word=$2
42251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42252$as_echo_n "checking for $ac_word... " >&6; }
42253if ${ac_cv_path_NM+:} false; then :
42254  $as_echo_n "(cached) " >&6
42255else
42256  case $NM in
42257  [\\/]* | ?:[\\/]*)
42258  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42259  ;;
42260  *)
42261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42262for as_dir in $PATH
42263do
42264  IFS=$as_save_IFS
42265  test -z "$as_dir" && as_dir=.
42266    for ac_exec_ext in '' $ac_executable_extensions; do
42267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42268    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42270    break 2
42271  fi
42272done
42273  done
42274IFS=$as_save_IFS
42275
42276  ;;
42277esac
42278fi
42279NM=$ac_cv_path_NM
42280if test -n "$NM"; then
42281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42282$as_echo "$NM" >&6; }
42283else
42284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42285$as_echo "no" >&6; }
42286fi
42287
42288
42289          if test "x$NM" = x; then
42290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42291          fi
42292        else
42293          # Otherwise we believe it is a complete path. Use it as it is.
42294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42295$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42297$as_echo_n "checking for NM... " >&6; }
42298          if test ! -x "$tool_specified"; then
42299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42300$as_echo "not found" >&6; }
42301            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42302          fi
42303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42304$as_echo "$tool_specified" >&6; }
42305        fi
42306      fi
42307    fi
42308
42309  fi
42310
42311
42312    fi
42313
42314  # Only process if variable expands to non-empty
42315
42316  if test "x$NM" != x; then
42317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42318
42319  # First separate the path from the arguments. This will split at the first
42320  # space.
42321  complete="$NM"
42322  path="${complete%% *}"
42323  tmp="$complete EOL"
42324  arguments="${tmp#* }"
42325
42326  # Input might be given as Windows format, start by converting to
42327  # unix format.
42328  new_path=`$CYGPATH -u "$path"`
42329
42330  # Now try to locate executable using which
42331  new_path=`$WHICH "$new_path" 2> /dev/null`
42332  # bat and cmd files are not always considered executable in cygwin causing which
42333  # to not find them
42334  if test "x$new_path" = x \
42335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42337    new_path=`$CYGPATH -u "$path"`
42338  fi
42339  if test "x$new_path" = x; then
42340    # Oops. Which didn't find the executable.
42341    # The splitting of arguments from the executable at a space might have been incorrect,
42342    # since paths with space are more likely in Windows. Give it another try with the whole
42343    # argument.
42344    path="$complete"
42345    arguments="EOL"
42346    new_path=`$CYGPATH -u "$path"`
42347    new_path=`$WHICH "$new_path" 2> /dev/null`
42348    # bat and cmd files are not always considered executable in cygwin causing which
42349    # to not find them
42350    if test "x$new_path" = x \
42351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42353      new_path=`$CYGPATH -u "$path"`
42354    fi
42355    if test "x$new_path" = x; then
42356      # It's still not found. Now this is an unrecoverable error.
42357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42358$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42359      has_space=`$ECHO "$complete" | $GREP " "`
42360      if test "x$has_space" != x; then
42361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42363      fi
42364      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42365    fi
42366  fi
42367
42368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42371  # "foo.exe" is OK but "foo" is an error.
42372  #
42373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42374  # It is also a way to make sure we got the proper file name for the real test later on.
42375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42376  if test "x$test_shortpath" = x; then
42377    # Short path failed, file does not exist as specified.
42378    # Try adding .exe or .cmd
42379    if test -f "${new_path}.exe"; then
42380      input_to_shortpath="${new_path}.exe"
42381    elif test -f "${new_path}.cmd"; then
42382      input_to_shortpath="${new_path}.cmd"
42383    else
42384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42385$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42389    fi
42390  else
42391    input_to_shortpath="$new_path"
42392  fi
42393
42394  # Call helper function which possibly converts this using DOS-style short mode.
42395  # If so, the updated path is stored in $new_path.
42396  new_path="$input_to_shortpath"
42397
42398  input_path="$input_to_shortpath"
42399  # Check if we need to convert this using DOS-style short mode. If the path
42400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42401  # take no chances and rewrite it.
42402  # Note: m4 eats our [], so we need to use [ and ] instead.
42403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42404  if test "x$has_forbidden_chars" != x; then
42405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42409      # Going to short mode and back again did indeed matter. Since short mode is
42410      # case insensitive, let's make it lowercase to improve readability.
42411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42412      # Now convert it back to Unix-style (cygpath)
42413      input_path=`$CYGPATH -u "$shortmode_path"`
42414      new_path="$input_path"
42415    fi
42416  fi
42417
42418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42419  if test "x$test_cygdrive_prefix" = x; then
42420    # As a simple fix, exclude /usr/bin since it's not a real path.
42421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42423      # a path prefixed by /cygdrive for fixpath to work.
42424      new_path="$CYGWIN_ROOT_PATH$input_path"
42425    fi
42426  fi
42427
42428  # remove trailing .exe if any
42429  new_path="${new_path/%.exe/}"
42430
42431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42432
42433  # First separate the path from the arguments. This will split at the first
42434  # space.
42435  complete="$NM"
42436  path="${complete%% *}"
42437  tmp="$complete EOL"
42438  arguments="${tmp#* }"
42439
42440  # Input might be given as Windows format, start by converting to
42441  # unix format.
42442  new_path="$path"
42443
42444  windows_path="$new_path"
42445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42446    unix_path=`$CYGPATH -u "$windows_path"`
42447    new_path="$unix_path"
42448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42450    new_path="$unix_path"
42451  fi
42452
42453
42454  # Now try to locate executable using which
42455  new_path=`$WHICH "$new_path" 2> /dev/null`
42456
42457  if test "x$new_path" = x; then
42458    # Oops. Which didn't find the executable.
42459    # The splitting of arguments from the executable at a space might have been incorrect,
42460    # since paths with space are more likely in Windows. Give it another try with the whole
42461    # argument.
42462    path="$complete"
42463    arguments="EOL"
42464    new_path="$path"
42465
42466  windows_path="$new_path"
42467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42468    unix_path=`$CYGPATH -u "$windows_path"`
42469    new_path="$unix_path"
42470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42472    new_path="$unix_path"
42473  fi
42474
42475
42476    new_path=`$WHICH "$new_path" 2> /dev/null`
42477    # bat and cmd files are not always considered executable in MSYS causing which
42478    # to not find them
42479    if test "x$new_path" = x \
42480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42482      new_path="$path"
42483
42484  windows_path="$new_path"
42485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42486    unix_path=`$CYGPATH -u "$windows_path"`
42487    new_path="$unix_path"
42488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42490    new_path="$unix_path"
42491  fi
42492
42493    fi
42494
42495    if test "x$new_path" = x; then
42496      # It's still not found. Now this is an unrecoverable error.
42497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42498$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42499      has_space=`$ECHO "$complete" | $GREP " "`
42500      if test "x$has_space" != x; then
42501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42503      fi
42504      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42505    fi
42506  fi
42507
42508  # Now new_path has a complete unix path to the binary
42509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42510    # Keep paths in /bin as-is, but remove trailing .exe if any
42511    new_path="${new_path/%.exe/}"
42512    # Do not save /bin paths to all_fixpath_prefixes!
42513  else
42514    # Not in mixed or Windows style, start by that.
42515    new_path=`cmd //c echo $new_path`
42516
42517  input_path="$new_path"
42518  # Check if we need to convert this using DOS-style short mode. If the path
42519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42520  # take no chances and rewrite it.
42521  # Note: m4 eats our [], so we need to use [ and ] instead.
42522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42523  if test "x$has_forbidden_chars" != x; then
42524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42526  fi
42527
42528    # Output is in $new_path
42529
42530  windows_path="$new_path"
42531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42532    unix_path=`$CYGPATH -u "$windows_path"`
42533    new_path="$unix_path"
42534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42536    new_path="$unix_path"
42537  fi
42538
42539    # remove trailing .exe if any
42540    new_path="${new_path/%.exe/}"
42541
42542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42544  fi
42545
42546    else
42547      # We're on a unix platform. Hooray! :)
42548      # First separate the path from the arguments. This will split at the first
42549      # space.
42550      complete="$NM"
42551      path="${complete%% *}"
42552      tmp="$complete EOL"
42553      arguments="${tmp#* }"
42554
42555      # Cannot rely on the command "which" here since it doesn't always work.
42556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42557      if test -z "$is_absolute_path"; then
42558        # Path to executable is not absolute. Find it.
42559        IFS_save="$IFS"
42560        IFS=:
42561        for p in $PATH; do
42562          if test -f "$p/$path" && test -x "$p/$path"; then
42563            new_path="$p/$path"
42564            break
42565          fi
42566        done
42567        IFS="$IFS_save"
42568      else
42569        # This is an absolute path, we can use it without further modifications.
42570        new_path="$path"
42571      fi
42572
42573      if test "x$new_path" = x; then
42574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42575$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42576        has_space=`$ECHO "$complete" | $GREP " "`
42577        if test "x$has_space" != x; then
42578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42580        fi
42581        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42582      fi
42583    fi
42584
42585    # Now join together the path and the arguments once again
42586    if test "x$arguments" != xEOL; then
42587      new_complete="$new_path ${arguments% *}"
42588    else
42589      new_complete="$new_path"
42590    fi
42591
42592    if test "x$complete" != "x$new_complete"; then
42593      NM="$new_complete"
42594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42595$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42596    fi
42597  fi
42598
42599    GNM="$NM"
42600
42601  fi
42602
42603  # objcopy is used for moving debug symbols to separate files when
42604  # full debug symbols are enabled.
42605  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42606
42607
42608  # Publish this variable in the help.
42609
42610
42611  if [ -z "${OBJCOPY+x}" ]; then
42612    # The variable is not set by user, try to locate tool using the code snippet
42613    if test -n "$ac_tool_prefix"; then
42614  for ac_prog in gobjcopy objcopy
42615  do
42616    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42617set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_OBJCOPY+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$OBJCOPY"; then
42624  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643OBJCOPY=$ac_cv_prog_OBJCOPY
42644if test -n "$OBJCOPY"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42646$as_echo "$OBJCOPY" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653    test -n "$OBJCOPY" && break
42654  done
42655fi
42656if test -z "$OBJCOPY"; then
42657  ac_ct_OBJCOPY=$OBJCOPY
42658  for ac_prog in gobjcopy objcopy
42659do
42660  # Extract the first word of "$ac_prog", so it can be a program name with args.
42661set dummy $ac_prog; ac_word=$2
42662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42663$as_echo_n "checking for $ac_word... " >&6; }
42664if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42665  $as_echo_n "(cached) " >&6
42666else
42667  if test -n "$ac_ct_OBJCOPY"; then
42668  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42669else
42670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42671for as_dir in $PATH
42672do
42673  IFS=$as_save_IFS
42674  test -z "$as_dir" && as_dir=.
42675    for ac_exec_ext in '' $ac_executable_extensions; do
42676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42677    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42679    break 2
42680  fi
42681done
42682  done
42683IFS=$as_save_IFS
42684
42685fi
42686fi
42687ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42688if test -n "$ac_ct_OBJCOPY"; then
42689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42690$as_echo "$ac_ct_OBJCOPY" >&6; }
42691else
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42693$as_echo "no" >&6; }
42694fi
42695
42696
42697  test -n "$ac_ct_OBJCOPY" && break
42698done
42699
42700  if test "x$ac_ct_OBJCOPY" = x; then
42701    OBJCOPY=""
42702  else
42703    case $cross_compiling:$ac_tool_warned in
42704yes:)
42705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42707ac_tool_warned=yes ;;
42708esac
42709    OBJCOPY=$ac_ct_OBJCOPY
42710  fi
42711fi
42712
42713  else
42714    # The variable is set, but is it from the command line or the environment?
42715
42716    # Try to remove the string !OBJCOPY! from our list.
42717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42719      # If it failed, the variable was not from the command line. Ignore it,
42720      # but warn the user (except for BASH, which is always set by the calling BASH).
42721      if test "xOBJCOPY" != xBASH; then
42722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42723$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42724      fi
42725      # Try to locate tool using the code snippet
42726      if test -n "$ac_tool_prefix"; then
42727  for ac_prog in gobjcopy objcopy
42728  do
42729    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_OBJCOPY+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$OBJCOPY"; then
42737  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756OBJCOPY=$ac_cv_prog_OBJCOPY
42757if test -n "$OBJCOPY"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42759$as_echo "$OBJCOPY" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766    test -n "$OBJCOPY" && break
42767  done
42768fi
42769if test -z "$OBJCOPY"; then
42770  ac_ct_OBJCOPY=$OBJCOPY
42771  for ac_prog in gobjcopy objcopy
42772do
42773  # Extract the first word of "$ac_prog", so it can be a program name with args.
42774set dummy $ac_prog; ac_word=$2
42775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42776$as_echo_n "checking for $ac_word... " >&6; }
42777if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42778  $as_echo_n "(cached) " >&6
42779else
42780  if test -n "$ac_ct_OBJCOPY"; then
42781  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42782else
42783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42784for as_dir in $PATH
42785do
42786  IFS=$as_save_IFS
42787  test -z "$as_dir" && as_dir=.
42788    for ac_exec_ext in '' $ac_executable_extensions; do
42789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42790    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42792    break 2
42793  fi
42794done
42795  done
42796IFS=$as_save_IFS
42797
42798fi
42799fi
42800ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42801if test -n "$ac_ct_OBJCOPY"; then
42802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42803$as_echo "$ac_ct_OBJCOPY" >&6; }
42804else
42805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42806$as_echo "no" >&6; }
42807fi
42808
42809
42810  test -n "$ac_ct_OBJCOPY" && break
42811done
42812
42813  if test "x$ac_ct_OBJCOPY" = x; then
42814    OBJCOPY=""
42815  else
42816    case $cross_compiling:$ac_tool_warned in
42817yes:)
42818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42820ac_tool_warned=yes ;;
42821esac
42822    OBJCOPY=$ac_ct_OBJCOPY
42823  fi
42824fi
42825
42826    else
42827      # If it succeeded, then it was overridden by the user. We will use it
42828      # for the tool.
42829
42830      # First remove it from the list of overridden variables, so we can test
42831      # for unknown variables in the end.
42832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42833
42834      # Check if we try to supply an empty value
42835      if test "x$OBJCOPY" = x; then
42836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42837$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42839$as_echo_n "checking for OBJCOPY... " >&6; }
42840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42841$as_echo "disabled" >&6; }
42842      else
42843        # Check if the provided tool contains a complete path.
42844        tool_specified="$OBJCOPY"
42845        tool_basename="${tool_specified##*/}"
42846        if test "x$tool_basename" = "x$tool_specified"; then
42847          # A command without a complete path is provided, search $PATH.
42848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42849$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42850          # Extract the first word of "$tool_basename", so it can be a program name with args.
42851set dummy $tool_basename; ac_word=$2
42852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42853$as_echo_n "checking for $ac_word... " >&6; }
42854if ${ac_cv_path_OBJCOPY+:} false; then :
42855  $as_echo_n "(cached) " >&6
42856else
42857  case $OBJCOPY in
42858  [\\/]* | ?:[\\/]*)
42859  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42860  ;;
42861  *)
42862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42863for as_dir in $PATH
42864do
42865  IFS=$as_save_IFS
42866  test -z "$as_dir" && as_dir=.
42867    for ac_exec_ext in '' $ac_executable_extensions; do
42868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42869    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42871    break 2
42872  fi
42873done
42874  done
42875IFS=$as_save_IFS
42876
42877  ;;
42878esac
42879fi
42880OBJCOPY=$ac_cv_path_OBJCOPY
42881if test -n "$OBJCOPY"; then
42882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42883$as_echo "$OBJCOPY" >&6; }
42884else
42885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42886$as_echo "no" >&6; }
42887fi
42888
42889
42890          if test "x$OBJCOPY" = x; then
42891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42892          fi
42893        else
42894          # Otherwise we believe it is a complete path. Use it as it is.
42895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42896$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42898$as_echo_n "checking for OBJCOPY... " >&6; }
42899          if test ! -x "$tool_specified"; then
42900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42901$as_echo "not found" >&6; }
42902            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42903          fi
42904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42905$as_echo "$tool_specified" >&6; }
42906        fi
42907      fi
42908    fi
42909
42910  fi
42911
42912
42913    # Only call fixup if objcopy was found.
42914    if test -n "$OBJCOPY"; then
42915
42916  # Only process if variable expands to non-empty
42917
42918  if test "x$OBJCOPY" != x; then
42919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42920
42921  # First separate the path from the arguments. This will split at the first
42922  # space.
42923  complete="$OBJCOPY"
42924  path="${complete%% *}"
42925  tmp="$complete EOL"
42926  arguments="${tmp#* }"
42927
42928  # Input might be given as Windows format, start by converting to
42929  # unix format.
42930  new_path=`$CYGPATH -u "$path"`
42931
42932  # Now try to locate executable using which
42933  new_path=`$WHICH "$new_path" 2> /dev/null`
42934  # bat and cmd files are not always considered executable in cygwin causing which
42935  # to not find them
42936  if test "x$new_path" = x \
42937      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42938      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42939    new_path=`$CYGPATH -u "$path"`
42940  fi
42941  if test "x$new_path" = x; then
42942    # Oops. Which didn't find the executable.
42943    # The splitting of arguments from the executable at a space might have been incorrect,
42944    # since paths with space are more likely in Windows. Give it another try with the whole
42945    # argument.
42946    path="$complete"
42947    arguments="EOL"
42948    new_path=`$CYGPATH -u "$path"`
42949    new_path=`$WHICH "$new_path" 2> /dev/null`
42950    # bat and cmd files are not always considered executable in cygwin causing which
42951    # to not find them
42952    if test "x$new_path" = x \
42953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42955      new_path=`$CYGPATH -u "$path"`
42956    fi
42957    if test "x$new_path" = x; then
42958      # It's still not found. Now this is an unrecoverable error.
42959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42960$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42961      has_space=`$ECHO "$complete" | $GREP " "`
42962      if test "x$has_space" != x; then
42963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42965      fi
42966      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42967    fi
42968  fi
42969
42970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42973  # "foo.exe" is OK but "foo" is an error.
42974  #
42975  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42976  # It is also a way to make sure we got the proper file name for the real test later on.
42977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42978  if test "x$test_shortpath" = x; then
42979    # Short path failed, file does not exist as specified.
42980    # Try adding .exe or .cmd
42981    if test -f "${new_path}.exe"; then
42982      input_to_shortpath="${new_path}.exe"
42983    elif test -f "${new_path}.cmd"; then
42984      input_to_shortpath="${new_path}.cmd"
42985    else
42986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42987$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42990      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42991    fi
42992  else
42993    input_to_shortpath="$new_path"
42994  fi
42995
42996  # Call helper function which possibly converts this using DOS-style short mode.
42997  # If so, the updated path is stored in $new_path.
42998  new_path="$input_to_shortpath"
42999
43000  input_path="$input_to_shortpath"
43001  # Check if we need to convert this using DOS-style short mode. If the path
43002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43003  # take no chances and rewrite it.
43004  # Note: m4 eats our [], so we need to use [ and ] instead.
43005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43006  if test "x$has_forbidden_chars" != x; then
43007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43011      # Going to short mode and back again did indeed matter. Since short mode is
43012      # case insensitive, let's make it lowercase to improve readability.
43013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43014      # Now convert it back to Unix-style (cygpath)
43015      input_path=`$CYGPATH -u "$shortmode_path"`
43016      new_path="$input_path"
43017    fi
43018  fi
43019
43020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43021  if test "x$test_cygdrive_prefix" = x; then
43022    # As a simple fix, exclude /usr/bin since it's not a real path.
43023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43025      # a path prefixed by /cygdrive for fixpath to work.
43026      new_path="$CYGWIN_ROOT_PATH$input_path"
43027    fi
43028  fi
43029
43030  # remove trailing .exe if any
43031  new_path="${new_path/%.exe/}"
43032
43033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43034
43035  # First separate the path from the arguments. This will split at the first
43036  # space.
43037  complete="$OBJCOPY"
43038  path="${complete%% *}"
43039  tmp="$complete EOL"
43040  arguments="${tmp#* }"
43041
43042  # Input might be given as Windows format, start by converting to
43043  # unix format.
43044  new_path="$path"
43045
43046  windows_path="$new_path"
43047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43048    unix_path=`$CYGPATH -u "$windows_path"`
43049    new_path="$unix_path"
43050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43052    new_path="$unix_path"
43053  fi
43054
43055
43056  # Now try to locate executable using which
43057  new_path=`$WHICH "$new_path" 2> /dev/null`
43058
43059  if test "x$new_path" = x; then
43060    # Oops. Which didn't find the executable.
43061    # The splitting of arguments from the executable at a space might have been incorrect,
43062    # since paths with space are more likely in Windows. Give it another try with the whole
43063    # argument.
43064    path="$complete"
43065    arguments="EOL"
43066    new_path="$path"
43067
43068  windows_path="$new_path"
43069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43070    unix_path=`$CYGPATH -u "$windows_path"`
43071    new_path="$unix_path"
43072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43074    new_path="$unix_path"
43075  fi
43076
43077
43078    new_path=`$WHICH "$new_path" 2> /dev/null`
43079    # bat and cmd files are not always considered executable in MSYS causing which
43080    # to not find them
43081    if test "x$new_path" = x \
43082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43084      new_path="$path"
43085
43086  windows_path="$new_path"
43087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43088    unix_path=`$CYGPATH -u "$windows_path"`
43089    new_path="$unix_path"
43090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43092    new_path="$unix_path"
43093  fi
43094
43095    fi
43096
43097    if test "x$new_path" = x; then
43098      # It's still not found. Now this is an unrecoverable error.
43099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43100$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43101      has_space=`$ECHO "$complete" | $GREP " "`
43102      if test "x$has_space" != x; then
43103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43105      fi
43106      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43107    fi
43108  fi
43109
43110  # Now new_path has a complete unix path to the binary
43111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43112    # Keep paths in /bin as-is, but remove trailing .exe if any
43113    new_path="${new_path/%.exe/}"
43114    # Do not save /bin paths to all_fixpath_prefixes!
43115  else
43116    # Not in mixed or Windows style, start by that.
43117    new_path=`cmd //c echo $new_path`
43118
43119  input_path="$new_path"
43120  # Check if we need to convert this using DOS-style short mode. If the path
43121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43122  # take no chances and rewrite it.
43123  # Note: m4 eats our [], so we need to use [ and ] instead.
43124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43125  if test "x$has_forbidden_chars" != x; then
43126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43128  fi
43129
43130    # Output is in $new_path
43131
43132  windows_path="$new_path"
43133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43134    unix_path=`$CYGPATH -u "$windows_path"`
43135    new_path="$unix_path"
43136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43138    new_path="$unix_path"
43139  fi
43140
43141    # remove trailing .exe if any
43142    new_path="${new_path/%.exe/}"
43143
43144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43146  fi
43147
43148    else
43149      # We're on a unix platform. Hooray! :)
43150      # First separate the path from the arguments. This will split at the first
43151      # space.
43152      complete="$OBJCOPY"
43153      path="${complete%% *}"
43154      tmp="$complete EOL"
43155      arguments="${tmp#* }"
43156
43157      # Cannot rely on the command "which" here since it doesn't always work.
43158      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43159      if test -z "$is_absolute_path"; then
43160        # Path to executable is not absolute. Find it.
43161        IFS_save="$IFS"
43162        IFS=:
43163        for p in $PATH; do
43164          if test -f "$p/$path" && test -x "$p/$path"; then
43165            new_path="$p/$path"
43166            break
43167          fi
43168        done
43169        IFS="$IFS_save"
43170      else
43171        # This is an absolute path, we can use it without further modifications.
43172        new_path="$path"
43173      fi
43174
43175      if test "x$new_path" = x; then
43176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43177$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43178        has_space=`$ECHO "$complete" | $GREP " "`
43179        if test "x$has_space" != x; then
43180          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43182        fi
43183        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43184      fi
43185    fi
43186
43187    # Now join together the path and the arguments once again
43188    if test "x$arguments" != xEOL; then
43189      new_complete="$new_path ${arguments% *}"
43190    else
43191      new_complete="$new_path"
43192    fi
43193
43194    if test "x$complete" != "x$new_complete"; then
43195      OBJCOPY="$new_complete"
43196      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43197$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43198    fi
43199  fi
43200
43201      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43202        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43203        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43204        # - version number is last blank separate word on first line
43205        # - version number formats that have been seen:
43206        #   - <major>.<minor>
43207        #   - <major>.<minor>.<micro>
43208        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43209        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43210         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43211              -e 's/.* //' \
43212              -e '/^[01]\./b bad' \
43213              -e '/^2\./{' \
43214              -e '  s/^2\.//' \
43215              -e '  /^[0-9]$/b bad' \
43216              -e '  /^[0-9]\./b bad' \
43217              -e '  /^1[0-9]$/b bad' \
43218              -e '  /^1[0-9]\./b bad' \
43219              -e '  /^20\./b bad' \
43220              -e '  /^21\.0$/b bad' \
43221              -e '  /^21\.0\./b bad' \
43222              -e '}' \
43223              -e ':good' \
43224              -e 's/.*/VALID_VERSION/p' \
43225              -e 'q' \
43226              -e ':bad' \
43227              -e 's/.*/BAD_VERSION/p' \
43228              -e 'q'`
43229        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43230          OBJCOPY=
43231          { $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
43232$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43233          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43234$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43235          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43236$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43237          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43238$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43239          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43240$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43241        fi
43242      fi
43243    fi
43244  fi
43245
43246
43247
43248  # Publish this variable in the help.
43249
43250
43251  if [ -z "${OBJDUMP+x}" ]; then
43252    # The variable is not set by user, try to locate tool using the code snippet
43253    if test -n "$ac_tool_prefix"; then
43254  for ac_prog in gobjdump objdump
43255  do
43256    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43257set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259$as_echo_n "checking for $ac_word... " >&6; }
43260if ${ac_cv_prog_OBJDUMP+:} false; then :
43261  $as_echo_n "(cached) " >&6
43262else
43263  if test -n "$OBJDUMP"; then
43264  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43265else
43266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43267for as_dir in $PATH
43268do
43269  IFS=$as_save_IFS
43270  test -z "$as_dir" && as_dir=.
43271    for ac_exec_ext in '' $ac_executable_extensions; do
43272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43273    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43275    break 2
43276  fi
43277done
43278  done
43279IFS=$as_save_IFS
43280
43281fi
43282fi
43283OBJDUMP=$ac_cv_prog_OBJDUMP
43284if test -n "$OBJDUMP"; then
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43286$as_echo "$OBJDUMP" >&6; }
43287else
43288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43289$as_echo "no" >&6; }
43290fi
43291
43292
43293    test -n "$OBJDUMP" && break
43294  done
43295fi
43296if test -z "$OBJDUMP"; then
43297  ac_ct_OBJDUMP=$OBJDUMP
43298  for ac_prog in gobjdump objdump
43299do
43300  # Extract the first word of "$ac_prog", so it can be a program name with args.
43301set dummy $ac_prog; ac_word=$2
43302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43303$as_echo_n "checking for $ac_word... " >&6; }
43304if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43305  $as_echo_n "(cached) " >&6
43306else
43307  if test -n "$ac_ct_OBJDUMP"; then
43308  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43309else
43310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43311for as_dir in $PATH
43312do
43313  IFS=$as_save_IFS
43314  test -z "$as_dir" && as_dir=.
43315    for ac_exec_ext in '' $ac_executable_extensions; do
43316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43317    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43319    break 2
43320  fi
43321done
43322  done
43323IFS=$as_save_IFS
43324
43325fi
43326fi
43327ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43328if test -n "$ac_ct_OBJDUMP"; then
43329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43330$as_echo "$ac_ct_OBJDUMP" >&6; }
43331else
43332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43333$as_echo "no" >&6; }
43334fi
43335
43336
43337  test -n "$ac_ct_OBJDUMP" && break
43338done
43339
43340  if test "x$ac_ct_OBJDUMP" = x; then
43341    OBJDUMP=""
43342  else
43343    case $cross_compiling:$ac_tool_warned in
43344yes:)
43345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43347ac_tool_warned=yes ;;
43348esac
43349    OBJDUMP=$ac_ct_OBJDUMP
43350  fi
43351fi
43352
43353  else
43354    # The variable is set, but is it from the command line or the environment?
43355
43356    # Try to remove the string !OBJDUMP! from our list.
43357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43359      # If it failed, the variable was not from the command line. Ignore it,
43360      # but warn the user (except for BASH, which is always set by the calling BASH).
43361      if test "xOBJDUMP" != xBASH; then
43362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43363$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43364      fi
43365      # Try to locate tool using the code snippet
43366      if test -n "$ac_tool_prefix"; then
43367  for ac_prog in gobjdump objdump
43368  do
43369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43372$as_echo_n "checking for $ac_word... " >&6; }
43373if ${ac_cv_prog_OBJDUMP+:} false; then :
43374  $as_echo_n "(cached) " >&6
43375else
43376  if test -n "$OBJDUMP"; then
43377  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43378else
43379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43380for as_dir in $PATH
43381do
43382  IFS=$as_save_IFS
43383  test -z "$as_dir" && as_dir=.
43384    for ac_exec_ext in '' $ac_executable_extensions; do
43385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43386    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43388    break 2
43389  fi
43390done
43391  done
43392IFS=$as_save_IFS
43393
43394fi
43395fi
43396OBJDUMP=$ac_cv_prog_OBJDUMP
43397if test -n "$OBJDUMP"; then
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43399$as_echo "$OBJDUMP" >&6; }
43400else
43401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43402$as_echo "no" >&6; }
43403fi
43404
43405
43406    test -n "$OBJDUMP" && break
43407  done
43408fi
43409if test -z "$OBJDUMP"; then
43410  ac_ct_OBJDUMP=$OBJDUMP
43411  for ac_prog in gobjdump objdump
43412do
43413  # Extract the first word of "$ac_prog", so it can be a program name with args.
43414set dummy $ac_prog; ac_word=$2
43415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43416$as_echo_n "checking for $ac_word... " >&6; }
43417if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43418  $as_echo_n "(cached) " >&6
43419else
43420  if test -n "$ac_ct_OBJDUMP"; then
43421  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43422else
43423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43424for as_dir in $PATH
43425do
43426  IFS=$as_save_IFS
43427  test -z "$as_dir" && as_dir=.
43428    for ac_exec_ext in '' $ac_executable_extensions; do
43429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43430    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43432    break 2
43433  fi
43434done
43435  done
43436IFS=$as_save_IFS
43437
43438fi
43439fi
43440ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43441if test -n "$ac_ct_OBJDUMP"; then
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43443$as_echo "$ac_ct_OBJDUMP" >&6; }
43444else
43445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43446$as_echo "no" >&6; }
43447fi
43448
43449
43450  test -n "$ac_ct_OBJDUMP" && break
43451done
43452
43453  if test "x$ac_ct_OBJDUMP" = x; then
43454    OBJDUMP=""
43455  else
43456    case $cross_compiling:$ac_tool_warned in
43457yes:)
43458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43460ac_tool_warned=yes ;;
43461esac
43462    OBJDUMP=$ac_ct_OBJDUMP
43463  fi
43464fi
43465
43466    else
43467      # If it succeeded, then it was overridden by the user. We will use it
43468      # for the tool.
43469
43470      # First remove it from the list of overridden variables, so we can test
43471      # for unknown variables in the end.
43472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43473
43474      # Check if we try to supply an empty value
43475      if test "x$OBJDUMP" = x; then
43476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43477$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43479$as_echo_n "checking for OBJDUMP... " >&6; }
43480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43481$as_echo "disabled" >&6; }
43482      else
43483        # Check if the provided tool contains a complete path.
43484        tool_specified="$OBJDUMP"
43485        tool_basename="${tool_specified##*/}"
43486        if test "x$tool_basename" = "x$tool_specified"; then
43487          # A command without a complete path is provided, search $PATH.
43488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43489$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43490          # Extract the first word of "$tool_basename", so it can be a program name with args.
43491set dummy $tool_basename; ac_word=$2
43492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43493$as_echo_n "checking for $ac_word... " >&6; }
43494if ${ac_cv_path_OBJDUMP+:} false; then :
43495  $as_echo_n "(cached) " >&6
43496else
43497  case $OBJDUMP in
43498  [\\/]* | ?:[\\/]*)
43499  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43500  ;;
43501  *)
43502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43503for as_dir in $PATH
43504do
43505  IFS=$as_save_IFS
43506  test -z "$as_dir" && as_dir=.
43507    for ac_exec_ext in '' $ac_executable_extensions; do
43508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43509    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43511    break 2
43512  fi
43513done
43514  done
43515IFS=$as_save_IFS
43516
43517  ;;
43518esac
43519fi
43520OBJDUMP=$ac_cv_path_OBJDUMP
43521if test -n "$OBJDUMP"; then
43522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43523$as_echo "$OBJDUMP" >&6; }
43524else
43525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43526$as_echo "no" >&6; }
43527fi
43528
43529
43530          if test "x$OBJDUMP" = x; then
43531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43532          fi
43533        else
43534          # Otherwise we believe it is a complete path. Use it as it is.
43535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43536$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43538$as_echo_n "checking for OBJDUMP... " >&6; }
43539          if test ! -x "$tool_specified"; then
43540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43541$as_echo "not found" >&6; }
43542            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43543          fi
43544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43545$as_echo "$tool_specified" >&6; }
43546        fi
43547      fi
43548    fi
43549
43550  fi
43551
43552
43553  if test "x$OBJDUMP" != x; then
43554    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43555    # bails if argument is missing.
43556
43557  # Only process if variable expands to non-empty
43558
43559  if test "x$OBJDUMP" != x; then
43560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43561
43562  # First separate the path from the arguments. This will split at the first
43563  # space.
43564  complete="$OBJDUMP"
43565  path="${complete%% *}"
43566  tmp="$complete EOL"
43567  arguments="${tmp#* }"
43568
43569  # Input might be given as Windows format, start by converting to
43570  # unix format.
43571  new_path=`$CYGPATH -u "$path"`
43572
43573  # Now try to locate executable using which
43574  new_path=`$WHICH "$new_path" 2> /dev/null`
43575  # bat and cmd files are not always considered executable in cygwin causing which
43576  # to not find them
43577  if test "x$new_path" = x \
43578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43580    new_path=`$CYGPATH -u "$path"`
43581  fi
43582  if test "x$new_path" = x; then
43583    # Oops. Which didn't find the executable.
43584    # The splitting of arguments from the executable at a space might have been incorrect,
43585    # since paths with space are more likely in Windows. Give it another try with the whole
43586    # argument.
43587    path="$complete"
43588    arguments="EOL"
43589    new_path=`$CYGPATH -u "$path"`
43590    new_path=`$WHICH "$new_path" 2> /dev/null`
43591    # bat and cmd files are not always considered executable in cygwin causing which
43592    # to not find them
43593    if test "x$new_path" = x \
43594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43596      new_path=`$CYGPATH -u "$path"`
43597    fi
43598    if test "x$new_path" = x; then
43599      # It's still not found. Now this is an unrecoverable error.
43600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43601$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43602      has_space=`$ECHO "$complete" | $GREP " "`
43603      if test "x$has_space" != x; then
43604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43606      fi
43607      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43608    fi
43609  fi
43610
43611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43614  # "foo.exe" is OK but "foo" is an error.
43615  #
43616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43617  # It is also a way to make sure we got the proper file name for the real test later on.
43618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43619  if test "x$test_shortpath" = x; then
43620    # Short path failed, file does not exist as specified.
43621    # Try adding .exe or .cmd
43622    if test -f "${new_path}.exe"; then
43623      input_to_shortpath="${new_path}.exe"
43624    elif test -f "${new_path}.cmd"; then
43625      input_to_shortpath="${new_path}.cmd"
43626    else
43627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43628$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43631      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43632    fi
43633  else
43634    input_to_shortpath="$new_path"
43635  fi
43636
43637  # Call helper function which possibly converts this using DOS-style short mode.
43638  # If so, the updated path is stored in $new_path.
43639  new_path="$input_to_shortpath"
43640
43641  input_path="$input_to_shortpath"
43642  # Check if we need to convert this using DOS-style short mode. If the path
43643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43644  # take no chances and rewrite it.
43645  # Note: m4 eats our [], so we need to use [ and ] instead.
43646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43647  if test "x$has_forbidden_chars" != x; then
43648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43652      # Going to short mode and back again did indeed matter. Since short mode is
43653      # case insensitive, let's make it lowercase to improve readability.
43654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43655      # Now convert it back to Unix-style (cygpath)
43656      input_path=`$CYGPATH -u "$shortmode_path"`
43657      new_path="$input_path"
43658    fi
43659  fi
43660
43661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43662  if test "x$test_cygdrive_prefix" = x; then
43663    # As a simple fix, exclude /usr/bin since it's not a real path.
43664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43666      # a path prefixed by /cygdrive for fixpath to work.
43667      new_path="$CYGWIN_ROOT_PATH$input_path"
43668    fi
43669  fi
43670
43671  # remove trailing .exe if any
43672  new_path="${new_path/%.exe/}"
43673
43674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43675
43676  # First separate the path from the arguments. This will split at the first
43677  # space.
43678  complete="$OBJDUMP"
43679  path="${complete%% *}"
43680  tmp="$complete EOL"
43681  arguments="${tmp#* }"
43682
43683  # Input might be given as Windows format, start by converting to
43684  # unix format.
43685  new_path="$path"
43686
43687  windows_path="$new_path"
43688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43689    unix_path=`$CYGPATH -u "$windows_path"`
43690    new_path="$unix_path"
43691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43693    new_path="$unix_path"
43694  fi
43695
43696
43697  # Now try to locate executable using which
43698  new_path=`$WHICH "$new_path" 2> /dev/null`
43699
43700  if test "x$new_path" = x; then
43701    # Oops. Which didn't find the executable.
43702    # The splitting of arguments from the executable at a space might have been incorrect,
43703    # since paths with space are more likely in Windows. Give it another try with the whole
43704    # argument.
43705    path="$complete"
43706    arguments="EOL"
43707    new_path="$path"
43708
43709  windows_path="$new_path"
43710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43711    unix_path=`$CYGPATH -u "$windows_path"`
43712    new_path="$unix_path"
43713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43715    new_path="$unix_path"
43716  fi
43717
43718
43719    new_path=`$WHICH "$new_path" 2> /dev/null`
43720    # bat and cmd files are not always considered executable in MSYS causing which
43721    # to not find them
43722    if test "x$new_path" = x \
43723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43725      new_path="$path"
43726
43727  windows_path="$new_path"
43728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729    unix_path=`$CYGPATH -u "$windows_path"`
43730    new_path="$unix_path"
43731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43733    new_path="$unix_path"
43734  fi
43735
43736    fi
43737
43738    if test "x$new_path" = x; then
43739      # It's still not found. Now this is an unrecoverable error.
43740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43741$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43742      has_space=`$ECHO "$complete" | $GREP " "`
43743      if test "x$has_space" != x; then
43744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43746      fi
43747      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43748    fi
43749  fi
43750
43751  # Now new_path has a complete unix path to the binary
43752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43753    # Keep paths in /bin as-is, but remove trailing .exe if any
43754    new_path="${new_path/%.exe/}"
43755    # Do not save /bin paths to all_fixpath_prefixes!
43756  else
43757    # Not in mixed or Windows style, start by that.
43758    new_path=`cmd //c echo $new_path`
43759
43760  input_path="$new_path"
43761  # Check if we need to convert this using DOS-style short mode. If the path
43762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43763  # take no chances and rewrite it.
43764  # Note: m4 eats our [], so we need to use [ and ] instead.
43765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43766  if test "x$has_forbidden_chars" != x; then
43767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43769  fi
43770
43771    # Output is in $new_path
43772
43773  windows_path="$new_path"
43774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43775    unix_path=`$CYGPATH -u "$windows_path"`
43776    new_path="$unix_path"
43777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43779    new_path="$unix_path"
43780  fi
43781
43782    # remove trailing .exe if any
43783    new_path="${new_path/%.exe/}"
43784
43785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43787  fi
43788
43789    else
43790      # We're on a unix platform. Hooray! :)
43791      # First separate the path from the arguments. This will split at the first
43792      # space.
43793      complete="$OBJDUMP"
43794      path="${complete%% *}"
43795      tmp="$complete EOL"
43796      arguments="${tmp#* }"
43797
43798      # Cannot rely on the command "which" here since it doesn't always work.
43799      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43800      if test -z "$is_absolute_path"; then
43801        # Path to executable is not absolute. Find it.
43802        IFS_save="$IFS"
43803        IFS=:
43804        for p in $PATH; do
43805          if test -f "$p/$path" && test -x "$p/$path"; then
43806            new_path="$p/$path"
43807            break
43808          fi
43809        done
43810        IFS="$IFS_save"
43811      else
43812        # This is an absolute path, we can use it without further modifications.
43813        new_path="$path"
43814      fi
43815
43816      if test "x$new_path" = x; then
43817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43818$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43819        has_space=`$ECHO "$complete" | $GREP " "`
43820        if test "x$has_space" != x; then
43821          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43823        fi
43824        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43825      fi
43826    fi
43827
43828    # Now join together the path and the arguments once again
43829    if test "x$arguments" != xEOL; then
43830      new_complete="$new_path ${arguments% *}"
43831    else
43832      new_complete="$new_path"
43833    fi
43834
43835    if test "x$complete" != "x$new_complete"; then
43836      OBJDUMP="$new_complete"
43837      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43838$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43839    fi
43840  fi
43841
43842  fi
43843
43844
43845  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43846  # to remain in place. Otherwise the compiler will not work in some siutations
43847  # in later configure checks.
43848  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43849    PATH="$OLD_PATH"
43850  fi
43851
43852  # Restore the flags to the user specified values.
43853  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43854  CFLAGS="$ORG_CFLAGS"
43855  CXXFLAGS="$ORG_CXXFLAGS"
43856
43857
43858# Finally do some processing after the detection phase
43859
43860  if test "x$COMPILE_TYPE" = "xcross"; then
43861    # Now we need to find a C/C++ compiler that can build executables for the
43862    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43863    # used once. Also, we need to do this without adding a tools dir to the
43864    # path, otherwise we might pick up cross-compilers which don't use standard
43865    # naming.
43866
43867    OLDPATH="$PATH"
43868
43869
43870# Check whether --with-build-devkit was given.
43871if test "${with_build_devkit+set}" = set; then :
43872  withval=$with_build_devkit;
43873fi
43874
43875    if test "x$with_build_devkit" = "xyes"; then
43876      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43877    elif test -n "$with_build_devkit"; then
43878      if test ! -d "$with_build_devkit"; then
43879        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43880      else
43881
43882  # Only process if variable expands to non-empty
43883
43884  if test "x$with_build_devkit" != x; then
43885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43886
43887  # Input might be given as Windows format, start by converting to
43888  # unix format.
43889  path="$with_build_devkit"
43890  new_path=`$CYGPATH -u "$path"`
43891
43892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43895  # "foo.exe" is OK but "foo" is an error.
43896  #
43897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43898  # It is also a way to make sure we got the proper file name for the real test later on.
43899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43900  if test "x$test_shortpath" = x; then
43901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43902$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43903    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43904  fi
43905
43906  # Call helper function which possibly converts this using DOS-style short mode.
43907  # If so, the updated path is stored in $new_path.
43908
43909  input_path="$new_path"
43910  # Check if we need to convert this using DOS-style short mode. If the path
43911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43912  # take no chances and rewrite it.
43913  # Note: m4 eats our [], so we need to use [ and ] instead.
43914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43915  if test "x$has_forbidden_chars" != x; then
43916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43920      # Going to short mode and back again did indeed matter. Since short mode is
43921      # case insensitive, let's make it lowercase to improve readability.
43922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43923      # Now convert it back to Unix-style (cygpath)
43924      input_path=`$CYGPATH -u "$shortmode_path"`
43925      new_path="$input_path"
43926    fi
43927  fi
43928
43929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43930  if test "x$test_cygdrive_prefix" = x; then
43931    # As a simple fix, exclude /usr/bin since it's not a real path.
43932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43934      # a path prefixed by /cygdrive for fixpath to work.
43935      new_path="$CYGWIN_ROOT_PATH$input_path"
43936    fi
43937  fi
43938
43939
43940  if test "x$path" != "x$new_path"; then
43941    with_build_devkit="$new_path"
43942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43943$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43944  fi
43945
43946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43947
43948  path="$with_build_devkit"
43949  has_colon=`$ECHO $path | $GREP ^.:`
43950  new_path="$path"
43951  if test "x$has_colon" = x; then
43952    # Not in mixed or Windows style, start by that.
43953    new_path=`cmd //c echo $path`
43954  fi
43955
43956
43957  input_path="$new_path"
43958  # Check if we need to convert this using DOS-style short mode. If the path
43959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43960  # take no chances and rewrite it.
43961  # Note: m4 eats our [], so we need to use [ and ] instead.
43962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43963  if test "x$has_forbidden_chars" != x; then
43964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43966  fi
43967
43968
43969  windows_path="$new_path"
43970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43971    unix_path=`$CYGPATH -u "$windows_path"`
43972    new_path="$unix_path"
43973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43975    new_path="$unix_path"
43976  fi
43977
43978  if test "x$path" != "x$new_path"; then
43979    with_build_devkit="$new_path"
43980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43981$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43982  fi
43983
43984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43986
43987    else
43988      # We're on a unix platform. Hooray! :)
43989      path="$with_build_devkit"
43990      has_space=`$ECHO "$path" | $GREP " "`
43991      if test "x$has_space" != x; then
43992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43993$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43995      fi
43996
43997      # Use eval to expand a potential ~
43998      eval path="$path"
43999      if test ! -f "$path" && test ! -d "$path"; then
44000        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44001      fi
44002
44003      if test -d "$path"; then
44004        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44005      else
44006        dir="`$DIRNAME "$path"`"
44007        base="`$BASENAME "$path"`"
44008        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44009      fi
44010    fi
44011  fi
44012
44013        BUILD_DEVKIT_ROOT="$with_build_devkit"
44014        # Check for a meta data info file in the root of the devkit
44015        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44016          # Process devkit.info so that existing devkit variables are not
44017          # modified by this
44018          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44019              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44020              -e "s/\$host/\$build/g" \
44021              $BUILD_DEVKIT_ROOT/devkit.info \
44022              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44023          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44024          # This potentially sets the following:
44025          # A descriptive name of the devkit
44026
44027  if test "x$BUILD_DEVKIT_NAME" = x; then
44028    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44029  fi
44030
44031          # Corresponds to --with-extra-path
44032
44033  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44034    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44035  fi
44036
44037          # Corresponds to --with-toolchain-path
44038
44039  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44040    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44041  fi
44042
44043          # Corresponds to --with-sysroot
44044
44045  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44046    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44047  fi
44048
44049          # Skip the Window specific parts
44050        fi
44051
44052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44053$as_echo_n "checking for build platform devkit... " >&6; }
44054        if test "x$BUILD_DEVKIT_NAME" != x; then
44055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44056$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44057        else
44058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44059$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44060        fi
44061
44062        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44063
44064  if test "x$BUILD_SYSROOT" != "x"; then
44065    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44066      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44067        # Solaris Studio does not have a concept of sysroot. Instead we must
44068        # make sure the default include and lib dirs are appended to each
44069        # compile and link command line. Must also add -I-xbuiltin to enable
44070        # inlining of system functions and intrinsics.
44071        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44072        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44073            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44074      fi
44075    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44076      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44077      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44078    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44079      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44080      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44081    fi
44082    # The global CFLAGS and LDFLAGS variables need these for configure to function
44083    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44084    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44085    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44086    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44087  fi
44088
44089  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44090    # We also need -iframework<path>/System/Library/Frameworks
44091    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44092    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44093    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44094    # set this here so it doesn't have to be peppered throughout the forest
44095    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44096    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44097  fi
44098
44099
44100
44101
44102
44103         # Fallback default of just /bin if DEVKIT_PATH is not defined
44104        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44105          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44106        fi
44107        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44108      fi
44109    fi
44110
44111    # FIXME: we should list the discovered compilers as an exclude pattern!
44112    # If we do that, we can do this detection before POST_DETECTION, and still
44113    # find the build compilers in the tools dir, if needed.
44114
44115
44116
44117  # Publish this variable in the help.
44118
44119
44120  if [ -z "${BUILD_CC+x}" ]; then
44121    # The variable is not set by user, try to locate tool using the code snippet
44122    for ac_prog in cl cc gcc
44123do
44124  # Extract the first word of "$ac_prog", so it can be a program name with args.
44125set dummy $ac_prog; ac_word=$2
44126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44127$as_echo_n "checking for $ac_word... " >&6; }
44128if ${ac_cv_path_BUILD_CC+:} false; then :
44129  $as_echo_n "(cached) " >&6
44130else
44131  case $BUILD_CC in
44132  [\\/]* | ?:[\\/]*)
44133  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44134  ;;
44135  *)
44136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44137for as_dir in $PATH
44138do
44139  IFS=$as_save_IFS
44140  test -z "$as_dir" && as_dir=.
44141    for ac_exec_ext in '' $ac_executable_extensions; do
44142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44143    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44145    break 2
44146  fi
44147done
44148  done
44149IFS=$as_save_IFS
44150
44151  ;;
44152esac
44153fi
44154BUILD_CC=$ac_cv_path_BUILD_CC
44155if test -n "$BUILD_CC"; then
44156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44157$as_echo "$BUILD_CC" >&6; }
44158else
44159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44160$as_echo "no" >&6; }
44161fi
44162
44163
44164  test -n "$BUILD_CC" && break
44165done
44166
44167  else
44168    # The variable is set, but is it from the command line or the environment?
44169
44170    # Try to remove the string !BUILD_CC! from our list.
44171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44173      # If it failed, the variable was not from the command line. Ignore it,
44174      # but warn the user (except for BASH, which is always set by the calling BASH).
44175      if test "xBUILD_CC" != xBASH; then
44176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44177$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44178      fi
44179      # Try to locate tool using the code snippet
44180      for ac_prog in cl cc gcc
44181do
44182  # Extract the first word of "$ac_prog", so it can be a program name with args.
44183set dummy $ac_prog; ac_word=$2
44184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44185$as_echo_n "checking for $ac_word... " >&6; }
44186if ${ac_cv_path_BUILD_CC+:} false; then :
44187  $as_echo_n "(cached) " >&6
44188else
44189  case $BUILD_CC in
44190  [\\/]* | ?:[\\/]*)
44191  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44192  ;;
44193  *)
44194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44195for as_dir in $PATH
44196do
44197  IFS=$as_save_IFS
44198  test -z "$as_dir" && as_dir=.
44199    for ac_exec_ext in '' $ac_executable_extensions; do
44200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44201    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44203    break 2
44204  fi
44205done
44206  done
44207IFS=$as_save_IFS
44208
44209  ;;
44210esac
44211fi
44212BUILD_CC=$ac_cv_path_BUILD_CC
44213if test -n "$BUILD_CC"; then
44214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44215$as_echo "$BUILD_CC" >&6; }
44216else
44217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44218$as_echo "no" >&6; }
44219fi
44220
44221
44222  test -n "$BUILD_CC" && break
44223done
44224
44225    else
44226      # If it succeeded, then it was overridden by the user. We will use it
44227      # for the tool.
44228
44229      # First remove it from the list of overridden variables, so we can test
44230      # for unknown variables in the end.
44231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44232
44233      # Check if we try to supply an empty value
44234      if test "x$BUILD_CC" = x; then
44235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44236$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44238$as_echo_n "checking for BUILD_CC... " >&6; }
44239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44240$as_echo "disabled" >&6; }
44241      else
44242        # Check if the provided tool contains a complete path.
44243        tool_specified="$BUILD_CC"
44244        tool_basename="${tool_specified##*/}"
44245        if test "x$tool_basename" = "x$tool_specified"; then
44246          # A command without a complete path is provided, search $PATH.
44247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44248$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44249          # Extract the first word of "$tool_basename", so it can be a program name with args.
44250set dummy $tool_basename; ac_word=$2
44251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44252$as_echo_n "checking for $ac_word... " >&6; }
44253if ${ac_cv_path_BUILD_CC+:} false; then :
44254  $as_echo_n "(cached) " >&6
44255else
44256  case $BUILD_CC in
44257  [\\/]* | ?:[\\/]*)
44258  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44259  ;;
44260  *)
44261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44262for as_dir in $PATH
44263do
44264  IFS=$as_save_IFS
44265  test -z "$as_dir" && as_dir=.
44266    for ac_exec_ext in '' $ac_executable_extensions; do
44267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44268    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44270    break 2
44271  fi
44272done
44273  done
44274IFS=$as_save_IFS
44275
44276  ;;
44277esac
44278fi
44279BUILD_CC=$ac_cv_path_BUILD_CC
44280if test -n "$BUILD_CC"; then
44281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44282$as_echo "$BUILD_CC" >&6; }
44283else
44284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44285$as_echo "no" >&6; }
44286fi
44287
44288
44289          if test "x$BUILD_CC" = x; then
44290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44291          fi
44292        else
44293          # Otherwise we believe it is a complete path. Use it as it is.
44294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44295$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44297$as_echo_n "checking for BUILD_CC... " >&6; }
44298          if test ! -x "$tool_specified"; then
44299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44300$as_echo "not found" >&6; }
44301            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44302          fi
44303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44304$as_echo "$tool_specified" >&6; }
44305        fi
44306      fi
44307    fi
44308
44309  fi
44310
44311
44312
44313  if test "x$BUILD_CC" = x; then
44314    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44315  fi
44316
44317
44318
44319  # Only process if variable expands to non-empty
44320
44321  if test "x$BUILD_CC" != x; then
44322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44323
44324  # First separate the path from the arguments. This will split at the first
44325  # space.
44326  complete="$BUILD_CC"
44327  path="${complete%% *}"
44328  tmp="$complete EOL"
44329  arguments="${tmp#* }"
44330
44331  # Input might be given as Windows format, start by converting to
44332  # unix format.
44333  new_path=`$CYGPATH -u "$path"`
44334
44335  # Now try to locate executable using which
44336  new_path=`$WHICH "$new_path" 2> /dev/null`
44337  # bat and cmd files are not always considered executable in cygwin causing which
44338  # to not find them
44339  if test "x$new_path" = x \
44340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44342    new_path=`$CYGPATH -u "$path"`
44343  fi
44344  if test "x$new_path" = x; then
44345    # Oops. Which didn't find the executable.
44346    # The splitting of arguments from the executable at a space might have been incorrect,
44347    # since paths with space are more likely in Windows. Give it another try with the whole
44348    # argument.
44349    path="$complete"
44350    arguments="EOL"
44351    new_path=`$CYGPATH -u "$path"`
44352    new_path=`$WHICH "$new_path" 2> /dev/null`
44353    # bat and cmd files are not always considered executable in cygwin causing which
44354    # to not find them
44355    if test "x$new_path" = x \
44356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44358      new_path=`$CYGPATH -u "$path"`
44359    fi
44360    if test "x$new_path" = x; then
44361      # It's still not found. Now this is an unrecoverable error.
44362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44363$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44364      has_space=`$ECHO "$complete" | $GREP " "`
44365      if test "x$has_space" != x; then
44366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44368      fi
44369      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44370    fi
44371  fi
44372
44373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44376  # "foo.exe" is OK but "foo" is an error.
44377  #
44378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44379  # It is also a way to make sure we got the proper file name for the real test later on.
44380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44381  if test "x$test_shortpath" = x; then
44382    # Short path failed, file does not exist as specified.
44383    # Try adding .exe or .cmd
44384    if test -f "${new_path}.exe"; then
44385      input_to_shortpath="${new_path}.exe"
44386    elif test -f "${new_path}.cmd"; then
44387      input_to_shortpath="${new_path}.cmd"
44388    else
44389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44390$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44393      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44394    fi
44395  else
44396    input_to_shortpath="$new_path"
44397  fi
44398
44399  # Call helper function which possibly converts this using DOS-style short mode.
44400  # If so, the updated path is stored in $new_path.
44401  new_path="$input_to_shortpath"
44402
44403  input_path="$input_to_shortpath"
44404  # Check if we need to convert this using DOS-style short mode. If the path
44405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44406  # take no chances and rewrite it.
44407  # Note: m4 eats our [], so we need to use [ and ] instead.
44408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44409  if test "x$has_forbidden_chars" != x; then
44410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44414      # Going to short mode and back again did indeed matter. Since short mode is
44415      # case insensitive, let's make it lowercase to improve readability.
44416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44417      # Now convert it back to Unix-style (cygpath)
44418      input_path=`$CYGPATH -u "$shortmode_path"`
44419      new_path="$input_path"
44420    fi
44421  fi
44422
44423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44424  if test "x$test_cygdrive_prefix" = x; then
44425    # As a simple fix, exclude /usr/bin since it's not a real path.
44426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44428      # a path prefixed by /cygdrive for fixpath to work.
44429      new_path="$CYGWIN_ROOT_PATH$input_path"
44430    fi
44431  fi
44432
44433  # remove trailing .exe if any
44434  new_path="${new_path/%.exe/}"
44435
44436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44437
44438  # First separate the path from the arguments. This will split at the first
44439  # space.
44440  complete="$BUILD_CC"
44441  path="${complete%% *}"
44442  tmp="$complete EOL"
44443  arguments="${tmp#* }"
44444
44445  # Input might be given as Windows format, start by converting to
44446  # unix format.
44447  new_path="$path"
44448
44449  windows_path="$new_path"
44450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44451    unix_path=`$CYGPATH -u "$windows_path"`
44452    new_path="$unix_path"
44453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44455    new_path="$unix_path"
44456  fi
44457
44458
44459  # Now try to locate executable using which
44460  new_path=`$WHICH "$new_path" 2> /dev/null`
44461
44462  if test "x$new_path" = x; then
44463    # Oops. Which didn't find the executable.
44464    # The splitting of arguments from the executable at a space might have been incorrect,
44465    # since paths with space are more likely in Windows. Give it another try with the whole
44466    # argument.
44467    path="$complete"
44468    arguments="EOL"
44469    new_path="$path"
44470
44471  windows_path="$new_path"
44472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44473    unix_path=`$CYGPATH -u "$windows_path"`
44474    new_path="$unix_path"
44475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44477    new_path="$unix_path"
44478  fi
44479
44480
44481    new_path=`$WHICH "$new_path" 2> /dev/null`
44482    # bat and cmd files are not always considered executable in MSYS causing which
44483    # to not find them
44484    if test "x$new_path" = x \
44485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44487      new_path="$path"
44488
44489  windows_path="$new_path"
44490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44491    unix_path=`$CYGPATH -u "$windows_path"`
44492    new_path="$unix_path"
44493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44495    new_path="$unix_path"
44496  fi
44497
44498    fi
44499
44500    if test "x$new_path" = x; then
44501      # It's still not found. Now this is an unrecoverable error.
44502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44503$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44504      has_space=`$ECHO "$complete" | $GREP " "`
44505      if test "x$has_space" != x; then
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44508      fi
44509      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44510    fi
44511  fi
44512
44513  # Now new_path has a complete unix path to the binary
44514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44515    # Keep paths in /bin as-is, but remove trailing .exe if any
44516    new_path="${new_path/%.exe/}"
44517    # Do not save /bin paths to all_fixpath_prefixes!
44518  else
44519    # Not in mixed or Windows style, start by that.
44520    new_path=`cmd //c echo $new_path`
44521
44522  input_path="$new_path"
44523  # Check if we need to convert this using DOS-style short mode. If the path
44524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44525  # take no chances and rewrite it.
44526  # Note: m4 eats our [], so we need to use [ and ] instead.
44527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44528  if test "x$has_forbidden_chars" != x; then
44529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44531  fi
44532
44533    # Output is in $new_path
44534
44535  windows_path="$new_path"
44536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44537    unix_path=`$CYGPATH -u "$windows_path"`
44538    new_path="$unix_path"
44539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44541    new_path="$unix_path"
44542  fi
44543
44544    # remove trailing .exe if any
44545    new_path="${new_path/%.exe/}"
44546
44547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44549  fi
44550
44551    else
44552      # We're on a unix platform. Hooray! :)
44553      # First separate the path from the arguments. This will split at the first
44554      # space.
44555      complete="$BUILD_CC"
44556      path="${complete%% *}"
44557      tmp="$complete EOL"
44558      arguments="${tmp#* }"
44559
44560      # Cannot rely on the command "which" here since it doesn't always work.
44561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44562      if test -z "$is_absolute_path"; then
44563        # Path to executable is not absolute. Find it.
44564        IFS_save="$IFS"
44565        IFS=:
44566        for p in $PATH; do
44567          if test -f "$p/$path" && test -x "$p/$path"; then
44568            new_path="$p/$path"
44569            break
44570          fi
44571        done
44572        IFS="$IFS_save"
44573      else
44574        # This is an absolute path, we can use it without further modifications.
44575        new_path="$path"
44576      fi
44577
44578      if test "x$new_path" = x; then
44579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44580$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44581        has_space=`$ECHO "$complete" | $GREP " "`
44582        if test "x$has_space" != x; then
44583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44585        fi
44586        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44587      fi
44588    fi
44589
44590    # Now join together the path and the arguments once again
44591    if test "x$arguments" != xEOL; then
44592      new_complete="$new_path ${arguments% *}"
44593    else
44594      new_complete="$new_path"
44595    fi
44596
44597    if test "x$complete" != "x$new_complete"; then
44598      BUILD_CC="$new_complete"
44599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44600$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44601    fi
44602  fi
44603
44604
44605
44606
44607  # Publish this variable in the help.
44608
44609
44610  if [ -z "${BUILD_CXX+x}" ]; then
44611    # The variable is not set by user, try to locate tool using the code snippet
44612    for ac_prog in cl CC g++
44613do
44614  # Extract the first word of "$ac_prog", so it can be a program name with args.
44615set dummy $ac_prog; ac_word=$2
44616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44617$as_echo_n "checking for $ac_word... " >&6; }
44618if ${ac_cv_path_BUILD_CXX+:} false; then :
44619  $as_echo_n "(cached) " >&6
44620else
44621  case $BUILD_CXX in
44622  [\\/]* | ?:[\\/]*)
44623  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44624  ;;
44625  *)
44626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44627for as_dir in $PATH
44628do
44629  IFS=$as_save_IFS
44630  test -z "$as_dir" && as_dir=.
44631    for ac_exec_ext in '' $ac_executable_extensions; do
44632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44633    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44635    break 2
44636  fi
44637done
44638  done
44639IFS=$as_save_IFS
44640
44641  ;;
44642esac
44643fi
44644BUILD_CXX=$ac_cv_path_BUILD_CXX
44645if test -n "$BUILD_CXX"; then
44646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44647$as_echo "$BUILD_CXX" >&6; }
44648else
44649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44650$as_echo "no" >&6; }
44651fi
44652
44653
44654  test -n "$BUILD_CXX" && break
44655done
44656
44657  else
44658    # The variable is set, but is it from the command line or the environment?
44659
44660    # Try to remove the string !BUILD_CXX! from our list.
44661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44663      # If it failed, the variable was not from the command line. Ignore it,
44664      # but warn the user (except for BASH, which is always set by the calling BASH).
44665      if test "xBUILD_CXX" != xBASH; then
44666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44667$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44668      fi
44669      # Try to locate tool using the code snippet
44670      for ac_prog in cl CC g++
44671do
44672  # Extract the first word of "$ac_prog", so it can be a program name with args.
44673set dummy $ac_prog; ac_word=$2
44674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44675$as_echo_n "checking for $ac_word... " >&6; }
44676if ${ac_cv_path_BUILD_CXX+:} false; then :
44677  $as_echo_n "(cached) " >&6
44678else
44679  case $BUILD_CXX in
44680  [\\/]* | ?:[\\/]*)
44681  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44682  ;;
44683  *)
44684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44685for as_dir in $PATH
44686do
44687  IFS=$as_save_IFS
44688  test -z "$as_dir" && as_dir=.
44689    for ac_exec_ext in '' $ac_executable_extensions; do
44690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44691    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44693    break 2
44694  fi
44695done
44696  done
44697IFS=$as_save_IFS
44698
44699  ;;
44700esac
44701fi
44702BUILD_CXX=$ac_cv_path_BUILD_CXX
44703if test -n "$BUILD_CXX"; then
44704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44705$as_echo "$BUILD_CXX" >&6; }
44706else
44707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44708$as_echo "no" >&6; }
44709fi
44710
44711
44712  test -n "$BUILD_CXX" && break
44713done
44714
44715    else
44716      # If it succeeded, then it was overridden by the user. We will use it
44717      # for the tool.
44718
44719      # First remove it from the list of overridden variables, so we can test
44720      # for unknown variables in the end.
44721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44722
44723      # Check if we try to supply an empty value
44724      if test "x$BUILD_CXX" = x; then
44725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44726$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44728$as_echo_n "checking for BUILD_CXX... " >&6; }
44729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44730$as_echo "disabled" >&6; }
44731      else
44732        # Check if the provided tool contains a complete path.
44733        tool_specified="$BUILD_CXX"
44734        tool_basename="${tool_specified##*/}"
44735        if test "x$tool_basename" = "x$tool_specified"; then
44736          # A command without a complete path is provided, search $PATH.
44737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44738$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44739          # Extract the first word of "$tool_basename", so it can be a program name with args.
44740set dummy $tool_basename; ac_word=$2
44741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44742$as_echo_n "checking for $ac_word... " >&6; }
44743if ${ac_cv_path_BUILD_CXX+:} false; then :
44744  $as_echo_n "(cached) " >&6
44745else
44746  case $BUILD_CXX in
44747  [\\/]* | ?:[\\/]*)
44748  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44749  ;;
44750  *)
44751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44752for as_dir in $PATH
44753do
44754  IFS=$as_save_IFS
44755  test -z "$as_dir" && as_dir=.
44756    for ac_exec_ext in '' $ac_executable_extensions; do
44757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44758    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44760    break 2
44761  fi
44762done
44763  done
44764IFS=$as_save_IFS
44765
44766  ;;
44767esac
44768fi
44769BUILD_CXX=$ac_cv_path_BUILD_CXX
44770if test -n "$BUILD_CXX"; then
44771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44772$as_echo "$BUILD_CXX" >&6; }
44773else
44774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44775$as_echo "no" >&6; }
44776fi
44777
44778
44779          if test "x$BUILD_CXX" = x; then
44780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44781          fi
44782        else
44783          # Otherwise we believe it is a complete path. Use it as it is.
44784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44785$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44787$as_echo_n "checking for BUILD_CXX... " >&6; }
44788          if test ! -x "$tool_specified"; then
44789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44790$as_echo "not found" >&6; }
44791            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44792          fi
44793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44794$as_echo "$tool_specified" >&6; }
44795        fi
44796      fi
44797    fi
44798
44799  fi
44800
44801
44802
44803  if test "x$BUILD_CXX" = x; then
44804    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44805  fi
44806
44807
44808
44809  # Only process if variable expands to non-empty
44810
44811  if test "x$BUILD_CXX" != x; then
44812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44813
44814  # First separate the path from the arguments. This will split at the first
44815  # space.
44816  complete="$BUILD_CXX"
44817  path="${complete%% *}"
44818  tmp="$complete EOL"
44819  arguments="${tmp#* }"
44820
44821  # Input might be given as Windows format, start by converting to
44822  # unix format.
44823  new_path=`$CYGPATH -u "$path"`
44824
44825  # Now try to locate executable using which
44826  new_path=`$WHICH "$new_path" 2> /dev/null`
44827  # bat and cmd files are not always considered executable in cygwin causing which
44828  # to not find them
44829  if test "x$new_path" = x \
44830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44832    new_path=`$CYGPATH -u "$path"`
44833  fi
44834  if test "x$new_path" = x; then
44835    # Oops. Which didn't find the executable.
44836    # The splitting of arguments from the executable at a space might have been incorrect,
44837    # since paths with space are more likely in Windows. Give it another try with the whole
44838    # argument.
44839    path="$complete"
44840    arguments="EOL"
44841    new_path=`$CYGPATH -u "$path"`
44842    new_path=`$WHICH "$new_path" 2> /dev/null`
44843    # bat and cmd files are not always considered executable in cygwin causing which
44844    # to not find them
44845    if test "x$new_path" = x \
44846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44848      new_path=`$CYGPATH -u "$path"`
44849    fi
44850    if test "x$new_path" = x; then
44851      # It's still not found. Now this is an unrecoverable error.
44852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44853$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44854      has_space=`$ECHO "$complete" | $GREP " "`
44855      if test "x$has_space" != x; then
44856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44858      fi
44859      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44860    fi
44861  fi
44862
44863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44866  # "foo.exe" is OK but "foo" is an error.
44867  #
44868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44869  # It is also a way to make sure we got the proper file name for the real test later on.
44870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44871  if test "x$test_shortpath" = x; then
44872    # Short path failed, file does not exist as specified.
44873    # Try adding .exe or .cmd
44874    if test -f "${new_path}.exe"; then
44875      input_to_shortpath="${new_path}.exe"
44876    elif test -f "${new_path}.cmd"; then
44877      input_to_shortpath="${new_path}.cmd"
44878    else
44879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44880$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44883      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44884    fi
44885  else
44886    input_to_shortpath="$new_path"
44887  fi
44888
44889  # Call helper function which possibly converts this using DOS-style short mode.
44890  # If so, the updated path is stored in $new_path.
44891  new_path="$input_to_shortpath"
44892
44893  input_path="$input_to_shortpath"
44894  # Check if we need to convert this using DOS-style short mode. If the path
44895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44896  # take no chances and rewrite it.
44897  # Note: m4 eats our [], so we need to use [ and ] instead.
44898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44899  if test "x$has_forbidden_chars" != x; then
44900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44904      # Going to short mode and back again did indeed matter. Since short mode is
44905      # case insensitive, let's make it lowercase to improve readability.
44906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44907      # Now convert it back to Unix-style (cygpath)
44908      input_path=`$CYGPATH -u "$shortmode_path"`
44909      new_path="$input_path"
44910    fi
44911  fi
44912
44913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44914  if test "x$test_cygdrive_prefix" = x; then
44915    # As a simple fix, exclude /usr/bin since it's not a real path.
44916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44918      # a path prefixed by /cygdrive for fixpath to work.
44919      new_path="$CYGWIN_ROOT_PATH$input_path"
44920    fi
44921  fi
44922
44923  # remove trailing .exe if any
44924  new_path="${new_path/%.exe/}"
44925
44926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44927
44928  # First separate the path from the arguments. This will split at the first
44929  # space.
44930  complete="$BUILD_CXX"
44931  path="${complete%% *}"
44932  tmp="$complete EOL"
44933  arguments="${tmp#* }"
44934
44935  # Input might be given as Windows format, start by converting to
44936  # unix format.
44937  new_path="$path"
44938
44939  windows_path="$new_path"
44940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44941    unix_path=`$CYGPATH -u "$windows_path"`
44942    new_path="$unix_path"
44943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44945    new_path="$unix_path"
44946  fi
44947
44948
44949  # Now try to locate executable using which
44950  new_path=`$WHICH "$new_path" 2> /dev/null`
44951
44952  if test "x$new_path" = x; then
44953    # Oops. Which didn't find the executable.
44954    # The splitting of arguments from the executable at a space might have been incorrect,
44955    # since paths with space are more likely in Windows. Give it another try with the whole
44956    # argument.
44957    path="$complete"
44958    arguments="EOL"
44959    new_path="$path"
44960
44961  windows_path="$new_path"
44962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44963    unix_path=`$CYGPATH -u "$windows_path"`
44964    new_path="$unix_path"
44965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44967    new_path="$unix_path"
44968  fi
44969
44970
44971    new_path=`$WHICH "$new_path" 2> /dev/null`
44972    # bat and cmd files are not always considered executable in MSYS causing which
44973    # to not find them
44974    if test "x$new_path" = x \
44975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44977      new_path="$path"
44978
44979  windows_path="$new_path"
44980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44981    unix_path=`$CYGPATH -u "$windows_path"`
44982    new_path="$unix_path"
44983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44985    new_path="$unix_path"
44986  fi
44987
44988    fi
44989
44990    if test "x$new_path" = x; then
44991      # It's still not found. Now this is an unrecoverable error.
44992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44993$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44994      has_space=`$ECHO "$complete" | $GREP " "`
44995      if test "x$has_space" != x; then
44996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44998      fi
44999      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45000    fi
45001  fi
45002
45003  # Now new_path has a complete unix path to the binary
45004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45005    # Keep paths in /bin as-is, but remove trailing .exe if any
45006    new_path="${new_path/%.exe/}"
45007    # Do not save /bin paths to all_fixpath_prefixes!
45008  else
45009    # Not in mixed or Windows style, start by that.
45010    new_path=`cmd //c echo $new_path`
45011
45012  input_path="$new_path"
45013  # Check if we need to convert this using DOS-style short mode. If the path
45014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45015  # take no chances and rewrite it.
45016  # Note: m4 eats our [], so we need to use [ and ] instead.
45017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45018  if test "x$has_forbidden_chars" != x; then
45019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45021  fi
45022
45023    # Output is in $new_path
45024
45025  windows_path="$new_path"
45026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45027    unix_path=`$CYGPATH -u "$windows_path"`
45028    new_path="$unix_path"
45029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45031    new_path="$unix_path"
45032  fi
45033
45034    # remove trailing .exe if any
45035    new_path="${new_path/%.exe/}"
45036
45037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45039  fi
45040
45041    else
45042      # We're on a unix platform. Hooray! :)
45043      # First separate the path from the arguments. This will split at the first
45044      # space.
45045      complete="$BUILD_CXX"
45046      path="${complete%% *}"
45047      tmp="$complete EOL"
45048      arguments="${tmp#* }"
45049
45050      # Cannot rely on the command "which" here since it doesn't always work.
45051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45052      if test -z "$is_absolute_path"; then
45053        # Path to executable is not absolute. Find it.
45054        IFS_save="$IFS"
45055        IFS=:
45056        for p in $PATH; do
45057          if test -f "$p/$path" && test -x "$p/$path"; then
45058            new_path="$p/$path"
45059            break
45060          fi
45061        done
45062        IFS="$IFS_save"
45063      else
45064        # This is an absolute path, we can use it without further modifications.
45065        new_path="$path"
45066      fi
45067
45068      if test "x$new_path" = x; then
45069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45070$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45071        has_space=`$ECHO "$complete" | $GREP " "`
45072        if test "x$has_space" != x; then
45073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45075        fi
45076        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45077      fi
45078    fi
45079
45080    # Now join together the path and the arguments once again
45081    if test "x$arguments" != xEOL; then
45082      new_complete="$new_path ${arguments% *}"
45083    else
45084      new_complete="$new_path"
45085    fi
45086
45087    if test "x$complete" != "x$new_complete"; then
45088      BUILD_CXX="$new_complete"
45089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45090$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45091    fi
45092  fi
45093
45094
45095
45096  # Publish this variable in the help.
45097
45098
45099  if [ -z "${BUILD_NM+x}" ]; then
45100    # The variable is not set by user, try to locate tool using the code snippet
45101    for ac_prog in nm gcc-nm
45102do
45103  # Extract the first word of "$ac_prog", so it can be a program name with args.
45104set dummy $ac_prog; ac_word=$2
45105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45106$as_echo_n "checking for $ac_word... " >&6; }
45107if ${ac_cv_path_BUILD_NM+:} false; then :
45108  $as_echo_n "(cached) " >&6
45109else
45110  case $BUILD_NM in
45111  [\\/]* | ?:[\\/]*)
45112  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45113  ;;
45114  *)
45115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45116for as_dir in $PATH
45117do
45118  IFS=$as_save_IFS
45119  test -z "$as_dir" && as_dir=.
45120    for ac_exec_ext in '' $ac_executable_extensions; do
45121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45122    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45124    break 2
45125  fi
45126done
45127  done
45128IFS=$as_save_IFS
45129
45130  ;;
45131esac
45132fi
45133BUILD_NM=$ac_cv_path_BUILD_NM
45134if test -n "$BUILD_NM"; then
45135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45136$as_echo "$BUILD_NM" >&6; }
45137else
45138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45139$as_echo "no" >&6; }
45140fi
45141
45142
45143  test -n "$BUILD_NM" && break
45144done
45145
45146  else
45147    # The variable is set, but is it from the command line or the environment?
45148
45149    # Try to remove the string !BUILD_NM! from our list.
45150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45152      # If it failed, the variable was not from the command line. Ignore it,
45153      # but warn the user (except for BASH, which is always set by the calling BASH).
45154      if test "xBUILD_NM" != xBASH; then
45155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45156$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45157      fi
45158      # Try to locate tool using the code snippet
45159      for ac_prog in nm gcc-nm
45160do
45161  # Extract the first word of "$ac_prog", so it can be a program name with args.
45162set dummy $ac_prog; ac_word=$2
45163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45164$as_echo_n "checking for $ac_word... " >&6; }
45165if ${ac_cv_path_BUILD_NM+:} false; then :
45166  $as_echo_n "(cached) " >&6
45167else
45168  case $BUILD_NM in
45169  [\\/]* | ?:[\\/]*)
45170  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45171  ;;
45172  *)
45173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45174for as_dir in $PATH
45175do
45176  IFS=$as_save_IFS
45177  test -z "$as_dir" && as_dir=.
45178    for ac_exec_ext in '' $ac_executable_extensions; do
45179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45180    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45182    break 2
45183  fi
45184done
45185  done
45186IFS=$as_save_IFS
45187
45188  ;;
45189esac
45190fi
45191BUILD_NM=$ac_cv_path_BUILD_NM
45192if test -n "$BUILD_NM"; then
45193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45194$as_echo "$BUILD_NM" >&6; }
45195else
45196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45197$as_echo "no" >&6; }
45198fi
45199
45200
45201  test -n "$BUILD_NM" && break
45202done
45203
45204    else
45205      # If it succeeded, then it was overridden by the user. We will use it
45206      # for the tool.
45207
45208      # First remove it from the list of overridden variables, so we can test
45209      # for unknown variables in the end.
45210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45211
45212      # Check if we try to supply an empty value
45213      if test "x$BUILD_NM" = x; then
45214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45215$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45217$as_echo_n "checking for BUILD_NM... " >&6; }
45218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45219$as_echo "disabled" >&6; }
45220      else
45221        # Check if the provided tool contains a complete path.
45222        tool_specified="$BUILD_NM"
45223        tool_basename="${tool_specified##*/}"
45224        if test "x$tool_basename" = "x$tool_specified"; then
45225          # A command without a complete path is provided, search $PATH.
45226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45227$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45228          # Extract the first word of "$tool_basename", so it can be a program name with args.
45229set dummy $tool_basename; ac_word=$2
45230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45231$as_echo_n "checking for $ac_word... " >&6; }
45232if ${ac_cv_path_BUILD_NM+:} false; then :
45233  $as_echo_n "(cached) " >&6
45234else
45235  case $BUILD_NM in
45236  [\\/]* | ?:[\\/]*)
45237  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45238  ;;
45239  *)
45240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45241for as_dir in $PATH
45242do
45243  IFS=$as_save_IFS
45244  test -z "$as_dir" && as_dir=.
45245    for ac_exec_ext in '' $ac_executable_extensions; do
45246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45247    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45249    break 2
45250  fi
45251done
45252  done
45253IFS=$as_save_IFS
45254
45255  ;;
45256esac
45257fi
45258BUILD_NM=$ac_cv_path_BUILD_NM
45259if test -n "$BUILD_NM"; then
45260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45261$as_echo "$BUILD_NM" >&6; }
45262else
45263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45264$as_echo "no" >&6; }
45265fi
45266
45267
45268          if test "x$BUILD_NM" = x; then
45269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45270          fi
45271        else
45272          # Otherwise we believe it is a complete path. Use it as it is.
45273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45274$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45276$as_echo_n "checking for BUILD_NM... " >&6; }
45277          if test ! -x "$tool_specified"; then
45278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45279$as_echo "not found" >&6; }
45280            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45281          fi
45282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45283$as_echo "$tool_specified" >&6; }
45284        fi
45285      fi
45286    fi
45287
45288  fi
45289
45290
45291
45292  # Only process if variable expands to non-empty
45293
45294  if test "x$BUILD_NM" != x; then
45295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45296
45297  # First separate the path from the arguments. This will split at the first
45298  # space.
45299  complete="$BUILD_NM"
45300  path="${complete%% *}"
45301  tmp="$complete EOL"
45302  arguments="${tmp#* }"
45303
45304  # Input might be given as Windows format, start by converting to
45305  # unix format.
45306  new_path=`$CYGPATH -u "$path"`
45307
45308  # Now try to locate executable using which
45309  new_path=`$WHICH "$new_path" 2> /dev/null`
45310  # bat and cmd files are not always considered executable in cygwin causing which
45311  # to not find them
45312  if test "x$new_path" = x \
45313      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45314      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45315    new_path=`$CYGPATH -u "$path"`
45316  fi
45317  if test "x$new_path" = x; then
45318    # Oops. Which didn't find the executable.
45319    # The splitting of arguments from the executable at a space might have been incorrect,
45320    # since paths with space are more likely in Windows. Give it another try with the whole
45321    # argument.
45322    path="$complete"
45323    arguments="EOL"
45324    new_path=`$CYGPATH -u "$path"`
45325    new_path=`$WHICH "$new_path" 2> /dev/null`
45326    # bat and cmd files are not always considered executable in cygwin causing which
45327    # to not find them
45328    if test "x$new_path" = x \
45329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45331      new_path=`$CYGPATH -u "$path"`
45332    fi
45333    if test "x$new_path" = x; then
45334      # It's still not found. Now this is an unrecoverable error.
45335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45336$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45337      has_space=`$ECHO "$complete" | $GREP " "`
45338      if test "x$has_space" != x; then
45339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45341      fi
45342      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45343    fi
45344  fi
45345
45346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45349  # "foo.exe" is OK but "foo" is an error.
45350  #
45351  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45352  # It is also a way to make sure we got the proper file name for the real test later on.
45353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45354  if test "x$test_shortpath" = x; then
45355    # Short path failed, file does not exist as specified.
45356    # Try adding .exe or .cmd
45357    if test -f "${new_path}.exe"; then
45358      input_to_shortpath="${new_path}.exe"
45359    elif test -f "${new_path}.cmd"; then
45360      input_to_shortpath="${new_path}.cmd"
45361    else
45362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45363$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45364      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45365$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45366      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45367    fi
45368  else
45369    input_to_shortpath="$new_path"
45370  fi
45371
45372  # Call helper function which possibly converts this using DOS-style short mode.
45373  # If so, the updated path is stored in $new_path.
45374  new_path="$input_to_shortpath"
45375
45376  input_path="$input_to_shortpath"
45377  # Check if we need to convert this using DOS-style short mode. If the path
45378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45379  # take no chances and rewrite it.
45380  # Note: m4 eats our [], so we need to use [ and ] instead.
45381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45382  if test "x$has_forbidden_chars" != x; then
45383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45387      # Going to short mode and back again did indeed matter. Since short mode is
45388      # case insensitive, let's make it lowercase to improve readability.
45389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45390      # Now convert it back to Unix-style (cygpath)
45391      input_path=`$CYGPATH -u "$shortmode_path"`
45392      new_path="$input_path"
45393    fi
45394  fi
45395
45396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45397  if test "x$test_cygdrive_prefix" = x; then
45398    # As a simple fix, exclude /usr/bin since it's not a real path.
45399    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45401      # a path prefixed by /cygdrive for fixpath to work.
45402      new_path="$CYGWIN_ROOT_PATH$input_path"
45403    fi
45404  fi
45405
45406  # remove trailing .exe if any
45407  new_path="${new_path/%.exe/}"
45408
45409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45410
45411  # First separate the path from the arguments. This will split at the first
45412  # space.
45413  complete="$BUILD_NM"
45414  path="${complete%% *}"
45415  tmp="$complete EOL"
45416  arguments="${tmp#* }"
45417
45418  # Input might be given as Windows format, start by converting to
45419  # unix format.
45420  new_path="$path"
45421
45422  windows_path="$new_path"
45423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45424    unix_path=`$CYGPATH -u "$windows_path"`
45425    new_path="$unix_path"
45426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45428    new_path="$unix_path"
45429  fi
45430
45431
45432  # Now try to locate executable using which
45433  new_path=`$WHICH "$new_path" 2> /dev/null`
45434
45435  if test "x$new_path" = x; then
45436    # Oops. Which didn't find the executable.
45437    # The splitting of arguments from the executable at a space might have been incorrect,
45438    # since paths with space are more likely in Windows. Give it another try with the whole
45439    # argument.
45440    path="$complete"
45441    arguments="EOL"
45442    new_path="$path"
45443
45444  windows_path="$new_path"
45445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45446    unix_path=`$CYGPATH -u "$windows_path"`
45447    new_path="$unix_path"
45448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45450    new_path="$unix_path"
45451  fi
45452
45453
45454    new_path=`$WHICH "$new_path" 2> /dev/null`
45455    # bat and cmd files are not always considered executable in MSYS causing which
45456    # to not find them
45457    if test "x$new_path" = x \
45458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45460      new_path="$path"
45461
45462  windows_path="$new_path"
45463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45464    unix_path=`$CYGPATH -u "$windows_path"`
45465    new_path="$unix_path"
45466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45468    new_path="$unix_path"
45469  fi
45470
45471    fi
45472
45473    if test "x$new_path" = x; then
45474      # It's still not found. Now this is an unrecoverable error.
45475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45476$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45477      has_space=`$ECHO "$complete" | $GREP " "`
45478      if test "x$has_space" != x; then
45479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45481      fi
45482      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45483    fi
45484  fi
45485
45486  # Now new_path has a complete unix path to the binary
45487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45488    # Keep paths in /bin as-is, but remove trailing .exe if any
45489    new_path="${new_path/%.exe/}"
45490    # Do not save /bin paths to all_fixpath_prefixes!
45491  else
45492    # Not in mixed or Windows style, start by that.
45493    new_path=`cmd //c echo $new_path`
45494
45495  input_path="$new_path"
45496  # Check if we need to convert this using DOS-style short mode. If the path
45497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45498  # take no chances and rewrite it.
45499  # Note: m4 eats our [], so we need to use [ and ] instead.
45500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45501  if test "x$has_forbidden_chars" != x; then
45502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45504  fi
45505
45506    # Output is in $new_path
45507
45508  windows_path="$new_path"
45509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45510    unix_path=`$CYGPATH -u "$windows_path"`
45511    new_path="$unix_path"
45512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45514    new_path="$unix_path"
45515  fi
45516
45517    # remove trailing .exe if any
45518    new_path="${new_path/%.exe/}"
45519
45520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45522  fi
45523
45524    else
45525      # We're on a unix platform. Hooray! :)
45526      # First separate the path from the arguments. This will split at the first
45527      # space.
45528      complete="$BUILD_NM"
45529      path="${complete%% *}"
45530      tmp="$complete EOL"
45531      arguments="${tmp#* }"
45532
45533      # Cannot rely on the command "which" here since it doesn't always work.
45534      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45535      if test -z "$is_absolute_path"; then
45536        # Path to executable is not absolute. Find it.
45537        IFS_save="$IFS"
45538        IFS=:
45539        for p in $PATH; do
45540          if test -f "$p/$path" && test -x "$p/$path"; then
45541            new_path="$p/$path"
45542            break
45543          fi
45544        done
45545        IFS="$IFS_save"
45546      else
45547        # This is an absolute path, we can use it without further modifications.
45548        new_path="$path"
45549      fi
45550
45551      if test "x$new_path" = x; then
45552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45553$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45554        has_space=`$ECHO "$complete" | $GREP " "`
45555        if test "x$has_space" != x; then
45556          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45558        fi
45559        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45560      fi
45561    fi
45562
45563    # Now join together the path and the arguments once again
45564    if test "x$arguments" != xEOL; then
45565      new_complete="$new_path ${arguments% *}"
45566    else
45567      new_complete="$new_path"
45568    fi
45569
45570    if test "x$complete" != "x$new_complete"; then
45571      BUILD_NM="$new_complete"
45572      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45573$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45574    fi
45575  fi
45576
45577
45578
45579  # Publish this variable in the help.
45580
45581
45582  if [ -z "${BUILD_AR+x}" ]; then
45583    # The variable is not set by user, try to locate tool using the code snippet
45584    for ac_prog in ar gcc-ar
45585do
45586  # Extract the first word of "$ac_prog", so it can be a program name with args.
45587set dummy $ac_prog; ac_word=$2
45588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45589$as_echo_n "checking for $ac_word... " >&6; }
45590if ${ac_cv_path_BUILD_AR+:} false; then :
45591  $as_echo_n "(cached) " >&6
45592else
45593  case $BUILD_AR in
45594  [\\/]* | ?:[\\/]*)
45595  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45596  ;;
45597  *)
45598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45599for as_dir in $PATH
45600do
45601  IFS=$as_save_IFS
45602  test -z "$as_dir" && as_dir=.
45603    for ac_exec_ext in '' $ac_executable_extensions; do
45604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45605    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45607    break 2
45608  fi
45609done
45610  done
45611IFS=$as_save_IFS
45612
45613  ;;
45614esac
45615fi
45616BUILD_AR=$ac_cv_path_BUILD_AR
45617if test -n "$BUILD_AR"; then
45618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45619$as_echo "$BUILD_AR" >&6; }
45620else
45621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45622$as_echo "no" >&6; }
45623fi
45624
45625
45626  test -n "$BUILD_AR" && break
45627done
45628
45629  else
45630    # The variable is set, but is it from the command line or the environment?
45631
45632    # Try to remove the string !BUILD_AR! from our list.
45633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45635      # If it failed, the variable was not from the command line. Ignore it,
45636      # but warn the user (except for BASH, which is always set by the calling BASH).
45637      if test "xBUILD_AR" != xBASH; then
45638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45639$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45640      fi
45641      # Try to locate tool using the code snippet
45642      for ac_prog in ar gcc-ar
45643do
45644  # Extract the first word of "$ac_prog", so it can be a program name with args.
45645set dummy $ac_prog; ac_word=$2
45646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45647$as_echo_n "checking for $ac_word... " >&6; }
45648if ${ac_cv_path_BUILD_AR+:} false; then :
45649  $as_echo_n "(cached) " >&6
45650else
45651  case $BUILD_AR in
45652  [\\/]* | ?:[\\/]*)
45653  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45654  ;;
45655  *)
45656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45657for as_dir in $PATH
45658do
45659  IFS=$as_save_IFS
45660  test -z "$as_dir" && as_dir=.
45661    for ac_exec_ext in '' $ac_executable_extensions; do
45662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45663    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45665    break 2
45666  fi
45667done
45668  done
45669IFS=$as_save_IFS
45670
45671  ;;
45672esac
45673fi
45674BUILD_AR=$ac_cv_path_BUILD_AR
45675if test -n "$BUILD_AR"; then
45676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45677$as_echo "$BUILD_AR" >&6; }
45678else
45679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45680$as_echo "no" >&6; }
45681fi
45682
45683
45684  test -n "$BUILD_AR" && break
45685done
45686
45687    else
45688      # If it succeeded, then it was overridden by the user. We will use it
45689      # for the tool.
45690
45691      # First remove it from the list of overridden variables, so we can test
45692      # for unknown variables in the end.
45693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45694
45695      # Check if we try to supply an empty value
45696      if test "x$BUILD_AR" = x; then
45697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45698$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45700$as_echo_n "checking for BUILD_AR... " >&6; }
45701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45702$as_echo "disabled" >&6; }
45703      else
45704        # Check if the provided tool contains a complete path.
45705        tool_specified="$BUILD_AR"
45706        tool_basename="${tool_specified##*/}"
45707        if test "x$tool_basename" = "x$tool_specified"; then
45708          # A command without a complete path is provided, search $PATH.
45709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45710$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45711          # Extract the first word of "$tool_basename", so it can be a program name with args.
45712set dummy $tool_basename; ac_word=$2
45713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45714$as_echo_n "checking for $ac_word... " >&6; }
45715if ${ac_cv_path_BUILD_AR+:} false; then :
45716  $as_echo_n "(cached) " >&6
45717else
45718  case $BUILD_AR in
45719  [\\/]* | ?:[\\/]*)
45720  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45721  ;;
45722  *)
45723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45724for as_dir in $PATH
45725do
45726  IFS=$as_save_IFS
45727  test -z "$as_dir" && as_dir=.
45728    for ac_exec_ext in '' $ac_executable_extensions; do
45729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45730    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45732    break 2
45733  fi
45734done
45735  done
45736IFS=$as_save_IFS
45737
45738  ;;
45739esac
45740fi
45741BUILD_AR=$ac_cv_path_BUILD_AR
45742if test -n "$BUILD_AR"; then
45743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45744$as_echo "$BUILD_AR" >&6; }
45745else
45746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45747$as_echo "no" >&6; }
45748fi
45749
45750
45751          if test "x$BUILD_AR" = x; then
45752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45753          fi
45754        else
45755          # Otherwise we believe it is a complete path. Use it as it is.
45756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45757$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45759$as_echo_n "checking for BUILD_AR... " >&6; }
45760          if test ! -x "$tool_specified"; then
45761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45762$as_echo "not found" >&6; }
45763            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45764          fi
45765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45766$as_echo "$tool_specified" >&6; }
45767        fi
45768      fi
45769    fi
45770
45771  fi
45772
45773
45774
45775  # Only process if variable expands to non-empty
45776
45777  if test "x$BUILD_AR" != x; then
45778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45779
45780  # First separate the path from the arguments. This will split at the first
45781  # space.
45782  complete="$BUILD_AR"
45783  path="${complete%% *}"
45784  tmp="$complete EOL"
45785  arguments="${tmp#* }"
45786
45787  # Input might be given as Windows format, start by converting to
45788  # unix format.
45789  new_path=`$CYGPATH -u "$path"`
45790
45791  # Now try to locate executable using which
45792  new_path=`$WHICH "$new_path" 2> /dev/null`
45793  # bat and cmd files are not always considered executable in cygwin causing which
45794  # to not find them
45795  if test "x$new_path" = x \
45796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45798    new_path=`$CYGPATH -u "$path"`
45799  fi
45800  if test "x$new_path" = x; then
45801    # Oops. Which didn't find the executable.
45802    # The splitting of arguments from the executable at a space might have been incorrect,
45803    # since paths with space are more likely in Windows. Give it another try with the whole
45804    # argument.
45805    path="$complete"
45806    arguments="EOL"
45807    new_path=`$CYGPATH -u "$path"`
45808    new_path=`$WHICH "$new_path" 2> /dev/null`
45809    # bat and cmd files are not always considered executable in cygwin causing which
45810    # to not find them
45811    if test "x$new_path" = x \
45812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45814      new_path=`$CYGPATH -u "$path"`
45815    fi
45816    if test "x$new_path" = x; then
45817      # It's still not found. Now this is an unrecoverable error.
45818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45819$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45820      has_space=`$ECHO "$complete" | $GREP " "`
45821      if test "x$has_space" != x; then
45822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45824      fi
45825      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45826    fi
45827  fi
45828
45829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45832  # "foo.exe" is OK but "foo" is an error.
45833  #
45834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45835  # It is also a way to make sure we got the proper file name for the real test later on.
45836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45837  if test "x$test_shortpath" = x; then
45838    # Short path failed, file does not exist as specified.
45839    # Try adding .exe or .cmd
45840    if test -f "${new_path}.exe"; then
45841      input_to_shortpath="${new_path}.exe"
45842    elif test -f "${new_path}.cmd"; then
45843      input_to_shortpath="${new_path}.cmd"
45844    else
45845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45846$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45849      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45850    fi
45851  else
45852    input_to_shortpath="$new_path"
45853  fi
45854
45855  # Call helper function which possibly converts this using DOS-style short mode.
45856  # If so, the updated path is stored in $new_path.
45857  new_path="$input_to_shortpath"
45858
45859  input_path="$input_to_shortpath"
45860  # Check if we need to convert this using DOS-style short mode. If the path
45861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45862  # take no chances and rewrite it.
45863  # Note: m4 eats our [], so we need to use [ and ] instead.
45864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45865  if test "x$has_forbidden_chars" != x; then
45866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45870      # Going to short mode and back again did indeed matter. Since short mode is
45871      # case insensitive, let's make it lowercase to improve readability.
45872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45873      # Now convert it back to Unix-style (cygpath)
45874      input_path=`$CYGPATH -u "$shortmode_path"`
45875      new_path="$input_path"
45876    fi
45877  fi
45878
45879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45880  if test "x$test_cygdrive_prefix" = x; then
45881    # As a simple fix, exclude /usr/bin since it's not a real path.
45882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45884      # a path prefixed by /cygdrive for fixpath to work.
45885      new_path="$CYGWIN_ROOT_PATH$input_path"
45886    fi
45887  fi
45888
45889  # remove trailing .exe if any
45890  new_path="${new_path/%.exe/}"
45891
45892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45893
45894  # First separate the path from the arguments. This will split at the first
45895  # space.
45896  complete="$BUILD_AR"
45897  path="${complete%% *}"
45898  tmp="$complete EOL"
45899  arguments="${tmp#* }"
45900
45901  # Input might be given as Windows format, start by converting to
45902  # unix format.
45903  new_path="$path"
45904
45905  windows_path="$new_path"
45906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45907    unix_path=`$CYGPATH -u "$windows_path"`
45908    new_path="$unix_path"
45909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45911    new_path="$unix_path"
45912  fi
45913
45914
45915  # Now try to locate executable using which
45916  new_path=`$WHICH "$new_path" 2> /dev/null`
45917
45918  if test "x$new_path" = x; then
45919    # Oops. Which didn't find the executable.
45920    # The splitting of arguments from the executable at a space might have been incorrect,
45921    # since paths with space are more likely in Windows. Give it another try with the whole
45922    # argument.
45923    path="$complete"
45924    arguments="EOL"
45925    new_path="$path"
45926
45927  windows_path="$new_path"
45928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45929    unix_path=`$CYGPATH -u "$windows_path"`
45930    new_path="$unix_path"
45931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45933    new_path="$unix_path"
45934  fi
45935
45936
45937    new_path=`$WHICH "$new_path" 2> /dev/null`
45938    # bat and cmd files are not always considered executable in MSYS causing which
45939    # to not find them
45940    if test "x$new_path" = x \
45941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45943      new_path="$path"
45944
45945  windows_path="$new_path"
45946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45947    unix_path=`$CYGPATH -u "$windows_path"`
45948    new_path="$unix_path"
45949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45951    new_path="$unix_path"
45952  fi
45953
45954    fi
45955
45956    if test "x$new_path" = x; then
45957      # It's still not found. Now this is an unrecoverable error.
45958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45959$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45960      has_space=`$ECHO "$complete" | $GREP " "`
45961      if test "x$has_space" != x; then
45962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45964      fi
45965      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45966    fi
45967  fi
45968
45969  # Now new_path has a complete unix path to the binary
45970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45971    # Keep paths in /bin as-is, but remove trailing .exe if any
45972    new_path="${new_path/%.exe/}"
45973    # Do not save /bin paths to all_fixpath_prefixes!
45974  else
45975    # Not in mixed or Windows style, start by that.
45976    new_path=`cmd //c echo $new_path`
45977
45978  input_path="$new_path"
45979  # Check if we need to convert this using DOS-style short mode. If the path
45980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45981  # take no chances and rewrite it.
45982  # Note: m4 eats our [], so we need to use [ and ] instead.
45983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45984  if test "x$has_forbidden_chars" != x; then
45985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45987  fi
45988
45989    # Output is in $new_path
45990
45991  windows_path="$new_path"
45992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45993    unix_path=`$CYGPATH -u "$windows_path"`
45994    new_path="$unix_path"
45995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45997    new_path="$unix_path"
45998  fi
45999
46000    # remove trailing .exe if any
46001    new_path="${new_path/%.exe/}"
46002
46003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46005  fi
46006
46007    else
46008      # We're on a unix platform. Hooray! :)
46009      # First separate the path from the arguments. This will split at the first
46010      # space.
46011      complete="$BUILD_AR"
46012      path="${complete%% *}"
46013      tmp="$complete EOL"
46014      arguments="${tmp#* }"
46015
46016      # Cannot rely on the command "which" here since it doesn't always work.
46017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46018      if test -z "$is_absolute_path"; then
46019        # Path to executable is not absolute. Find it.
46020        IFS_save="$IFS"
46021        IFS=:
46022        for p in $PATH; do
46023          if test -f "$p/$path" && test -x "$p/$path"; then
46024            new_path="$p/$path"
46025            break
46026          fi
46027        done
46028        IFS="$IFS_save"
46029      else
46030        # This is an absolute path, we can use it without further modifications.
46031        new_path="$path"
46032      fi
46033
46034      if test "x$new_path" = x; then
46035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46036$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46037        has_space=`$ECHO "$complete" | $GREP " "`
46038        if test "x$has_space" != x; then
46039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46041        fi
46042        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46043      fi
46044    fi
46045
46046    # Now join together the path and the arguments once again
46047    if test "x$arguments" != xEOL; then
46048      new_complete="$new_path ${arguments% *}"
46049    else
46050      new_complete="$new_path"
46051    fi
46052
46053    if test "x$complete" != "x$new_complete"; then
46054      BUILD_AR="$new_complete"
46055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46056$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46057    fi
46058  fi
46059
46060
46061
46062  # Publish this variable in the help.
46063
46064
46065  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46066    # The variable is not set by user, try to locate tool using the code snippet
46067    for ac_prog in objcopy
46068do
46069  # Extract the first word of "$ac_prog", so it can be a program name with args.
46070set dummy $ac_prog; ac_word=$2
46071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46072$as_echo_n "checking for $ac_word... " >&6; }
46073if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46074  $as_echo_n "(cached) " >&6
46075else
46076  case $BUILD_OBJCOPY in
46077  [\\/]* | ?:[\\/]*)
46078  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46079  ;;
46080  *)
46081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46082for as_dir in $PATH
46083do
46084  IFS=$as_save_IFS
46085  test -z "$as_dir" && as_dir=.
46086    for ac_exec_ext in '' $ac_executable_extensions; do
46087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46088    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46090    break 2
46091  fi
46092done
46093  done
46094IFS=$as_save_IFS
46095
46096  ;;
46097esac
46098fi
46099BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46100if test -n "$BUILD_OBJCOPY"; then
46101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46102$as_echo "$BUILD_OBJCOPY" >&6; }
46103else
46104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46105$as_echo "no" >&6; }
46106fi
46107
46108
46109  test -n "$BUILD_OBJCOPY" && break
46110done
46111
46112  else
46113    # The variable is set, but is it from the command line or the environment?
46114
46115    # Try to remove the string !BUILD_OBJCOPY! from our list.
46116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46118      # If it failed, the variable was not from the command line. Ignore it,
46119      # but warn the user (except for BASH, which is always set by the calling BASH).
46120      if test "xBUILD_OBJCOPY" != xBASH; then
46121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46122$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46123      fi
46124      # Try to locate tool using the code snippet
46125      for ac_prog in objcopy
46126do
46127  # Extract the first word of "$ac_prog", so it can be a program name with args.
46128set dummy $ac_prog; ac_word=$2
46129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46130$as_echo_n "checking for $ac_word... " >&6; }
46131if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46132  $as_echo_n "(cached) " >&6
46133else
46134  case $BUILD_OBJCOPY in
46135  [\\/]* | ?:[\\/]*)
46136  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46137  ;;
46138  *)
46139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46140for as_dir in $PATH
46141do
46142  IFS=$as_save_IFS
46143  test -z "$as_dir" && as_dir=.
46144    for ac_exec_ext in '' $ac_executable_extensions; do
46145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46146    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46148    break 2
46149  fi
46150done
46151  done
46152IFS=$as_save_IFS
46153
46154  ;;
46155esac
46156fi
46157BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46158if test -n "$BUILD_OBJCOPY"; then
46159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46160$as_echo "$BUILD_OBJCOPY" >&6; }
46161else
46162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46163$as_echo "no" >&6; }
46164fi
46165
46166
46167  test -n "$BUILD_OBJCOPY" && break
46168done
46169
46170    else
46171      # If it succeeded, then it was overridden by the user. We will use it
46172      # for the tool.
46173
46174      # First remove it from the list of overridden variables, so we can test
46175      # for unknown variables in the end.
46176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46177
46178      # Check if we try to supply an empty value
46179      if test "x$BUILD_OBJCOPY" = x; then
46180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46181$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46183$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46185$as_echo "disabled" >&6; }
46186      else
46187        # Check if the provided tool contains a complete path.
46188        tool_specified="$BUILD_OBJCOPY"
46189        tool_basename="${tool_specified##*/}"
46190        if test "x$tool_basename" = "x$tool_specified"; then
46191          # A command without a complete path is provided, search $PATH.
46192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46193$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46194          # Extract the first word of "$tool_basename", so it can be a program name with args.
46195set dummy $tool_basename; ac_word=$2
46196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46197$as_echo_n "checking for $ac_word... " >&6; }
46198if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46199  $as_echo_n "(cached) " >&6
46200else
46201  case $BUILD_OBJCOPY in
46202  [\\/]* | ?:[\\/]*)
46203  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46204  ;;
46205  *)
46206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46207for as_dir in $PATH
46208do
46209  IFS=$as_save_IFS
46210  test -z "$as_dir" && as_dir=.
46211    for ac_exec_ext in '' $ac_executable_extensions; do
46212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46213    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46215    break 2
46216  fi
46217done
46218  done
46219IFS=$as_save_IFS
46220
46221  ;;
46222esac
46223fi
46224BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46225if test -n "$BUILD_OBJCOPY"; then
46226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46227$as_echo "$BUILD_OBJCOPY" >&6; }
46228else
46229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46230$as_echo "no" >&6; }
46231fi
46232
46233
46234          if test "x$BUILD_OBJCOPY" = x; then
46235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46236          fi
46237        else
46238          # Otherwise we believe it is a complete path. Use it as it is.
46239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46240$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46242$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46243          if test ! -x "$tool_specified"; then
46244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46245$as_echo "not found" >&6; }
46246            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46247          fi
46248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46249$as_echo "$tool_specified" >&6; }
46250        fi
46251      fi
46252    fi
46253
46254  fi
46255
46256
46257
46258  # Only process if variable expands to non-empty
46259
46260  if test "x$BUILD_OBJCOPY" != x; then
46261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262
46263  # First separate the path from the arguments. This will split at the first
46264  # space.
46265  complete="$BUILD_OBJCOPY"
46266  path="${complete%% *}"
46267  tmp="$complete EOL"
46268  arguments="${tmp#* }"
46269
46270  # Input might be given as Windows format, start by converting to
46271  # unix format.
46272  new_path=`$CYGPATH -u "$path"`
46273
46274  # Now try to locate executable using which
46275  new_path=`$WHICH "$new_path" 2> /dev/null`
46276  # bat and cmd files are not always considered executable in cygwin causing which
46277  # to not find them
46278  if test "x$new_path" = x \
46279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46281    new_path=`$CYGPATH -u "$path"`
46282  fi
46283  if test "x$new_path" = x; then
46284    # Oops. Which didn't find the executable.
46285    # The splitting of arguments from the executable at a space might have been incorrect,
46286    # since paths with space are more likely in Windows. Give it another try with the whole
46287    # argument.
46288    path="$complete"
46289    arguments="EOL"
46290    new_path=`$CYGPATH -u "$path"`
46291    new_path=`$WHICH "$new_path" 2> /dev/null`
46292    # bat and cmd files are not always considered executable in cygwin causing which
46293    # to not find them
46294    if test "x$new_path" = x \
46295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46297      new_path=`$CYGPATH -u "$path"`
46298    fi
46299    if test "x$new_path" = x; then
46300      # It's still not found. Now this is an unrecoverable error.
46301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46302$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46303      has_space=`$ECHO "$complete" | $GREP " "`
46304      if test "x$has_space" != x; then
46305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46307      fi
46308      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46309    fi
46310  fi
46311
46312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46315  # "foo.exe" is OK but "foo" is an error.
46316  #
46317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46318  # It is also a way to make sure we got the proper file name for the real test later on.
46319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46320  if test "x$test_shortpath" = x; then
46321    # Short path failed, file does not exist as specified.
46322    # Try adding .exe or .cmd
46323    if test -f "${new_path}.exe"; then
46324      input_to_shortpath="${new_path}.exe"
46325    elif test -f "${new_path}.cmd"; then
46326      input_to_shortpath="${new_path}.cmd"
46327    else
46328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46329$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46332      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46333    fi
46334  else
46335    input_to_shortpath="$new_path"
46336  fi
46337
46338  # Call helper function which possibly converts this using DOS-style short mode.
46339  # If so, the updated path is stored in $new_path.
46340  new_path="$input_to_shortpath"
46341
46342  input_path="$input_to_shortpath"
46343  # Check if we need to convert this using DOS-style short mode. If the path
46344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46345  # take no chances and rewrite it.
46346  # Note: m4 eats our [], so we need to use [ and ] instead.
46347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46348  if test "x$has_forbidden_chars" != x; then
46349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46353      # Going to short mode and back again did indeed matter. Since short mode is
46354      # case insensitive, let's make it lowercase to improve readability.
46355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46356      # Now convert it back to Unix-style (cygpath)
46357      input_path=`$CYGPATH -u "$shortmode_path"`
46358      new_path="$input_path"
46359    fi
46360  fi
46361
46362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46363  if test "x$test_cygdrive_prefix" = x; then
46364    # As a simple fix, exclude /usr/bin since it's not a real path.
46365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46367      # a path prefixed by /cygdrive for fixpath to work.
46368      new_path="$CYGWIN_ROOT_PATH$input_path"
46369    fi
46370  fi
46371
46372  # remove trailing .exe if any
46373  new_path="${new_path/%.exe/}"
46374
46375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46376
46377  # First separate the path from the arguments. This will split at the first
46378  # space.
46379  complete="$BUILD_OBJCOPY"
46380  path="${complete%% *}"
46381  tmp="$complete EOL"
46382  arguments="${tmp#* }"
46383
46384  # Input might be given as Windows format, start by converting to
46385  # unix format.
46386  new_path="$path"
46387
46388  windows_path="$new_path"
46389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46390    unix_path=`$CYGPATH -u "$windows_path"`
46391    new_path="$unix_path"
46392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46394    new_path="$unix_path"
46395  fi
46396
46397
46398  # Now try to locate executable using which
46399  new_path=`$WHICH "$new_path" 2> /dev/null`
46400
46401  if test "x$new_path" = x; then
46402    # Oops. Which didn't find the executable.
46403    # The splitting of arguments from the executable at a space might have been incorrect,
46404    # since paths with space are more likely in Windows. Give it another try with the whole
46405    # argument.
46406    path="$complete"
46407    arguments="EOL"
46408    new_path="$path"
46409
46410  windows_path="$new_path"
46411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46412    unix_path=`$CYGPATH -u "$windows_path"`
46413    new_path="$unix_path"
46414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46416    new_path="$unix_path"
46417  fi
46418
46419
46420    new_path=`$WHICH "$new_path" 2> /dev/null`
46421    # bat and cmd files are not always considered executable in MSYS causing which
46422    # to not find them
46423    if test "x$new_path" = x \
46424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46426      new_path="$path"
46427
46428  windows_path="$new_path"
46429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46430    unix_path=`$CYGPATH -u "$windows_path"`
46431    new_path="$unix_path"
46432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46434    new_path="$unix_path"
46435  fi
46436
46437    fi
46438
46439    if test "x$new_path" = x; then
46440      # It's still not found. Now this is an unrecoverable error.
46441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46442$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46443      has_space=`$ECHO "$complete" | $GREP " "`
46444      if test "x$has_space" != x; then
46445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46447      fi
46448      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46449    fi
46450  fi
46451
46452  # Now new_path has a complete unix path to the binary
46453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46454    # Keep paths in /bin as-is, but remove trailing .exe if any
46455    new_path="${new_path/%.exe/}"
46456    # Do not save /bin paths to all_fixpath_prefixes!
46457  else
46458    # Not in mixed or Windows style, start by that.
46459    new_path=`cmd //c echo $new_path`
46460
46461  input_path="$new_path"
46462  # Check if we need to convert this using DOS-style short mode. If the path
46463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46464  # take no chances and rewrite it.
46465  # Note: m4 eats our [], so we need to use [ and ] instead.
46466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46467  if test "x$has_forbidden_chars" != x; then
46468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46470  fi
46471
46472    # Output is in $new_path
46473
46474  windows_path="$new_path"
46475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46476    unix_path=`$CYGPATH -u "$windows_path"`
46477    new_path="$unix_path"
46478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46480    new_path="$unix_path"
46481  fi
46482
46483    # remove trailing .exe if any
46484    new_path="${new_path/%.exe/}"
46485
46486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46488  fi
46489
46490    else
46491      # We're on a unix platform. Hooray! :)
46492      # First separate the path from the arguments. This will split at the first
46493      # space.
46494      complete="$BUILD_OBJCOPY"
46495      path="${complete%% *}"
46496      tmp="$complete EOL"
46497      arguments="${tmp#* }"
46498
46499      # Cannot rely on the command "which" here since it doesn't always work.
46500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46501      if test -z "$is_absolute_path"; then
46502        # Path to executable is not absolute. Find it.
46503        IFS_save="$IFS"
46504        IFS=:
46505        for p in $PATH; do
46506          if test -f "$p/$path" && test -x "$p/$path"; then
46507            new_path="$p/$path"
46508            break
46509          fi
46510        done
46511        IFS="$IFS_save"
46512      else
46513        # This is an absolute path, we can use it without further modifications.
46514        new_path="$path"
46515      fi
46516
46517      if test "x$new_path" = x; then
46518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46519$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46520        has_space=`$ECHO "$complete" | $GREP " "`
46521        if test "x$has_space" != x; then
46522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46524        fi
46525        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46526      fi
46527    fi
46528
46529    # Now join together the path and the arguments once again
46530    if test "x$arguments" != xEOL; then
46531      new_complete="$new_path ${arguments% *}"
46532    else
46533      new_complete="$new_path"
46534    fi
46535
46536    if test "x$complete" != "x$new_complete"; then
46537      BUILD_OBJCOPY="$new_complete"
46538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46539$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46540    fi
46541  fi
46542
46543
46544
46545  # Publish this variable in the help.
46546
46547
46548  if [ -z "${BUILD_STRIP+x}" ]; then
46549    # The variable is not set by user, try to locate tool using the code snippet
46550    for ac_prog in strip
46551do
46552  # Extract the first word of "$ac_prog", so it can be a program name with args.
46553set dummy $ac_prog; ac_word=$2
46554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46555$as_echo_n "checking for $ac_word... " >&6; }
46556if ${ac_cv_path_BUILD_STRIP+:} false; then :
46557  $as_echo_n "(cached) " >&6
46558else
46559  case $BUILD_STRIP in
46560  [\\/]* | ?:[\\/]*)
46561  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46562  ;;
46563  *)
46564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46565for as_dir in $PATH
46566do
46567  IFS=$as_save_IFS
46568  test -z "$as_dir" && as_dir=.
46569    for ac_exec_ext in '' $ac_executable_extensions; do
46570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46571    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46573    break 2
46574  fi
46575done
46576  done
46577IFS=$as_save_IFS
46578
46579  ;;
46580esac
46581fi
46582BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46583if test -n "$BUILD_STRIP"; then
46584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46585$as_echo "$BUILD_STRIP" >&6; }
46586else
46587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46588$as_echo "no" >&6; }
46589fi
46590
46591
46592  test -n "$BUILD_STRIP" && break
46593done
46594
46595  else
46596    # The variable is set, but is it from the command line or the environment?
46597
46598    # Try to remove the string !BUILD_STRIP! from our list.
46599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46601      # If it failed, the variable was not from the command line. Ignore it,
46602      # but warn the user (except for BASH, which is always set by the calling BASH).
46603      if test "xBUILD_STRIP" != xBASH; then
46604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46605$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46606      fi
46607      # Try to locate tool using the code snippet
46608      for ac_prog in strip
46609do
46610  # Extract the first word of "$ac_prog", so it can be a program name with args.
46611set dummy $ac_prog; ac_word=$2
46612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46613$as_echo_n "checking for $ac_word... " >&6; }
46614if ${ac_cv_path_BUILD_STRIP+:} false; then :
46615  $as_echo_n "(cached) " >&6
46616else
46617  case $BUILD_STRIP in
46618  [\\/]* | ?:[\\/]*)
46619  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46620  ;;
46621  *)
46622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46623for as_dir in $PATH
46624do
46625  IFS=$as_save_IFS
46626  test -z "$as_dir" && as_dir=.
46627    for ac_exec_ext in '' $ac_executable_extensions; do
46628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46629    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46631    break 2
46632  fi
46633done
46634  done
46635IFS=$as_save_IFS
46636
46637  ;;
46638esac
46639fi
46640BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46641if test -n "$BUILD_STRIP"; then
46642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46643$as_echo "$BUILD_STRIP" >&6; }
46644else
46645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46646$as_echo "no" >&6; }
46647fi
46648
46649
46650  test -n "$BUILD_STRIP" && break
46651done
46652
46653    else
46654      # If it succeeded, then it was overridden by the user. We will use it
46655      # for the tool.
46656
46657      # First remove it from the list of overridden variables, so we can test
46658      # for unknown variables in the end.
46659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46660
46661      # Check if we try to supply an empty value
46662      if test "x$BUILD_STRIP" = x; then
46663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46664$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46666$as_echo_n "checking for BUILD_STRIP... " >&6; }
46667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46668$as_echo "disabled" >&6; }
46669      else
46670        # Check if the provided tool contains a complete path.
46671        tool_specified="$BUILD_STRIP"
46672        tool_basename="${tool_specified##*/}"
46673        if test "x$tool_basename" = "x$tool_specified"; then
46674          # A command without a complete path is provided, search $PATH.
46675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46676$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46677          # Extract the first word of "$tool_basename", so it can be a program name with args.
46678set dummy $tool_basename; ac_word=$2
46679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46680$as_echo_n "checking for $ac_word... " >&6; }
46681if ${ac_cv_path_BUILD_STRIP+:} false; then :
46682  $as_echo_n "(cached) " >&6
46683else
46684  case $BUILD_STRIP in
46685  [\\/]* | ?:[\\/]*)
46686  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46687  ;;
46688  *)
46689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46690for as_dir in $PATH
46691do
46692  IFS=$as_save_IFS
46693  test -z "$as_dir" && as_dir=.
46694    for ac_exec_ext in '' $ac_executable_extensions; do
46695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46696    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46698    break 2
46699  fi
46700done
46701  done
46702IFS=$as_save_IFS
46703
46704  ;;
46705esac
46706fi
46707BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46708if test -n "$BUILD_STRIP"; then
46709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46710$as_echo "$BUILD_STRIP" >&6; }
46711else
46712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46713$as_echo "no" >&6; }
46714fi
46715
46716
46717          if test "x$BUILD_STRIP" = x; then
46718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46719          fi
46720        else
46721          # Otherwise we believe it is a complete path. Use it as it is.
46722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46723$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46725$as_echo_n "checking for BUILD_STRIP... " >&6; }
46726          if test ! -x "$tool_specified"; then
46727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46728$as_echo "not found" >&6; }
46729            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46730          fi
46731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46732$as_echo "$tool_specified" >&6; }
46733        fi
46734      fi
46735    fi
46736
46737  fi
46738
46739
46740
46741  # Only process if variable expands to non-empty
46742
46743  if test "x$BUILD_STRIP" != x; then
46744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46745
46746  # First separate the path from the arguments. This will split at the first
46747  # space.
46748  complete="$BUILD_STRIP"
46749  path="${complete%% *}"
46750  tmp="$complete EOL"
46751  arguments="${tmp#* }"
46752
46753  # Input might be given as Windows format, start by converting to
46754  # unix format.
46755  new_path=`$CYGPATH -u "$path"`
46756
46757  # Now try to locate executable using which
46758  new_path=`$WHICH "$new_path" 2> /dev/null`
46759  # bat and cmd files are not always considered executable in cygwin causing which
46760  # to not find them
46761  if test "x$new_path" = x \
46762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46764    new_path=`$CYGPATH -u "$path"`
46765  fi
46766  if test "x$new_path" = x; then
46767    # Oops. Which didn't find the executable.
46768    # The splitting of arguments from the executable at a space might have been incorrect,
46769    # since paths with space are more likely in Windows. Give it another try with the whole
46770    # argument.
46771    path="$complete"
46772    arguments="EOL"
46773    new_path=`$CYGPATH -u "$path"`
46774    new_path=`$WHICH "$new_path" 2> /dev/null`
46775    # bat and cmd files are not always considered executable in cygwin causing which
46776    # to not find them
46777    if test "x$new_path" = x \
46778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46780      new_path=`$CYGPATH -u "$path"`
46781    fi
46782    if test "x$new_path" = x; then
46783      # It's still not found. Now this is an unrecoverable error.
46784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46785$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46786      has_space=`$ECHO "$complete" | $GREP " "`
46787      if test "x$has_space" != x; then
46788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46790      fi
46791      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46792    fi
46793  fi
46794
46795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46798  # "foo.exe" is OK but "foo" is an error.
46799  #
46800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46801  # It is also a way to make sure we got the proper file name for the real test later on.
46802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46803  if test "x$test_shortpath" = x; then
46804    # Short path failed, file does not exist as specified.
46805    # Try adding .exe or .cmd
46806    if test -f "${new_path}.exe"; then
46807      input_to_shortpath="${new_path}.exe"
46808    elif test -f "${new_path}.cmd"; then
46809      input_to_shortpath="${new_path}.cmd"
46810    else
46811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46812$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46815      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46816    fi
46817  else
46818    input_to_shortpath="$new_path"
46819  fi
46820
46821  # Call helper function which possibly converts this using DOS-style short mode.
46822  # If so, the updated path is stored in $new_path.
46823  new_path="$input_to_shortpath"
46824
46825  input_path="$input_to_shortpath"
46826  # Check if we need to convert this using DOS-style short mode. If the path
46827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46828  # take no chances and rewrite it.
46829  # Note: m4 eats our [], so we need to use [ and ] instead.
46830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46831  if test "x$has_forbidden_chars" != x; then
46832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46836      # Going to short mode and back again did indeed matter. Since short mode is
46837      # case insensitive, let's make it lowercase to improve readability.
46838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46839      # Now convert it back to Unix-style (cygpath)
46840      input_path=`$CYGPATH -u "$shortmode_path"`
46841      new_path="$input_path"
46842    fi
46843  fi
46844
46845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46846  if test "x$test_cygdrive_prefix" = x; then
46847    # As a simple fix, exclude /usr/bin since it's not a real path.
46848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46850      # a path prefixed by /cygdrive for fixpath to work.
46851      new_path="$CYGWIN_ROOT_PATH$input_path"
46852    fi
46853  fi
46854
46855  # remove trailing .exe if any
46856  new_path="${new_path/%.exe/}"
46857
46858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46859
46860  # First separate the path from the arguments. This will split at the first
46861  # space.
46862  complete="$BUILD_STRIP"
46863  path="${complete%% *}"
46864  tmp="$complete EOL"
46865  arguments="${tmp#* }"
46866
46867  # Input might be given as Windows format, start by converting to
46868  # unix format.
46869  new_path="$path"
46870
46871  windows_path="$new_path"
46872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46873    unix_path=`$CYGPATH -u "$windows_path"`
46874    new_path="$unix_path"
46875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46877    new_path="$unix_path"
46878  fi
46879
46880
46881  # Now try to locate executable using which
46882  new_path=`$WHICH "$new_path" 2> /dev/null`
46883
46884  if test "x$new_path" = x; then
46885    # Oops. Which didn't find the executable.
46886    # The splitting of arguments from the executable at a space might have been incorrect,
46887    # since paths with space are more likely in Windows. Give it another try with the whole
46888    # argument.
46889    path="$complete"
46890    arguments="EOL"
46891    new_path="$path"
46892
46893  windows_path="$new_path"
46894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46895    unix_path=`$CYGPATH -u "$windows_path"`
46896    new_path="$unix_path"
46897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46899    new_path="$unix_path"
46900  fi
46901
46902
46903    new_path=`$WHICH "$new_path" 2> /dev/null`
46904    # bat and cmd files are not always considered executable in MSYS causing which
46905    # to not find them
46906    if test "x$new_path" = x \
46907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46909      new_path="$path"
46910
46911  windows_path="$new_path"
46912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46913    unix_path=`$CYGPATH -u "$windows_path"`
46914    new_path="$unix_path"
46915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46917    new_path="$unix_path"
46918  fi
46919
46920    fi
46921
46922    if test "x$new_path" = x; then
46923      # It's still not found. Now this is an unrecoverable error.
46924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46925$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46926      has_space=`$ECHO "$complete" | $GREP " "`
46927      if test "x$has_space" != x; then
46928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46930      fi
46931      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46932    fi
46933  fi
46934
46935  # Now new_path has a complete unix path to the binary
46936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46937    # Keep paths in /bin as-is, but remove trailing .exe if any
46938    new_path="${new_path/%.exe/}"
46939    # Do not save /bin paths to all_fixpath_prefixes!
46940  else
46941    # Not in mixed or Windows style, start by that.
46942    new_path=`cmd //c echo $new_path`
46943
46944  input_path="$new_path"
46945  # Check if we need to convert this using DOS-style short mode. If the path
46946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46947  # take no chances and rewrite it.
46948  # Note: m4 eats our [], so we need to use [ and ] instead.
46949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46950  if test "x$has_forbidden_chars" != x; then
46951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46953  fi
46954
46955    # Output is in $new_path
46956
46957  windows_path="$new_path"
46958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46959    unix_path=`$CYGPATH -u "$windows_path"`
46960    new_path="$unix_path"
46961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46963    new_path="$unix_path"
46964  fi
46965
46966    # remove trailing .exe if any
46967    new_path="${new_path/%.exe/}"
46968
46969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46971  fi
46972
46973    else
46974      # We're on a unix platform. Hooray! :)
46975      # First separate the path from the arguments. This will split at the first
46976      # space.
46977      complete="$BUILD_STRIP"
46978      path="${complete%% *}"
46979      tmp="$complete EOL"
46980      arguments="${tmp#* }"
46981
46982      # Cannot rely on the command "which" here since it doesn't always work.
46983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46984      if test -z "$is_absolute_path"; then
46985        # Path to executable is not absolute. Find it.
46986        IFS_save="$IFS"
46987        IFS=:
46988        for p in $PATH; do
46989          if test -f "$p/$path" && test -x "$p/$path"; then
46990            new_path="$p/$path"
46991            break
46992          fi
46993        done
46994        IFS="$IFS_save"
46995      else
46996        # This is an absolute path, we can use it without further modifications.
46997        new_path="$path"
46998      fi
46999
47000      if test "x$new_path" = x; then
47001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47002$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47003        has_space=`$ECHO "$complete" | $GREP " "`
47004        if test "x$has_space" != x; then
47005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47007        fi
47008        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47009      fi
47010    fi
47011
47012    # Now join together the path and the arguments once again
47013    if test "x$arguments" != xEOL; then
47014      new_complete="$new_path ${arguments% *}"
47015    else
47016      new_complete="$new_path"
47017    fi
47018
47019    if test "x$complete" != "x$new_complete"; then
47020      BUILD_STRIP="$new_complete"
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47022$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47023    fi
47024  fi
47025
47026    # Assume the C compiler is the assembler
47027    BUILD_AS="$BUILD_CC -c"
47028    # Just like for the target compiler, use the compiler as linker
47029    BUILD_LD="$BUILD_CC"
47030    BUILD_LDCXX="$BUILD_CXX"
47031
47032    PATH="$OLDPATH"
47033
47034
47035  COMPILER=$BUILD_CC
47036  COMPILER_NAME=BuildC
47037
47038  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47039    # cc -V output typically looks like
47040    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47041    # or
47042    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47043    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47044    # Check that this is likely to be the Solaris Studio cc.
47045    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47046    if test $? -ne 0; then
47047      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048      { $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
47049$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47050      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47051$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47052      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47053$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47054      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47055    fi
47056    # Remove usage instructions (if present), and
47057    # collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47059        $SED -e 's/ *[Uu]sage:.*//'`
47060    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47061        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47062  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47063    # xlc -qversion output typically looks like
47064    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47065    #     Version: 11.01.0000.0015
47066    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47067    # Check that this is likely to be the IBM XL C compiler.
47068    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47069    if test $? -ne 0; then
47070      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47071      { $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
47072$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47073      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47074$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47075      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47076$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47077      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47078    fi
47079    # Collapse compiler output into a single line
47080    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47081    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47082        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47083  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47084    # There is no specific version flag, but all output starts with a version string.
47085    # First line typically looks something like:
47086    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47087    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47088    # Check that this is likely to be Microsoft CL.EXE.
47089    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47090    if test $? -ne 0; then
47091      { $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
47092$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47094$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47095      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096    fi
47097    # Collapse compiler output into a single line
47098    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47099    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47101  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47102    # gcc --version output typically looks like
47103    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47104    #     Copyright (C) 2013 Free Software Foundation, Inc.
47105    #     This is free software; see the source for copying conditions.  There is NO
47106    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47107    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47108    # Check that this is likely to be GCC.
47109    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47110    if test $? -ne 0; then
47111      { $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
47112$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47114$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47116    fi
47117    # Remove Copyright and legalese from version string, and
47118    # collapse into a single line
47119    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47120        $SED -e 's/ *Copyright .*//'`
47121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47122        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47123  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47124    # clang --version output typically looks like
47125    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47126    #    clang version 3.3 (tags/RELEASE_33/final)
47127    # or
47128    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47129    #    Target: x86_64-pc-linux-gnu
47130    #    Thread model: posix
47131    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47132    # Check that this is likely to be clang
47133    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47134    if test $? -ne 0; then
47135      { $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
47136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47138$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47140    fi
47141    # Collapse compiler output into a single line
47142    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47143    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47144        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47145  else
47146      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47147  fi
47148  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47149  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47150  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47151  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47152
47153  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47154$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47155
47156
47157  COMPILER=$BUILD_CXX
47158  COMPILER_NAME=BuildC++
47159
47160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47161    # cc -V output typically looks like
47162    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47163    # or
47164    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47165    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47166    # Check that this is likely to be the Solaris Studio cc.
47167    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47168    if test $? -ne 0; then
47169      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47170      { $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
47171$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47173$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47174      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47175$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47176      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47177    fi
47178    # Remove usage instructions (if present), and
47179    # collapse compiler output into a single line
47180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47181        $SED -e 's/ *[Uu]sage:.*//'`
47182    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47183        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47184  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47185    # xlc -qversion output typically looks like
47186    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47187    #     Version: 11.01.0000.0015
47188    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47189    # Check that this is likely to be the IBM XL C compiler.
47190    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47191    if test $? -ne 0; then
47192      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47193      { $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
47194$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47195      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47196$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47197      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47198$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47199      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47200    fi
47201    # Collapse compiler output into a single line
47202    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47203    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47204        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47205  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47206    # There is no specific version flag, but all output starts with a version string.
47207    # First line typically looks something like:
47208    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47209    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47210    # Check that this is likely to be Microsoft CL.EXE.
47211    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47212    if test $? -ne 0; then
47213      { $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
47214$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47215      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47216$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47217      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47218    fi
47219    # Collapse compiler output into a single line
47220    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47221    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47222        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47223  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47224    # gcc --version output typically looks like
47225    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47226    #     Copyright (C) 2013 Free Software Foundation, Inc.
47227    #     This is free software; see the source for copying conditions.  There is NO
47228    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47229    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47230    # Check that this is likely to be GCC.
47231    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47232    if test $? -ne 0; then
47233      { $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
47234$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47235      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47236$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47237      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47238    fi
47239    # Remove Copyright and legalese from version string, and
47240    # collapse into a single line
47241    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47242        $SED -e 's/ *Copyright .*//'`
47243    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47244        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47245  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47246    # clang --version output typically looks like
47247    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47248    #    clang version 3.3 (tags/RELEASE_33/final)
47249    # or
47250    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47251    #    Target: x86_64-pc-linux-gnu
47252    #    Thread model: posix
47253    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47254    # Check that this is likely to be clang
47255    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47256    if test $? -ne 0; then
47257      { $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
47258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47260$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47261      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47262    fi
47263    # Collapse compiler output into a single line
47264    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47265    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47266        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47267  else
47268      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47269  fi
47270  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47271  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47272  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47273  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47274
47275  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47276$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47277
47278
47279  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47280    { $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
47281$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47283$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47284  fi
47285
47286  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47287  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47288    { $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
47289$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;}
47290  fi
47291
47292  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47293    { $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
47294$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47295  fi
47296
47297  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47298
47299  else
47300    # If we are not cross compiling, use the normal target compilers for
47301    # building the build platform executables.
47302    BUILD_CC="$CC"
47303    BUILD_CXX="$CXX"
47304    BUILD_LD="$LD"
47305    BUILD_LDCXX="$LDCXX"
47306    BUILD_NM="$NM"
47307    BUILD_AS="$AS"
47308    BUILD_OBJCOPY="$OBJCOPY"
47309    BUILD_STRIP="$STRIP"
47310    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47311    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47312    BUILD_AR="$AR"
47313
47314
47315  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47317$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47318    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47319$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47320  fi
47321
47322  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47323  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47324    { $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
47325$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;}
47326  fi
47327
47328  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47329    { $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
47330$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47331  fi
47332
47333  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47334
47335  fi
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350  # The package path is used only on macosx?
47351  # FIXME: clean this up, and/or move it elsewhere.
47352  PACKAGE_PATH=/opt/local
47353
47354
47355  # Check for extra potential brokenness.
47356  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47357    # On Windows, double-check that we got the right compiler.
47358    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47359    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47360    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47361      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47362        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
47363      fi
47364    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47365      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47366        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47367      fi
47368    fi
47369  fi
47370
47371  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47372    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47373    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47374    # This is later checked when setting flags.
47375
47376    # "-Og" suppported for GCC 4.8 and later
47377    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47420
47421
47422
47423
47424
47425    # Execute function body
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
47469
47470
47471
47472
47473
47474    # Execute function body
47475
47476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47477$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47478  supports=yes
47479
47480  saved_cflags="$CFLAGS"
47481  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47482  ac_ext=c
47483ac_cpp='$CPP $CPPFLAGS'
47484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47486ac_compiler_gnu=$ac_cv_c_compiler_gnu
47487
47488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47489/* end confdefs.h.  */
47490int i;
47491_ACEOF
47492if ac_fn_c_try_compile "$LINENO"; then :
47493
47494else
47495  supports=no
47496fi
47497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47498  ac_ext=cpp
47499ac_cpp='$CXXCPP $CPPFLAGS'
47500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47503
47504  CFLAGS="$saved_cflags"
47505
47506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47507$as_echo "$supports" >&6; }
47508  if test "x$supports" = "xyes" ; then
47509    :
47510    C_COMP_SUPPORTS="yes"
47511  else
47512    :
47513    C_COMP_SUPPORTS="no"
47514  fi
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
47569
47570
47571
47572
47573
47574    # Execute function body
47575
47576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47577$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47578  supports=yes
47579
47580  saved_cxxflags="$CXXFLAGS"
47581  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47582  ac_ext=cpp
47583ac_cpp='$CXXCPP $CPPFLAGS'
47584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47587
47588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47589/* end confdefs.h.  */
47590int i;
47591_ACEOF
47592if ac_fn_cxx_try_compile "$LINENO"; then :
47593
47594else
47595  supports=no
47596fi
47597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47598  ac_ext=cpp
47599ac_cpp='$CXXCPP $CPPFLAGS'
47600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47603
47604  CXXFLAGS="$saved_cxxflags"
47605
47606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47607$as_echo "$supports" >&6; }
47608  if test "x$supports" = "xyes" ; then
47609    :
47610    CXX_COMP_SUPPORTS="yes"
47611  else
47612    :
47613    CXX_COMP_SUPPORTS="no"
47614  fi
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47629$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47630  supports=no
47631  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47632
47633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47634$as_echo "$supports" >&6; }
47635  if test "x$supports" = "xyes" ; then
47636    :
47637    HAS_CFLAG_OPTIMIZE_DEBUG=true
47638  else
47639    :
47640    HAS_CFLAG_OPTIMIZE_DEBUG=false
47641  fi
47642
47643
47644
47645
47646
47647
47648
47649    # "-z relro" supported in GNU binutils 2.17 and later
47650    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
47693
47694
47695
47696
47697
47698    # Execute function body
47699
47700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47701$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47702  supports=yes
47703
47704  saved_ldflags="$LDFLAGS"
47705  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47706  ac_ext=c
47707ac_cpp='$CPP $CPPFLAGS'
47708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47710ac_compiler_gnu=$ac_cv_c_compiler_gnu
47711
47712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47713/* end confdefs.h.  */
47714
47715int
47716main ()
47717{
47718
47719  ;
47720  return 0;
47721}
47722_ACEOF
47723if ac_fn_c_try_link "$LINENO"; then :
47724
47725else
47726  supports=no
47727fi
47728rm -f core conftest.err conftest.$ac_objext \
47729    conftest$ac_exeext conftest.$ac_ext
47730  ac_ext=cpp
47731ac_cpp='$CXXCPP $CPPFLAGS'
47732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735
47736  LDFLAGS="$saved_ldflags"
47737
47738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47739$as_echo "$supports" >&6; }
47740  if test "x$supports" = "xyes" ; then
47741    :
47742    HAS_LINKER_RELRO=true
47743  else
47744    :
47745    HAS_LINKER_RELRO=false
47746  fi
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760    # "-z now" supported in GNU binutils 2.11 and later
47761    LINKER_NOW_FLAG="-Wl,-z,now"
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
47804
47805
47806
47807
47808
47809    # Execute function body
47810
47811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47812$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47813  supports=yes
47814
47815  saved_ldflags="$LDFLAGS"
47816  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47817  ac_ext=c
47818ac_cpp='$CPP $CPPFLAGS'
47819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47821ac_compiler_gnu=$ac_cv_c_compiler_gnu
47822
47823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47824/* end confdefs.h.  */
47825
47826int
47827main ()
47828{
47829
47830  ;
47831  return 0;
47832}
47833_ACEOF
47834if ac_fn_c_try_link "$LINENO"; then :
47835
47836else
47837  supports=no
47838fi
47839rm -f core conftest.err conftest.$ac_objext \
47840    conftest$ac_exeext conftest.$ac_ext
47841  ac_ext=cpp
47842ac_cpp='$CXXCPP $CPPFLAGS'
47843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47846
47847  LDFLAGS="$saved_ldflags"
47848
47849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47850$as_echo "$supports" >&6; }
47851  if test "x$supports" = "xyes" ; then
47852    :
47853    HAS_LINKER_NOW=true
47854  else
47855    :
47856    HAS_LINKER_NOW=false
47857  fi
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870  fi
47871
47872  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47873  # in executable.'
47874  USING_BROKEN_SUSE_LD=no
47875  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47877$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47878    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47879    $ECHO "int main() { }" > main.c
47880    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47882$as_echo "no" >&6; }
47883      USING_BROKEN_SUSE_LD=no
47884    else
47885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47886$as_echo "yes" >&6; }
47887      USING_BROKEN_SUSE_LD=yes
47888    fi
47889    $RM version-script.map main.c a.out
47890  fi
47891
47892
47893  # Setup hotspot lecagy names for toolchains
47894  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47895  if test "x$TOOLCHAIN_TYPE" = xclang; then
47896    HOTSPOT_TOOLCHAIN_TYPE=gcc
47897  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47898    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47899  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47900    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47901  fi
47902
47903
47904
47905# Setup the JTReg Regression Test Harness.
47906
47907
47908# Check whether --with-jtreg was given.
47909if test "${with_jtreg+set}" = set; then :
47910  withval=$with_jtreg;
47911else
47912  with_jtreg=no
47913fi
47914
47915
47916  if test "x$with_jtreg" = xno; then
47917    # jtreg disabled
47918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47919$as_echo_n "checking for jtreg... " >&6; }
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47921$as_echo "no" >&6; }
47922  else
47923    if test "x$with_jtreg" != xyes; then
47924      # with path specified.
47925      JT_HOME="$with_jtreg"
47926    fi
47927
47928    if test "x$JT_HOME" != x; then
47929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47930$as_echo_n "checking for jtreg... " >&6; }
47931
47932      # use JT_HOME enviroment var.
47933
47934  # Only process if variable expands to non-empty
47935
47936  if test "x$JT_HOME" != x; then
47937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47938
47939  # Input might be given as Windows format, start by converting to
47940  # unix format.
47941  path="$JT_HOME"
47942  new_path=`$CYGPATH -u "$path"`
47943
47944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47947  # "foo.exe" is OK but "foo" is an error.
47948  #
47949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47950  # It is also a way to make sure we got the proper file name for the real test later on.
47951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47952  if test "x$test_shortpath" = x; then
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47954$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47955    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47956  fi
47957
47958  # Call helper function which possibly converts this using DOS-style short mode.
47959  # If so, the updated path is stored in $new_path.
47960
47961  input_path="$new_path"
47962  # Check if we need to convert this using DOS-style short mode. If the path
47963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47964  # take no chances and rewrite it.
47965  # Note: m4 eats our [], so we need to use [ and ] instead.
47966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47967  if test "x$has_forbidden_chars" != x; then
47968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47972      # Going to short mode and back again did indeed matter. Since short mode is
47973      # case insensitive, let's make it lowercase to improve readability.
47974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47975      # Now convert it back to Unix-style (cygpath)
47976      input_path=`$CYGPATH -u "$shortmode_path"`
47977      new_path="$input_path"
47978    fi
47979  fi
47980
47981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47982  if test "x$test_cygdrive_prefix" = x; then
47983    # As a simple fix, exclude /usr/bin since it's not a real path.
47984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47986      # a path prefixed by /cygdrive for fixpath to work.
47987      new_path="$CYGWIN_ROOT_PATH$input_path"
47988    fi
47989  fi
47990
47991
47992  if test "x$path" != "x$new_path"; then
47993    JT_HOME="$new_path"
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47995$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47996  fi
47997
47998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47999
48000  path="$JT_HOME"
48001  has_colon=`$ECHO $path | $GREP ^.:`
48002  new_path="$path"
48003  if test "x$has_colon" = x; then
48004    # Not in mixed or Windows style, start by that.
48005    new_path=`cmd //c echo $path`
48006  fi
48007
48008
48009  input_path="$new_path"
48010  # Check if we need to convert this using DOS-style short mode. If the path
48011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48012  # take no chances and rewrite it.
48013  # Note: m4 eats our [], so we need to use [ and ] instead.
48014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48015  if test "x$has_forbidden_chars" != x; then
48016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48018  fi
48019
48020
48021  windows_path="$new_path"
48022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48023    unix_path=`$CYGPATH -u "$windows_path"`
48024    new_path="$unix_path"
48025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48027    new_path="$unix_path"
48028  fi
48029
48030  if test "x$path" != "x$new_path"; then
48031    JT_HOME="$new_path"
48032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48033$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48034  fi
48035
48036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48038
48039    else
48040      # We're on a unix platform. Hooray! :)
48041      path="$JT_HOME"
48042      has_space=`$ECHO "$path" | $GREP " "`
48043      if test "x$has_space" != x; then
48044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48045$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48047      fi
48048
48049      # Use eval to expand a potential ~
48050      eval path="$path"
48051      if test ! -f "$path" && test ! -d "$path"; then
48052        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48053      fi
48054
48055      if test -d "$path"; then
48056        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48057      else
48058        dir="`$DIRNAME "$path"`"
48059        base="`$BASENAME "$path"`"
48060        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48061      fi
48062    fi
48063  fi
48064
48065
48066      # jtreg win32 script works for everybody
48067      JTREGEXE="$JT_HOME/bin/jtreg"
48068
48069      if test ! -f "$JTREGEXE"; then
48070        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48071      fi
48072
48073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48074$as_echo "$JTREGEXE" >&6; }
48075    else
48076      # try to find jtreg on path
48077
48078
48079
48080  # Publish this variable in the help.
48081
48082
48083  if [ -z "${JTREGEXE+x}" ]; then
48084    # The variable is not set by user, try to locate tool using the code snippet
48085    for ac_prog in jtreg
48086do
48087  # Extract the first word of "$ac_prog", so it can be a program name with args.
48088set dummy $ac_prog; ac_word=$2
48089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48090$as_echo_n "checking for $ac_word... " >&6; }
48091if ${ac_cv_path_JTREGEXE+:} false; then :
48092  $as_echo_n "(cached) " >&6
48093else
48094  case $JTREGEXE in
48095  [\\/]* | ?:[\\/]*)
48096  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48097  ;;
48098  *)
48099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48100for as_dir in $PATH
48101do
48102  IFS=$as_save_IFS
48103  test -z "$as_dir" && as_dir=.
48104    for ac_exec_ext in '' $ac_executable_extensions; do
48105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48106    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48108    break 2
48109  fi
48110done
48111  done
48112IFS=$as_save_IFS
48113
48114  ;;
48115esac
48116fi
48117JTREGEXE=$ac_cv_path_JTREGEXE
48118if test -n "$JTREGEXE"; then
48119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48120$as_echo "$JTREGEXE" >&6; }
48121else
48122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48123$as_echo "no" >&6; }
48124fi
48125
48126
48127  test -n "$JTREGEXE" && break
48128done
48129
48130  else
48131    # The variable is set, but is it from the command line or the environment?
48132
48133    # Try to remove the string !JTREGEXE! from our list.
48134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48136      # If it failed, the variable was not from the command line. Ignore it,
48137      # but warn the user (except for BASH, which is always set by the calling BASH).
48138      if test "xJTREGEXE" != xBASH; then
48139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48140$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48141      fi
48142      # Try to locate tool using the code snippet
48143      for ac_prog in jtreg
48144do
48145  # Extract the first word of "$ac_prog", so it can be a program name with args.
48146set dummy $ac_prog; ac_word=$2
48147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48148$as_echo_n "checking for $ac_word... " >&6; }
48149if ${ac_cv_path_JTREGEXE+:} false; then :
48150  $as_echo_n "(cached) " >&6
48151else
48152  case $JTREGEXE in
48153  [\\/]* | ?:[\\/]*)
48154  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48155  ;;
48156  *)
48157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48158for as_dir in $PATH
48159do
48160  IFS=$as_save_IFS
48161  test -z "$as_dir" && as_dir=.
48162    for ac_exec_ext in '' $ac_executable_extensions; do
48163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48164    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48166    break 2
48167  fi
48168done
48169  done
48170IFS=$as_save_IFS
48171
48172  ;;
48173esac
48174fi
48175JTREGEXE=$ac_cv_path_JTREGEXE
48176if test -n "$JTREGEXE"; then
48177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48178$as_echo "$JTREGEXE" >&6; }
48179else
48180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48181$as_echo "no" >&6; }
48182fi
48183
48184
48185  test -n "$JTREGEXE" && break
48186done
48187
48188    else
48189      # If it succeeded, then it was overridden by the user. We will use it
48190      # for the tool.
48191
48192      # First remove it from the list of overridden variables, so we can test
48193      # for unknown variables in the end.
48194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48195
48196      # Check if we try to supply an empty value
48197      if test "x$JTREGEXE" = x; then
48198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48199$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48201$as_echo_n "checking for JTREGEXE... " >&6; }
48202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48203$as_echo "disabled" >&6; }
48204      else
48205        # Check if the provided tool contains a complete path.
48206        tool_specified="$JTREGEXE"
48207        tool_basename="${tool_specified##*/}"
48208        if test "x$tool_basename" = "x$tool_specified"; then
48209          # A command without a complete path is provided, search $PATH.
48210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48211$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48212          # Extract the first word of "$tool_basename", so it can be a program name with args.
48213set dummy $tool_basename; ac_word=$2
48214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48215$as_echo_n "checking for $ac_word... " >&6; }
48216if ${ac_cv_path_JTREGEXE+:} false; then :
48217  $as_echo_n "(cached) " >&6
48218else
48219  case $JTREGEXE in
48220  [\\/]* | ?:[\\/]*)
48221  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48222  ;;
48223  *)
48224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48225for as_dir in $PATH
48226do
48227  IFS=$as_save_IFS
48228  test -z "$as_dir" && as_dir=.
48229    for ac_exec_ext in '' $ac_executable_extensions; do
48230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48231    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48233    break 2
48234  fi
48235done
48236  done
48237IFS=$as_save_IFS
48238
48239  ;;
48240esac
48241fi
48242JTREGEXE=$ac_cv_path_JTREGEXE
48243if test -n "$JTREGEXE"; then
48244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48245$as_echo "$JTREGEXE" >&6; }
48246else
48247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48248$as_echo "no" >&6; }
48249fi
48250
48251
48252          if test "x$JTREGEXE" = x; then
48253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48254          fi
48255        else
48256          # Otherwise we believe it is a complete path. Use it as it is.
48257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48258$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48260$as_echo_n "checking for JTREGEXE... " >&6; }
48261          if test ! -x "$tool_specified"; then
48262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48263$as_echo "not found" >&6; }
48264            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48265          fi
48266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48267$as_echo "$tool_specified" >&6; }
48268        fi
48269      fi
48270    fi
48271
48272  fi
48273
48274
48275
48276  if test "x$JTREGEXE" = x; then
48277    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48278  fi
48279
48280
48281      JT_HOME="`$DIRNAME $JTREGEXE`"
48282    fi
48283  fi
48284
48285
48286
48287
48288
48289
48290  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48291  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48292  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48293  #                              commands produced by the link step (currently AIX only)
48294  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48295    COMPILER_TARGET_BITS_FLAG="-q"
48296    COMPILER_COMMAND_FILE_FLAG="-f"
48297    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48298  else
48299    COMPILER_TARGET_BITS_FLAG="-m"
48300    COMPILER_COMMAND_FILE_FLAG="@"
48301    COMPILER_BINDCMD_FILE_FLAG=""
48302
48303    # The solstudio linker does not support @-files.
48304    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48305      COMPILER_COMMAND_FILE_FLAG=
48306    fi
48307
48308    # Check if @file is supported by gcc
48309    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48310      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48311$as_echo_n "checking if @file is supported by gcc... " >&6; }
48312      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48313      $ECHO "" "--version" > command.file
48314      if $CXX @command.file 2>&5 >&5; then
48315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48316$as_echo "yes" >&6; }
48317        COMPILER_COMMAND_FILE_FLAG="@"
48318      else
48319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48320$as_echo "no" >&6; }
48321        COMPILER_COMMAND_FILE_FLAG=
48322      fi
48323      $RM command.file
48324    fi
48325  fi
48326
48327
48328
48329
48330  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48331  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48332    ARFLAGS="-r"
48333  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48334    ARFLAGS="-X64"
48335  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48336    # lib.exe is used as AR to create static libraries.
48337    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48338  else
48339    ARFLAGS=""
48340  fi
48341
48342
48343  ## Setup strip.
48344  # FIXME: should this really be per platform, or should it be per toolchain type?
48345  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48346  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48347  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48348    STRIPFLAGS="-g"
48349  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48350    STRIPFLAGS="-x"
48351  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48352    STRIPFLAGS="-S"
48353  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48354    STRIPFLAGS="-X32_64"
48355  fi
48356
48357
48358
48359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48360    CC_OUT_OPTION=-Fo
48361    EXE_OUT_OPTION=-out:
48362    LD_OUT_OPTION=-out:
48363    AR_OUT_OPTION=-out:
48364  else
48365    # The option used to specify the target .o,.a or .so file.
48366    # When compiling, how to specify the to be created object file.
48367    CC_OUT_OPTION='-o$(SPACE)'
48368    # When linking, how to specify the to be created executable.
48369    EXE_OUT_OPTION='-o$(SPACE)'
48370    # When linking, how to specify the to be created dynamically linkable library.
48371    LD_OUT_OPTION='-o$(SPACE)'
48372    # When archiving, how to specify the to be create static archive for object files.
48373    AR_OUT_OPTION='rcs$(SPACE)'
48374  fi
48375
48376
48377
48378
48379
48380  # On Windows, we need to set RC flags.
48381  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48382    RC_FLAGS="-nologo -l0x409"
48383    JVM_RCFLAGS="-nologo"
48384    if test "x$DEBUG_LEVEL" = xrelease; then
48385      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48386      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48387    fi
48388
48389    # The version variables used to create RC_FLAGS may be overridden
48390    # in a custom configure script, or possibly the command line.
48391    # Let those variables be expanded at make time in spec.gmk.
48392    # The \$ are escaped to the shell, and the $(...) variables
48393    # are evaluated by make.
48394    RC_FLAGS="$RC_FLAGS \
48395        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48396        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48397        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48398        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48399        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48400        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48401        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48402
48403    JVM_RCFLAGS="$JVM_RCFLAGS \
48404        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48405        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48406        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48407        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48408        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48409        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48410        -D\"HS_FNAME=jvm.dll\" \
48411        -D\"HS_INTERNAL_NAME=jvm\""
48412  fi
48413
48414
48415
48416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48417    # silence copyright notice and other headers.
48418    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48419  fi
48420
48421
48422# Now we can test some aspects on the target using configure macros.
48423
48424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48425$as_echo_n "checking for ANSI C header files... " >&6; }
48426if ${ac_cv_header_stdc+:} false; then :
48427  $as_echo_n "(cached) " >&6
48428else
48429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48430/* end confdefs.h.  */
48431#include <stdlib.h>
48432#include <stdarg.h>
48433#include <string.h>
48434#include <float.h>
48435
48436int
48437main ()
48438{
48439
48440  ;
48441  return 0;
48442}
48443_ACEOF
48444if ac_fn_cxx_try_compile "$LINENO"; then :
48445  ac_cv_header_stdc=yes
48446else
48447  ac_cv_header_stdc=no
48448fi
48449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48450
48451if test $ac_cv_header_stdc = yes; then
48452  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455#include <string.h>
48456
48457_ACEOF
48458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48459  $EGREP "memchr" >/dev/null 2>&1; then :
48460
48461else
48462  ac_cv_header_stdc=no
48463fi
48464rm -f conftest*
48465
48466fi
48467
48468if test $ac_cv_header_stdc = yes; then
48469  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48471/* end confdefs.h.  */
48472#include <stdlib.h>
48473
48474_ACEOF
48475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48476  $EGREP "free" >/dev/null 2>&1; then :
48477
48478else
48479  ac_cv_header_stdc=no
48480fi
48481rm -f conftest*
48482
48483fi
48484
48485if test $ac_cv_header_stdc = yes; then
48486  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48487  if test "$cross_compiling" = yes; then :
48488  :
48489else
48490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48491/* end confdefs.h.  */
48492#include <ctype.h>
48493#include <stdlib.h>
48494#if ((' ' & 0x0FF) == 0x020)
48495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48497#else
48498# define ISLOWER(c) \
48499		   (('a' <= (c) && (c) <= 'i') \
48500		     || ('j' <= (c) && (c) <= 'r') \
48501		     || ('s' <= (c) && (c) <= 'z'))
48502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48503#endif
48504
48505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48506int
48507main ()
48508{
48509  int i;
48510  for (i = 0; i < 256; i++)
48511    if (XOR (islower (i), ISLOWER (i))
48512	|| toupper (i) != TOUPPER (i))
48513      return 2;
48514  return 0;
48515}
48516_ACEOF
48517if ac_fn_cxx_try_run "$LINENO"; then :
48518
48519else
48520  ac_cv_header_stdc=no
48521fi
48522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48523  conftest.$ac_objext conftest.beam conftest.$ac_ext
48524fi
48525
48526fi
48527fi
48528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48529$as_echo "$ac_cv_header_stdc" >&6; }
48530if test $ac_cv_header_stdc = yes; then
48531
48532$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48533
48534fi
48535
48536# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48537for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48538		  inttypes.h stdint.h unistd.h
48539do :
48540  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48541ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48542"
48543if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48544  cat >>confdefs.h <<_ACEOF
48545#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48546_ACEOF
48547
48548fi
48549
48550done
48551
48552
48553
48554  ###############################################################################
48555  #
48556  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48557  # (The JVM can use 32 or 64 bit Java pointers but that decision
48558  # is made at runtime.)
48559  #
48560
48561  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48562    # Always specify -m flag on Solaris
48563    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48564
48565  # When we add flags to the "official" CFLAGS etc, we need to
48566  # keep track of these additions in ADDED_CFLAGS etc. These
48567  # will later be checked to make sure only controlled additions
48568  # have been made to CFLAGS etc.
48569  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572
48573  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48574  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48575  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48576
48577  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48578  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48579  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48580
48581  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48582  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48583  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48584
48585  elif test "x$COMPILE_TYPE" = xreduced; then
48586    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48587      # Specify -m if running reduced on unix platforms
48588
48589  # When we add flags to the "official" CFLAGS etc, we need to
48590  # keep track of these additions in ADDED_CFLAGS etc. These
48591  # will later be checked to make sure only controlled additions
48592  # have been made to CFLAGS etc.
48593  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48594  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48596
48597  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48598  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48599  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48600
48601  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48602  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48603  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48604
48605  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48606  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48607  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48608
48609    fi
48610  fi
48611  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48612    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48613    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48614    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48615  fi
48616
48617  # Make compilation sanity check
48618  for ac_header in stdio.h
48619do :
48620  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48621if test "x$ac_cv_header_stdio_h" = xyes; then :
48622  cat >>confdefs.h <<_ACEOF
48623#define HAVE_STDIO_H 1
48624_ACEOF
48625
48626else
48627
48628    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48629$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48630    if test "x$COMPILE_TYPE" = xreduced; then
48631
48632  # Print a helpful message on how to acquire the necessary build dependency.
48633  # reduced is the help tag: freetype, cups, alsa etc
48634  MISSING_DEPENDENCY=reduced
48635
48636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48637    cygwin_help $MISSING_DEPENDENCY
48638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48639    msys_help $MISSING_DEPENDENCY
48640  else
48641    PKGHANDLER_COMMAND=
48642
48643    case $PKGHANDLER in
48644      apt-get)
48645        apt_help     $MISSING_DEPENDENCY ;;
48646      yum)
48647        yum_help     $MISSING_DEPENDENCY ;;
48648      brew)
48649        brew_help    $MISSING_DEPENDENCY ;;
48650      port)
48651        port_help    $MISSING_DEPENDENCY ;;
48652      pkgutil)
48653        pkgutil_help $MISSING_DEPENDENCY ;;
48654      pkgadd)
48655        pkgadd_help  $MISSING_DEPENDENCY ;;
48656    esac
48657
48658    if test "x$PKGHANDLER_COMMAND" != x; then
48659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48660    fi
48661  fi
48662
48663      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48664$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48665    elif test "x$COMPILE_TYPE" = xcross; then
48666      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48667$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48668    fi
48669    as_fn_error $? "Cannot continue." "$LINENO" 5
48670
48671fi
48672
48673done
48674
48675
48676  # The cast to long int works around a bug in the HP C Compiler
48677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48679# This bug is HP SR number 8606223364.
48680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48681$as_echo_n "checking size of int *... " >&6; }
48682if ${ac_cv_sizeof_int_p+:} false; then :
48683  $as_echo_n "(cached) " >&6
48684else
48685  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48686
48687else
48688  if test "$ac_cv_type_int_p" = yes; then
48689     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48691as_fn_error 77 "cannot compute sizeof (int *)
48692See \`config.log' for more details" "$LINENO" 5; }
48693   else
48694     ac_cv_sizeof_int_p=0
48695   fi
48696fi
48697
48698fi
48699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48700$as_echo "$ac_cv_sizeof_int_p" >&6; }
48701
48702
48703
48704cat >>confdefs.h <<_ACEOF
48705#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48706_ACEOF
48707
48708
48709
48710  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48711  if test "x$ac_cv_sizeof_int_p" = x; then
48712    # The test failed, lets stick to the assumed value.
48713    { $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
48714$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48715  else
48716    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48717
48718    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48719      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48720      # Let's try to implicitely set the compilers target architecture and retry the test
48721      { $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
48722$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;}
48723      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48724$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48725
48726  # When we add flags to the "official" CFLAGS etc, we need to
48727  # keep track of these additions in ADDED_CFLAGS etc. These
48728  # will later be checked to make sure only controlled additions
48729  # have been made to CFLAGS etc.
48730  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48731  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48732  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48733
48734  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48735  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48736  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48737
48738  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48739  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48740  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48741
48742  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48743  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48744  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48745
48746
48747      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48748      unset ac_cv_sizeof_int_p
48749      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48750      cat >>confdefs.h <<_ACEOF
48751#undef SIZEOF_INT_P
48752_ACEOF
48753
48754      # The cast to long int works around a bug in the HP C Compiler
48755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48757# This bug is HP SR number 8606223364.
48758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48759$as_echo_n "checking size of int *... " >&6; }
48760if ${ac_cv_sizeof_int_p+:} false; then :
48761  $as_echo_n "(cached) " >&6
48762else
48763  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48764
48765else
48766  if test "$ac_cv_type_int_p" = yes; then
48767     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48769as_fn_error 77 "cannot compute sizeof (int *)
48770See \`config.log' for more details" "$LINENO" 5; }
48771   else
48772     ac_cv_sizeof_int_p=0
48773   fi
48774fi
48775
48776fi
48777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48778$as_echo "$ac_cv_sizeof_int_p" >&6; }
48779
48780
48781
48782cat >>confdefs.h <<_ACEOF
48783#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48784_ACEOF
48785
48786
48787
48788      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48789
48790      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48791        { $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
48792$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;}
48793        if test "x$COMPILE_TYPE" = xreduced; then
48794
48795  # Print a helpful message on how to acquire the necessary build dependency.
48796  # reduced is the help tag: freetype, cups, alsa etc
48797  MISSING_DEPENDENCY=reduced
48798
48799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48800    cygwin_help $MISSING_DEPENDENCY
48801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48802    msys_help $MISSING_DEPENDENCY
48803  else
48804    PKGHANDLER_COMMAND=
48805
48806    case $PKGHANDLER in
48807      apt-get)
48808        apt_help     $MISSING_DEPENDENCY ;;
48809      yum)
48810        yum_help     $MISSING_DEPENDENCY ;;
48811      brew)
48812        brew_help    $MISSING_DEPENDENCY ;;
48813      port)
48814        port_help    $MISSING_DEPENDENCY ;;
48815      pkgutil)
48816        pkgutil_help $MISSING_DEPENDENCY ;;
48817      pkgadd)
48818        pkgadd_help  $MISSING_DEPENDENCY ;;
48819    esac
48820
48821    if test "x$PKGHANDLER_COMMAND" != x; then
48822      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48823    fi
48824  fi
48825
48826          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48827$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48828        elif test "x$COMPILE_TYPE" = xcross; then
48829          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48830$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48831        fi
48832        as_fn_error $? "Cannot continue." "$LINENO" 5
48833      fi
48834    fi
48835  fi
48836
48837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48838$as_echo_n "checking for target address size... " >&6; }
48839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48840$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48841
48842
48843  ###############################################################################
48844  #
48845  # Is the target little of big endian?
48846  #
48847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48848$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48849if ${ac_cv_c_bigendian+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  ac_cv_c_bigendian=unknown
48853    # See if we're dealing with a universal compiler.
48854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856#ifndef __APPLE_CC__
48857	       not a universal capable compiler
48858	     #endif
48859	     typedef int dummy;
48860
48861_ACEOF
48862if ac_fn_cxx_try_compile "$LINENO"; then :
48863
48864	# Check for potential -arch flags.  It is not universal unless
48865	# there are at least two -arch flags with different values.
48866	ac_arch=
48867	ac_prev=
48868	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48869	 if test -n "$ac_prev"; then
48870	   case $ac_word in
48871	     i?86 | x86_64 | ppc | ppc64)
48872	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48873		 ac_arch=$ac_word
48874	       else
48875		 ac_cv_c_bigendian=universal
48876		 break
48877	       fi
48878	       ;;
48879	   esac
48880	   ac_prev=
48881	 elif test "x$ac_word" = "x-arch"; then
48882	   ac_prev=arch
48883	 fi
48884       done
48885fi
48886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48887    if test $ac_cv_c_bigendian = unknown; then
48888      # See if sys/param.h defines the BYTE_ORDER macro.
48889      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48890/* end confdefs.h.  */
48891#include <sys/types.h>
48892	     #include <sys/param.h>
48893
48894int
48895main ()
48896{
48897#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48898		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48899		     && LITTLE_ENDIAN)
48900	      bogus endian macros
48901	     #endif
48902
48903  ;
48904  return 0;
48905}
48906_ACEOF
48907if ac_fn_cxx_try_compile "$LINENO"; then :
48908  # It does; now see whether it defined to BIG_ENDIAN or not.
48909	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48910/* end confdefs.h.  */
48911#include <sys/types.h>
48912		#include <sys/param.h>
48913
48914int
48915main ()
48916{
48917#if BYTE_ORDER != BIG_ENDIAN
48918		 not big endian
48919		#endif
48920
48921  ;
48922  return 0;
48923}
48924_ACEOF
48925if ac_fn_cxx_try_compile "$LINENO"; then :
48926  ac_cv_c_bigendian=yes
48927else
48928  ac_cv_c_bigendian=no
48929fi
48930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48931fi
48932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48933    fi
48934    if test $ac_cv_c_bigendian = unknown; then
48935      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48936      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48937/* end confdefs.h.  */
48938#include <limits.h>
48939
48940int
48941main ()
48942{
48943#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48944	      bogus endian macros
48945	     #endif
48946
48947  ;
48948  return 0;
48949}
48950_ACEOF
48951if ac_fn_cxx_try_compile "$LINENO"; then :
48952  # It does; now see whether it defined to _BIG_ENDIAN or not.
48953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48954/* end confdefs.h.  */
48955#include <limits.h>
48956
48957int
48958main ()
48959{
48960#ifndef _BIG_ENDIAN
48961		 not big endian
48962		#endif
48963
48964  ;
48965  return 0;
48966}
48967_ACEOF
48968if ac_fn_cxx_try_compile "$LINENO"; then :
48969  ac_cv_c_bigendian=yes
48970else
48971  ac_cv_c_bigendian=no
48972fi
48973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48974fi
48975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48976    fi
48977    if test $ac_cv_c_bigendian = unknown; then
48978      # Compile a test program.
48979      if test "$cross_compiling" = yes; then :
48980  # Try to guess by grepping values from an object file.
48981	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48982/* end confdefs.h.  */
48983short int ascii_mm[] =
48984		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48985		short int ascii_ii[] =
48986		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48987		int use_ascii (int i) {
48988		  return ascii_mm[i] + ascii_ii[i];
48989		}
48990		short int ebcdic_ii[] =
48991		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48992		short int ebcdic_mm[] =
48993		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48994		int use_ebcdic (int i) {
48995		  return ebcdic_mm[i] + ebcdic_ii[i];
48996		}
48997		extern int foo;
48998
48999int
49000main ()
49001{
49002return use_ascii (foo) == use_ebcdic (foo);
49003  ;
49004  return 0;
49005}
49006_ACEOF
49007if ac_fn_cxx_try_compile "$LINENO"; then :
49008  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49009	      ac_cv_c_bigendian=yes
49010	    fi
49011	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49012	      if test "$ac_cv_c_bigendian" = unknown; then
49013		ac_cv_c_bigendian=no
49014	      else
49015		# finding both strings is unlikely to happen, but who knows?
49016		ac_cv_c_bigendian=unknown
49017	      fi
49018	    fi
49019fi
49020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49021else
49022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49023/* end confdefs.h.  */
49024$ac_includes_default
49025int
49026main ()
49027{
49028
49029	     /* Are we little or big endian?  From Harbison&Steele.  */
49030	     union
49031	     {
49032	       long int l;
49033	       char c[sizeof (long int)];
49034	     } u;
49035	     u.l = 1;
49036	     return u.c[sizeof (long int) - 1] == 1;
49037
49038  ;
49039  return 0;
49040}
49041_ACEOF
49042if ac_fn_cxx_try_run "$LINENO"; then :
49043  ac_cv_c_bigendian=no
49044else
49045  ac_cv_c_bigendian=yes
49046fi
49047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49048  conftest.$ac_objext conftest.beam conftest.$ac_ext
49049fi
49050
49051    fi
49052fi
49053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49054$as_echo "$ac_cv_c_bigendian" >&6; }
49055 case $ac_cv_c_bigendian in #(
49056   yes)
49057     ENDIAN="big";; #(
49058   no)
49059     ENDIAN="little" ;; #(
49060   universal)
49061     ENDIAN="universal_endianness"
49062     ;; #(
49063   *)
49064     ENDIAN="unknown" ;;
49065 esac
49066
49067
49068  if test "x$ENDIAN" = xuniversal_endianness; then
49069    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49070  fi
49071  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49072    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
49073  fi
49074
49075
49076# Configure flags for the tools
49077
49078  ###############################################################################
49079  #
49080  # How to compile shared libraries.
49081  #
49082
49083  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49084    PICFLAG="-fPIC"
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087
49088    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49089      # Linking is different on MacOSX
49090      if test "x$STATIC_BUILD" = xtrue; then
49091        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49092      else
49093        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49094        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49095      fi
49096      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49097      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49098      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49099      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49100    else
49101      # Default works for linux, might work on other platforms as well.
49102      SHARED_LIBRARY_FLAGS='-shared'
49103      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49104      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49105      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49106      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49107    fi
49108  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49109    C_FLAG_REORDER=''
49110    CXX_FLAG_REORDER=''
49111
49112    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49113      # Linking is different on MacOSX
49114      PICFLAG=''
49115      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49116      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49117      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49118      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49119      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49120
49121      if test "x$STATIC_BUILD" = xfalse; then
49122        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49123      fi
49124    else
49125      # Default works for linux, might work on other platforms as well.
49126      PICFLAG='-fPIC'
49127      SHARED_LIBRARY_FLAGS='-shared'
49128      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49129      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49130      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49131
49132      # arm specific settings
49133      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49134        # '-Wl,-z,origin' isn't used on arm.
49135        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49136      else
49137        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49138      fi
49139
49140    fi
49141  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49142    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49143      PICFLAG="-xcode=pic32"
49144    else
49145      PICFLAG="-KPIC"
49146    fi
49147    C_FLAG_REORDER='-xF'
49148    CXX_FLAG_REORDER='-xF'
49149    SHARED_LIBRARY_FLAGS="-G"
49150    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49151    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49152    SET_SHARED_LIBRARY_NAME='-h $1'
49153    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49154  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49155    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49156    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49157    # will have to patch this single instruction with a call to some out-of-order code which
49158    # does the load from the TOC. This is of course slow. But in that case we also would have
49159    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49160    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49161    # can be patched directly by the linker and does not require a jump to out-of-order code.
49162    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49163    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49164    # loads for accessing a global variable). But there are rumors that this may be seen as a
49165    # 'performance feature' because of improved code locality of the symbols used in a
49166    # compilation unit.
49167    PICFLAG="-qpic"
49168    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49169    C_FLAG_REORDER=''
49170    CXX_FLAG_REORDER=''
49171    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49172    SET_EXECUTABLE_ORIGIN=""
49173    SET_SHARED_LIBRARY_ORIGIN=''
49174    SET_SHARED_LIBRARY_NAME=''
49175    SET_SHARED_LIBRARY_MAPFILE=''
49176  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49177    PICFLAG=""
49178    C_FLAG_REORDER=''
49179    CXX_FLAG_REORDER=''
49180    SHARED_LIBRARY_FLAGS="-dll"
49181    SET_EXECUTABLE_ORIGIN=''
49182    SET_SHARED_LIBRARY_ORIGIN=''
49183    SET_SHARED_LIBRARY_NAME=''
49184    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49185  fi
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195  # The (cross) compiler is now configured, we can now test capabilities
49196  # of the target platform.
49197
49198
49199
49200  ###############################################################################
49201  #
49202  # Setup the opt flags for different compilers
49203  # and different operating systems.
49204  #
49205
49206  # FIXME: this was indirectly the old default, but just inherited.
49207  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49208  #   C_FLAG_DEPS="-MMD -MF"
49209  # fi
49210
49211  # Generate make dependency files
49212  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49213    C_FLAG_DEPS="-MMD -MF"
49214  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49215    C_FLAG_DEPS="-MMD -MF"
49216  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49217    C_FLAG_DEPS="-xMMD -xMF"
49218  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49219    C_FLAG_DEPS="-qmakedep=gcc -MF"
49220  fi
49221  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49222
49223
49224
49225  # Debug symbols
49226  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49227    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49228      # reduce from default "-g2" option to save space
49229      CFLAGS_DEBUG_SYMBOLS="-g1"
49230      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49231    else
49232      CFLAGS_DEBUG_SYMBOLS="-g"
49233      CXXFLAGS_DEBUG_SYMBOLS="-g"
49234    fi
49235  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49236    CFLAGS_DEBUG_SYMBOLS="-g"
49237    CXXFLAGS_DEBUG_SYMBOLS="-g"
49238  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49239    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49240    # -g0 enables debug symbols without disabling inlining.
49241    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49242  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49243    CFLAGS_DEBUG_SYMBOLS="-g"
49244    CXXFLAGS_DEBUG_SYMBOLS="-g"
49245  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49246    CFLAGS_DEBUG_SYMBOLS="-Zi"
49247    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49248  fi
49249
49250
49251
49252  # Debug symbols for JVM_CFLAGS
49253  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49254    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49255    if test "x$DEBUG_LEVEL" = xslowdebug; then
49256      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49257    else
49258      # -g0 does not disable inlining, which -g does.
49259      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49260    fi
49261  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49262    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49263  else
49264    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49265  fi
49266
49267
49268  # bounds, memory and behavior checking options
49269  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49270    case $DEBUG_LEVEL in
49271    release )
49272      # no adjustment
49273      ;;
49274    fastdebug )
49275      # no adjustment
49276      ;;
49277    slowdebug )
49278      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49279      # get's added conditionally on whether we produce debug symbols or not.
49280      # This is most likely not really correct.
49281
49282      # Add runtime stack smashing and undefined behavior checks.
49283      # Not all versions of gcc support -fstack-protector
49284      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49322
49323
49324
49325
49326
49327    # Execute function body
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
49371
49372
49373
49374
49375
49376    # Execute function body
49377
49378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49379$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49380  supports=yes
49381
49382  saved_cflags="$CFLAGS"
49383  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49384  ac_ext=c
49385ac_cpp='$CPP $CPPFLAGS'
49386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49388ac_compiler_gnu=$ac_cv_c_compiler_gnu
49389
49390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49391/* end confdefs.h.  */
49392int i;
49393_ACEOF
49394if ac_fn_c_try_compile "$LINENO"; then :
49395
49396else
49397  supports=no
49398fi
49399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49400  ac_ext=cpp
49401ac_cpp='$CXXCPP $CPPFLAGS'
49402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49405
49406  CFLAGS="$saved_cflags"
49407
49408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49409$as_echo "$supports" >&6; }
49410  if test "x$supports" = "xyes" ; then
49411    :
49412    C_COMP_SUPPORTS="yes"
49413  else
49414    :
49415    C_COMP_SUPPORTS="no"
49416  fi
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
49471
49472
49473
49474
49475
49476    # Execute function body
49477
49478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49479$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49480  supports=yes
49481
49482  saved_cxxflags="$CXXFLAGS"
49483  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49484  ac_ext=cpp
49485ac_cpp='$CXXCPP $CPPFLAGS'
49486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49489
49490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49491/* end confdefs.h.  */
49492int i;
49493_ACEOF
49494if ac_fn_cxx_try_compile "$LINENO"; then :
49495
49496else
49497  supports=no
49498fi
49499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49500  ac_ext=cpp
49501ac_cpp='$CXXCPP $CPPFLAGS'
49502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49505
49506  CXXFLAGS="$saved_cxxflags"
49507
49508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49509$as_echo "$supports" >&6; }
49510  if test "x$supports" = "xyes" ; then
49511    :
49512    CXX_COMP_SUPPORTS="yes"
49513  else
49514    :
49515    CXX_COMP_SUPPORTS="no"
49516  fi
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49531$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49532  supports=no
49533  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49534
49535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49536$as_echo "$supports" >&6; }
49537  if test "x$supports" = "xyes" ; then
49538    :
49539
49540  else
49541    :
49542    STACK_PROTECTOR_CFLAG=""
49543  fi
49544
49545
49546
49547
49548
49549
49550
49551      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49552      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49553      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49554        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49555      fi
49556      ;;
49557    esac
49558  fi
49559
49560  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49561    if test "x$DEBUG_LEVEL" != xrelease; then
49562      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49563        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49564      fi
49565    fi
49566  fi
49567
49568  # Optimization levels
49569  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49570    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49571
49572    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49573      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49574      C_O_FLAG_HIGHEST_JVM="-xO4"
49575      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49576      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49577      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49578      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49579      C_O_FLAG_DEBUG_JVM=""
49580      C_O_FLAG_NONE="-xregs=no%frameptr"
49581      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49582      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49583      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49584      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49585      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49586      CXX_O_FLAG_DEBUG_JVM=""
49587      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49588      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49589        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49590        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49591      fi
49592    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49593      C_O_FLAG_HIGHEST_JVM="-xO4"
49594      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49595      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49596      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49597      C_O_FLAG_DEBUG=""
49598      C_O_FLAG_DEBUG_JVM=""
49599      C_O_FLAG_NONE=""
49600      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49601      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49602      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49603      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49604      CXX_O_FLAG_DEBUG=""
49605      CXX_O_FLAG_DEBUG_JVM=""
49606      CXX_O_FLAG_NONE=""
49607    fi
49608  else
49609    # The remaining toolchains share opt flags between CC and CXX;
49610    # setup for C and duplicate afterwards.
49611    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49612      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49613        # On MacOSX we optimize for size, something
49614        # we should do for all platforms?
49615        C_O_FLAG_HIGHEST_JVM="-Os"
49616        C_O_FLAG_HIGHEST="-Os"
49617        C_O_FLAG_HI="-Os"
49618        C_O_FLAG_NORM="-Os"
49619        C_O_FLAG_SIZE="-Os"
49620      else
49621        C_O_FLAG_HIGHEST_JVM="-O3"
49622        C_O_FLAG_HIGHEST="-O3"
49623        C_O_FLAG_HI="-O3"
49624        C_O_FLAG_NORM="-O2"
49625        C_O_FLAG_SIZE="-Os"
49626      fi
49627      C_O_FLAG_DEBUG="-O0"
49628      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49629        C_O_FLAG_DEBUG_JVM=""
49630      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49631        C_O_FLAG_DEBUG_JVM="-O0"
49632      fi
49633      C_O_FLAG_NONE="-O0"
49634    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49635      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49636        # On MacOSX we optimize for size, something
49637        # we should do for all platforms?
49638        C_O_FLAG_HIGHEST_JVM="-Os"
49639        C_O_FLAG_HIGHEST="-Os"
49640        C_O_FLAG_HI="-Os"
49641        C_O_FLAG_NORM="-Os"
49642        C_O_FLAG_SIZE="-Os"
49643      else
49644        C_O_FLAG_HIGHEST_JVM="-O3"
49645        C_O_FLAG_HIGHEST="-O3"
49646        C_O_FLAG_HI="-O3"
49647        C_O_FLAG_NORM="-O2"
49648        C_O_FLAG_SIZE="-Os"
49649      fi
49650      C_O_FLAG_DEBUG="-O0"
49651      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49652        C_O_FLAG_DEBUG_JVM=""
49653      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49654        C_O_FLAG_DEBUG_JVM="-O0"
49655      fi
49656      C_O_FLAG_NONE="-O0"
49657    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49658      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49659      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49660      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49661      C_O_FLAG_NORM="-O2"
49662      C_O_FLAG_DEBUG="-qnoopt"
49663      # FIXME: Value below not verified.
49664      C_O_FLAG_DEBUG_JVM=""
49665      C_O_FLAG_NONE="-qnoopt"
49666    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49667      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49668      C_O_FLAG_HIGHEST="-O2"
49669      C_O_FLAG_HI="-O1"
49670      C_O_FLAG_NORM="-O1"
49671      C_O_FLAG_DEBUG="-Od"
49672      C_O_FLAG_DEBUG_JVM=""
49673      C_O_FLAG_NONE="-Od"
49674      C_O_FLAG_SIZE="-Os"
49675    fi
49676    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49677    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49678    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49679    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49680    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49681    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49682    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49683    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49684  fi
49685
49686  # Adjust optimization flags according to debug level.
49687  case $DEBUG_LEVEL in
49688    release )
49689      # no adjustment
49690      ;;
49691    fastdebug )
49692      # Not quite so much optimization
49693      C_O_FLAG_HI="$C_O_FLAG_NORM"
49694      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49695      ;;
49696    slowdebug )
49697      # Disable optimization
49698      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49699      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49700      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49701      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49702      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49703      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49704      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49705      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49706      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49707      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49708      ;;
49709  esac
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730# Check whether --with-abi-profile was given.
49731if test "${with_abi_profile+set}" = set; then :
49732  withval=$with_abi_profile;
49733fi
49734
49735
49736  if test "x$with_abi_profile" != x; then
49737    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49738        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49739      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49740    fi
49741
49742    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49744$as_echo_n "checking for ABI profle... " >&6; }
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49746$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49747
49748    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49749      ARM_FLOAT_TYPE=vfp-sflt
49750      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49751    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49752      ARM_FLOAT_TYPE=vfp-hflt
49753      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49754    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49755      ARM_FLOAT_TYPE=sflt
49756      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49757    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49758      ARM_FLOAT_TYPE=vfp-sflt
49759      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49760    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49761      ARM_FLOAT_TYPE=vfp-hflt
49762      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49763    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49764      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49765      ARM_FLOAT_TYPE=
49766      ARM_ARCH_TYPE_FLAGS=
49767    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49768      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49769      ARM_FLOAT_TYPE=
49770      ARM_ARCH_TYPE_FLAGS=
49771    else
49772      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49773    fi
49774
49775    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49776      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49777    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49778      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49779    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49780      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49781    fi
49782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49783$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49785$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49786
49787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49788$as_echo_n "checking for arch type flags... " >&6; }
49789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49790$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49791
49792    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49793    # autoconf target triplet.
49794     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49795    # Sanity check that it is a known ABI.
49796    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49797        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49798        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49799          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49800$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49801    fi
49802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49803$as_echo_n "checking for ABI property name... " >&6; }
49804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49805$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49806
49807
49808    # Pass these on to the open part of configure as if they were set using
49809    # --with-extra-c[xx]flags.
49810    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49811    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49812    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49813    # FIXME: This should not really be set using extra_cflags.
49814    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49815        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49816        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49817    fi
49818    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49819    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49820    # And pass the architecture flags to the linker as well
49821    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49822  fi
49823
49824  # When building with an abi profile, the name of that profile is appended on the
49825  # bundle platform, which is used in bundle names.
49826  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49827    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49828  fi
49829
49830
49831  # Special extras...
49832  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49833    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49834      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49835      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49836    fi
49837    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49838    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49839  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49840    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49841    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49842  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49843    CXXSTD_CXXFLAG="-std=gnu++98"
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
49881
49882
49883
49884
49885
49886    # Execute function body
49887
49888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49889$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49890  supports=yes
49891
49892  saved_cxxflags="$CXXFLAGS"
49893  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49894  ac_ext=cpp
49895ac_cpp='$CXXCPP $CPPFLAGS'
49896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49897ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49899
49900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49901/* end confdefs.h.  */
49902int i;
49903_ACEOF
49904if ac_fn_cxx_try_compile "$LINENO"; then :
49905
49906else
49907  supports=no
49908fi
49909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49910  ac_ext=cpp
49911ac_cpp='$CXXCPP $CPPFLAGS'
49912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49915
49916  CXXFLAGS="$saved_cxxflags"
49917
49918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49919$as_echo "$supports" >&6; }
49920  if test "x$supports" = "xyes" ; then
49921    :
49922
49923  else
49924    :
49925    CXXSTD_CXXFLAG=""
49926  fi
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49940    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49941
49942  fi
49943  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49944    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49945    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49946  fi
49947
49948  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49949  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49950  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49951
49952  ###############################################################################
49953  #
49954  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49955  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49956  #
49957
49958  # Setup compiler/platform specific flags into
49959  #    CFLAGS_JDK    - C Compiler flags
49960  #    CXXFLAGS_JDK  - C++ Compiler flags
49961  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49962  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49963    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49964    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49965    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49966    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49967      # Force compatibility with i586 on 32 bit intel platforms.
49968      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49969      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49970    fi
49971    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49972        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49973    case $OPENJDK_TARGET_CPU_ARCH in
49974      arm )
49975        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49976        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49977        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49978        ;;
49979      ppc )
49980        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49981        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49982        ;;
49983      s390 )
49984        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49985        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49986        ;;
49987      * )
49988        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49989        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49990        ;;
49991    esac
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
50041
50042
50043
50044
50045
50046    # Execute function body
50047
50048  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50049  REFERENCE_VERSION=6
50050
50051  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50052    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50053  fi
50054
50055  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50056    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50057  fi
50058
50059  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50060  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50061
50062  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50063    :
50064
50065  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50066  # runs afoul of the more aggressive versions of these optimisations.
50067  # Notably, value range propagation now assumes that the this pointer of C++
50068  # member functions is non-null.
50069  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50070        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50071        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50072$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50073  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50074  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50075
50076  else
50077    :
50078
50079  fi
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50095    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50096
50097    # Restrict the debug information created by Clang to avoid
50098    # too big object files and speed the build up a little bit
50099    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50100    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50101    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50102      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50103        # Force compatibility with i586 on 32 bit intel platforms.
50104        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50105        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50106      fi
50107      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50108      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50109          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50110      case $OPENJDK_TARGET_CPU_ARCH in
50111        ppc )
50112          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50113          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50114          ;;
50115        * )
50116          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50117          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50118          ;;
50119      esac
50120    fi
50121  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50122    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50123    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50124    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50125      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50126    fi
50127
50128    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50129    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50130  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50131    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50132    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50133    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50134  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50135    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50136        -MD -Zc:wchar_t- -W3 -wd4800 \
50137        -DWIN32_LEAN_AND_MEAN \
50138        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50139        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50140        -DWIN32 -DIAL"
50141    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50142      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50143    else
50144      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50145    fi
50146    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50147    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50148    # studio.
50149    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50150      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50151      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50152      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50153    fi
50154  fi
50155
50156  ###############################################################################
50157
50158  # Adjust flags according to debug level.
50159  case $DEBUG_LEVEL in
50160    fastdebug | slowdebug )
50161      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50162      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50163      ;;
50164    release )
50165      ;;
50166    * )
50167      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50168      ;;
50169  esac
50170
50171  # Set some common defines. These works for all compilers, but assume
50172  # -D is universally accepted.
50173
50174  # Setup endianness
50175  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50176    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50177    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50178    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50179    #   Note: -Dmacro         is the same as    #define macro 1
50180    #         -Dmacro=        is the same as    #define macro
50181    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50182      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50183    else
50184      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50185    fi
50186  else
50187    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50188    # are defined in the system?
50189    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50190      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50191    else
50192      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50193    fi
50194  fi
50195
50196  # Setup target OS define. Use OS target name but in upper case.
50197  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50198  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50199
50200  # Setup target CPU
50201  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50202      $OPENJDK_TARGET_ADD_LP64 \
50203      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50204
50205  # Setup debug/release defines
50206  if test "x$DEBUG_LEVEL" = xrelease; then
50207    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50208    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50209      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50210    fi
50211  else
50212    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50213  fi
50214
50215  # Set some additional per-OS defines.
50216  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50217    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50218    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50219        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50220  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50221    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50222    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50223        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50224  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50225    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50226    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50227    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50228    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50229        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50230        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50231        -fno-omit-frame-pointer"
50232  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50233    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50234    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50235    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50236        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50237        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50238  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50239    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50240  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50241    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50242    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50243  fi
50244
50245  # Set some additional per-CPU defines.
50246  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50247    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50248  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50249    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50250  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50251    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50252      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50253      # fixes `relocation truncated to fit' error for gcc 4.1.
50254      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50255      # Use ppc64 instructions, but schedule for power5
50256      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50257    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50258      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50259    fi
50260  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50261    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50262      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50263      # Little endian machine uses ELFv2 ABI.
50264      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50265      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50266      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50267    fi
50268  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50269    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50270      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50271    fi
50272  fi
50273
50274  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50275    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50276  fi
50277
50278  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50279    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50280      # Solaris does not have _LP64=1 in the old build.
50281      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50282      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50283    fi
50284  fi
50285
50286  # Set JVM_CFLAGS warning handling
50287  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50288    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50289        -Wunused-value -Woverloaded-virtual"
50290
50291    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50341
50342
50343
50344
50345
50346    # Execute function body
50347
50348  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50349  REFERENCE_VERSION=4.8
50350
50351  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50352    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50353  fi
50354
50355  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50356    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50357  fi
50358
50359  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50360  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50361
50362  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50363    :
50364
50365            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50366            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50367
50368
50369  else
50370    :
50371
50372  fi
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387    fi
50388    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50389      # Non-zero builds have stricter warnings
50390      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50391    else
50392      if test "x$TOOLCHAIN_TYPE" = xclang; then
50393        # Some versions of llvm do not like -Wundef
50394        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50395      fi
50396    fi
50397  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50398    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50399        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50400  fi
50401
50402  # Additional macosx handling
50403  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50404    # Setting these parameters makes it an error to link to macosx APIs that are
50405    # newer than the given OS version and makes the linked binaries compatible
50406    # even if built on a newer version of the OS.
50407    # The expected format is X.Y.Z
50408    MACOSX_VERSION_MIN=10.7.0
50409
50410
50411    # The macro takes the version with no dots, ex: 1070
50412    # Let the flags variables get resolved in make for easier override on make
50413    # command line.
50414    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50415    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50416  fi
50417
50418  # Setup some hard coded includes
50419  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50420      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50421      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50422      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50423      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50424      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50425      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50426
50427  # The shared libraries are compiled using the picflag.
50428  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50429      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50430  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50431      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50432
50433  # Executable flags
50434  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50435  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50436
50437
50438
50439
50440
50441
50442  # Setup LDFLAGS et al.
50443  #
50444
50445  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50446    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50447    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50448    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50449    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50450      LDFLAGS_SAFESH="-safeseh"
50451      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50452      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50453      # NOTE: Old build added -machine. Probably not needed.
50454      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50455    else
50456      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50457    fi
50458  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50459      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50460      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50461        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50462        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50463    fi
50464  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50465    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50466    # We have previously set HAS_GNU_HASH if this is the case
50467    if test -n "$HAS_GNU_HASH"; then
50468      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50469      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50470      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50471    fi
50472      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50473        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50474    fi
50475    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50476      # And since we now know that the linker is gnu, then add -z defs, to forbid
50477      # undefined symbols in object files.
50478      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50479      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50480      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50481      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50482      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50483      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50484        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50485      fi
50486      case $DEBUG_LEVEL in
50487        release )
50488          # tell linker to optimize libraries.
50489          # Should this be supplied to the OSS linker as well?
50490          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50491          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50492          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50493          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50494            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50495          fi
50496          ;;
50497        slowdebug )
50498          # Hotspot always let the linker optimize
50499          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50500          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50501            # do relocations at load
50502            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50503            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50504            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50505          fi
50506          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50507            # mark relocations read only
50508            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50509            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50510            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50511          fi
50512          ;;
50513        fastdebug )
50514          # Hotspot always let the linker optimize
50515          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50516          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50517            # mark relocations read only
50518            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50519            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50520            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50521          fi
50522          ;;
50523        * )
50524          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50525          ;;
50526        esac
50527    fi
50528  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50529    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50530    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50531    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50532    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50533    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50534    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50535      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50536    fi
50537  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50538    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50539    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50540    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50541  fi
50542
50543  # Customize LDFLAGS for executables
50544
50545  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50546
50547  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50548    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50549      LDFLAGS_STACK_SIZE=1048576
50550    else
50551      LDFLAGS_STACK_SIZE=327680
50552    fi
50553    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50554  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50555    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50556  fi
50557
50558  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50559
50560  # Customize LDFLAGS for libs
50561  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50562
50563  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50564  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50565    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50566        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50567    JDKLIB_LIBS=""
50568  else
50569    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50570        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50571
50572    if test "xTARGET" = "xTARGET"; then
50573      # On some platforms (mac) the linker warns about non existing -L dirs.
50574      # For any of the variants server, client or minimal, the dir matches the
50575      # variant name. The "main" variant should be used for linking. For the
50576      # rest, the dir is just server.
50577      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50578          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50579        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50580            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50581      else
50582        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50583            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50584      fi
50585    elif test "xTARGET" = "xBUILD"; then
50586      # When building a buildjdk, it's always only the server variant
50587      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50588          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50589    fi
50590
50591    JDKLIB_LIBS="-ljava -ljvm"
50592    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50593      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50594    fi
50595
50596  fi
50597
50598LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50599
50600  # Set JVM_LIBS (per os)
50601  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50602    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50603  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50604    # FIXME: This hard-coded path is not really proper.
50605    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50606      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50607    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50608      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50609    fi
50610    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50611        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50612  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50613    JVM_LIBS="$JVM_LIBS -lm"
50614  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50615    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50616  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50617    JVM_LIBS="$JVM_LIBS -lm"
50618  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50619    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50620        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50621        wsock32.lib winmm.lib version.lib psapi.lib"
50622    fi
50623
50624  # Set JVM_ASFLAGS
50625  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50626    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50627      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50628    fi
50629  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50630    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50631  fi
50632
50633  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649  # Special extras...
50650  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50651    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50652      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50653      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50654    fi
50655    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50656    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50657  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50658    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50659    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50660  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50661    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
50699
50700
50701
50702
50703
50704    # Execute function body
50705
50706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50707$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50708  supports=yes
50709
50710  saved_cxxflags="$CXXFLAGS"
50711  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50712  ac_ext=cpp
50713ac_cpp='$CXXCPP $CPPFLAGS'
50714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50717
50718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50719/* end confdefs.h.  */
50720int i;
50721_ACEOF
50722if ac_fn_cxx_try_compile "$LINENO"; then :
50723
50724else
50725  supports=no
50726fi
50727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50728  ac_ext=cpp
50729ac_cpp='$CXXCPP $CPPFLAGS'
50730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50733
50734  CXXFLAGS="$saved_cxxflags"
50735
50736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50737$as_echo "$supports" >&6; }
50738  if test "x$supports" = "xyes" ; then
50739    :
50740
50741  else
50742    :
50743    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50744  fi
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50758    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50759
50760  fi
50761  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50762    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50763    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50764  fi
50765
50766  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50767  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50768  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50769
50770  ###############################################################################
50771  #
50772  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50773  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50774  #
50775
50776  # Setup compiler/platform specific flags into
50777  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50778  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50779  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50780  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50781    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50782    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50783    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50784    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50785      # Force compatibility with i586 on 32 bit intel platforms.
50786      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50787      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50788    fi
50789    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50790        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50791    case $OPENJDK_BUILD_CPU_ARCH in
50792      arm )
50793        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50794        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50795        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50796        ;;
50797      ppc )
50798        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50799        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50800        ;;
50801      s390 )
50802        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50803        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50804        ;;
50805      * )
50806        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50807        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50808        ;;
50809    esac
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
50859
50860
50861
50862
50863
50864    # Execute function body
50865
50866  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50867  REFERENCE_VERSION=6
50868
50869  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50870    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50871  fi
50872
50873  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50874    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50875  fi
50876
50877  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50878  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50879
50880  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50881    :
50882
50883  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50884  # runs afoul of the more aggressive versions of these optimisations.
50885  # Notably, value range propagation now assumes that the this pointer of C++
50886  # member functions is non-null.
50887  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50888        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50889        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50890$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50891  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50892  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50893
50894  else
50895    :
50896
50897  fi
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50914
50915    # Restrict the debug information created by Clang to avoid
50916    # too big object files and speed the build up a little bit
50917    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50919    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50920      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50921        # Force compatibility with i586 on 32 bit intel platforms.
50922        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50923        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50924      fi
50925      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50926      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50927          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50928      case $OPENJDK_BUILD_CPU_ARCH in
50929        ppc )
50930          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50931          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50932          ;;
50933        * )
50934          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50935          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50936          ;;
50937      esac
50938    fi
50939  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50941    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50942    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50943      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50944    fi
50945
50946    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50947    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50948  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50949    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50950    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50951    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50952  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50953    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50954        -MD -Zc:wchar_t- -W3 -wd4800 \
50955        -DWIN32_LEAN_AND_MEAN \
50956        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50957        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50958        -DWIN32 -DIAL"
50959    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50960      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50961    else
50962      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50963    fi
50964    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50965    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50966    # studio.
50967    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50968      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50969      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50970      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50971    fi
50972  fi
50973
50974  ###############################################################################
50975
50976  # Adjust flags according to debug level.
50977  case $DEBUG_LEVEL in
50978    fastdebug | slowdebug )
50979      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50980      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50981      ;;
50982    release )
50983      ;;
50984    * )
50985      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50986      ;;
50987  esac
50988
50989  # Set some common defines. These works for all compilers, but assume
50990  # -D is universally accepted.
50991
50992  # Setup endianness
50993  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50994    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50995    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50996    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50997    #   Note: -Dmacro         is the same as    #define macro 1
50998    #         -Dmacro=        is the same as    #define macro
50999    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51000      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51001    else
51002      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51003    fi
51004  else
51005    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51006    # are defined in the system?
51007    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51008      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51009    else
51010      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51011    fi
51012  fi
51013
51014  # Setup target OS define. Use OS target name but in upper case.
51015  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51016  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51017
51018  # Setup target CPU
51019  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51020      $OPENJDK_BUILD_ADD_LP64 \
51021      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51022
51023  # Setup debug/release defines
51024  if test "x$DEBUG_LEVEL" = xrelease; then
51025    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51026    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51027      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51028    fi
51029  else
51030    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51031  fi
51032
51033  # Set some additional per-OS defines.
51034  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51035    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51036    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51037        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51038  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51039    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51040    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51041        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51042  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51043    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51044    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51045    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51046    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51047        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51048        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51049        -fno-omit-frame-pointer"
51050  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51051    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51052    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51053    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51054        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51055        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51056  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51057    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51058  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51059    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51060    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51061  fi
51062
51063  # Set some additional per-CPU defines.
51064  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51065    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51066  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51067    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51068  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51069    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51070      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51071      # fixes `relocation truncated to fit' error for gcc 4.1.
51072      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51073      # Use ppc64 instructions, but schedule for power5
51074      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51075    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51076      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51077    fi
51078  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51079    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51080      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51081      # Little endian machine uses ELFv2 ABI.
51082      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51083      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51084      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51085    fi
51086  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51087    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51088      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51089    fi
51090  fi
51091
51092  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51093    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51094  fi
51095
51096  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51097    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51098      # Solaris does not have _LP64=1 in the old build.
51099      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51100      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51101    fi
51102  fi
51103
51104  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51105  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51106    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51107        -Wunused-value -Woverloaded-virtual"
51108
51109    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
51159
51160
51161
51162
51163
51164    # Execute function body
51165
51166  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51167  REFERENCE_VERSION=4.8
51168
51169  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51170    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51171  fi
51172
51173  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51174    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51175  fi
51176
51177  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51178  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51179
51180  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51181    :
51182
51183            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51184            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51185
51186
51187  else
51188    :
51189
51190  fi
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205    fi
51206    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51207      # Non-zero builds have stricter warnings
51208      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51209    else
51210      if test "x$TOOLCHAIN_TYPE" = xclang; then
51211        # Some versions of llvm do not like -Wundef
51212        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51213      fi
51214    fi
51215  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51216    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51217        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51218  fi
51219
51220  # Additional macosx handling
51221  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51222    # Setting these parameters makes it an error to link to macosx APIs that are
51223    # newer than the given OS version and makes the linked binaries compatible
51224    # even if built on a newer version of the OS.
51225    # The expected format is X.Y.Z
51226    MACOSX_VERSION_MIN=10.7.0
51227
51228
51229    # The macro takes the version with no dots, ex: 1070
51230    # Let the flags variables get resolved in make for easier override on make
51231    # command line.
51232    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)"
51233    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51234  fi
51235
51236  # Setup some hard coded includes
51237  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51238      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51239      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51240      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51241      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51242      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51243      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51244
51245  # The shared libraries are compiled using the picflag.
51246  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51247      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51248  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51249      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51250
51251  # Executable flags
51252  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51253  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51254
51255
51256
51257
51258
51259
51260  # Setup LDFLAGS et al.
51261  #
51262
51263  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51264    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51265    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51266    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51267    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51268      LDFLAGS_SAFESH="-safeseh"
51269      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51270      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51271      # NOTE: Old build added -machine. Probably not needed.
51272      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51273    else
51274      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51275    fi
51276  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51277      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51278      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51279        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51280        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51281    fi
51282  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51283    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51284    # We have previously set HAS_GNU_HASH if this is the case
51285    if test -n "$HAS_GNU_HASH"; then
51286      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51287      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51288      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51289    fi
51290      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51291        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51292    fi
51293    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51294      # And since we now know that the linker is gnu, then add -z defs, to forbid
51295      # undefined symbols in object files.
51296      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51297      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51298      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51299      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51300      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51301      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51302        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51303      fi
51304      case $DEBUG_LEVEL in
51305        release )
51306          # tell linker to optimize libraries.
51307          # Should this be supplied to the OSS linker as well?
51308          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51309          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51310          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51311          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51312            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51313          fi
51314          ;;
51315        slowdebug )
51316          # Hotspot always let the linker optimize
51317          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51318          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51319            # do relocations at load
51320            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51321            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51322            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51323          fi
51324          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51325            # mark relocations read only
51326            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51327            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51328            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51329          fi
51330          ;;
51331        fastdebug )
51332          # Hotspot always let the linker optimize
51333          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51334          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51335            # mark relocations read only
51336            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51337            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51338            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51339          fi
51340          ;;
51341        * )
51342          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51343          ;;
51344        esac
51345    fi
51346  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51347    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51348    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51349    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51350    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51351    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51352    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51353      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51354    fi
51355  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51356    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51357    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51358    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51359  fi
51360
51361  # Customize LDFLAGS for executables
51362
51363  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51364
51365  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51366    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51367      LDFLAGS_STACK_SIZE=1048576
51368    else
51369      LDFLAGS_STACK_SIZE=327680
51370    fi
51371    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51372  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51373    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51374  fi
51375
51376  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51377
51378  # Customize LDFLAGS for libs
51379  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51380
51381  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51382  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51383    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51384        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51385    OPENJDK_BUILD_JDKLIB_LIBS=""
51386  else
51387    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51388        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51389
51390    if test "xBUILD" = "xTARGET"; then
51391      # On some platforms (mac) the linker warns about non existing -L dirs.
51392      # For any of the variants server, client or minimal, the dir matches the
51393      # variant name. The "main" variant should be used for linking. For the
51394      # rest, the dir is just server.
51395      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51396          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51397        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51398            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51399      else
51400        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51401            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51402      fi
51403    elif test "xBUILD" = "xBUILD"; then
51404      # When building a buildjdk, it's always only the server variant
51405      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51406          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51407    fi
51408
51409    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51410    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51411      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51412    fi
51413
51414  fi
51415
51416OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51417
51418  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51419  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51420    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51421  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51422    # FIXME: This hard-coded path is not really proper.
51423    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51424      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51425    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51426      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51427    fi
51428    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51429        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51430  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51431    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51432  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51433    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51434  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51435    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51436  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51437    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51438        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51439        wsock32.lib winmm.lib version.lib psapi.lib"
51440    fi
51441
51442  # Set OPENJDK_BUILD_JVM_ASFLAGS
51443  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51444    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51445      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51446    fi
51447  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51448    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51449  fi
51450
51451  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467  # Tests are only ever compiled for TARGET
51468  # Flags for compiling test libraries
51469  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51470  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51471
51472  # Flags for compiling test executables
51473  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51474  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51475
51476
51477
51478
51479
51480
51481  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51482  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51483
51484
51485
51486
51487
51488
51489  # Some Zero and Shark settings.
51490  # ZERO_ARCHFLAG tells the compiler which mode to build for
51491  case "${OPENJDK_TARGET_CPU}" in
51492    s390)
51493      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51494      ;;
51495    *)
51496      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51497  esac
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
51535
51536
51537
51538
51539
51540    # Execute function body
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
51584
51585
51586
51587
51588
51589    # Execute function body
51590
51591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51592$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51593  supports=yes
51594
51595  saved_cflags="$CFLAGS"
51596  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51597  ac_ext=c
51598ac_cpp='$CPP $CPPFLAGS'
51599ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51600ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51601ac_compiler_gnu=$ac_cv_c_compiler_gnu
51602
51603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51604/* end confdefs.h.  */
51605int i;
51606_ACEOF
51607if ac_fn_c_try_compile "$LINENO"; then :
51608
51609else
51610  supports=no
51611fi
51612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51613  ac_ext=cpp
51614ac_cpp='$CXXCPP $CPPFLAGS'
51615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51618
51619  CFLAGS="$saved_cflags"
51620
51621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51622$as_echo "$supports" >&6; }
51623  if test "x$supports" = "xyes" ; then
51624    :
51625    C_COMP_SUPPORTS="yes"
51626  else
51627    :
51628    C_COMP_SUPPORTS="no"
51629  fi
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
51684
51685
51686
51687
51688
51689    # Execute function body
51690
51691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51692$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51693  supports=yes
51694
51695  saved_cxxflags="$CXXFLAGS"
51696  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51697  ac_ext=cpp
51698ac_cpp='$CXXCPP $CPPFLAGS'
51699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51702
51703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51704/* end confdefs.h.  */
51705int i;
51706_ACEOF
51707if ac_fn_cxx_try_compile "$LINENO"; then :
51708
51709else
51710  supports=no
51711fi
51712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51713  ac_ext=cpp
51714ac_cpp='$CXXCPP $CPPFLAGS'
51715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51718
51719  CXXFLAGS="$saved_cxxflags"
51720
51721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51722$as_echo "$supports" >&6; }
51723  if test "x$supports" = "xyes" ; then
51724    :
51725    CXX_COMP_SUPPORTS="yes"
51726  else
51727    :
51728    CXX_COMP_SUPPORTS="no"
51729  fi
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51744$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51745  supports=no
51746  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51747
51748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51749$as_echo "$supports" >&6; }
51750  if test "x$supports" = "xyes" ; then
51751    :
51752
51753  else
51754    :
51755    ZERO_ARCHFLAG=""
51756  fi
51757
51758
51759
51760
51761
51762
51763
51764
51765  # Check that the compiler supports -mX (or -qX on AIX) flags
51766  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51809
51810
51811
51812
51813
51814    # Execute function body
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
51858
51859
51860
51861
51862
51863    # Execute function body
51864
51865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51866$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51867  supports=yes
51868
51869  saved_cflags="$CFLAGS"
51870  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51871  ac_ext=c
51872ac_cpp='$CPP $CPPFLAGS'
51873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51875ac_compiler_gnu=$ac_cv_c_compiler_gnu
51876
51877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51878/* end confdefs.h.  */
51879int i;
51880_ACEOF
51881if ac_fn_c_try_compile "$LINENO"; then :
51882
51883else
51884  supports=no
51885fi
51886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51887  ac_ext=cpp
51888ac_cpp='$CXXCPP $CPPFLAGS'
51889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51892
51893  CFLAGS="$saved_cflags"
51894
51895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51896$as_echo "$supports" >&6; }
51897  if test "x$supports" = "xyes" ; then
51898    :
51899    C_COMP_SUPPORTS="yes"
51900  else
51901    :
51902    C_COMP_SUPPORTS="no"
51903  fi
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
51958
51959
51960
51961
51962
51963    # Execute function body
51964
51965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51966$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51967  supports=yes
51968
51969  saved_cxxflags="$CXXFLAGS"
51970  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51971  ac_ext=cpp
51972ac_cpp='$CXXCPP $CPPFLAGS'
51973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51976
51977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51978/* end confdefs.h.  */
51979int i;
51980_ACEOF
51981if ac_fn_cxx_try_compile "$LINENO"; then :
51982
51983else
51984  supports=no
51985fi
51986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51987  ac_ext=cpp
51988ac_cpp='$CXXCPP $CPPFLAGS'
51989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51992
51993  CXXFLAGS="$saved_cxxflags"
51994
51995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51996$as_echo "$supports" >&6; }
51997  if test "x$supports" = "xyes" ; then
51998    :
51999    CXX_COMP_SUPPORTS="yes"
52000  else
52001    :
52002    CXX_COMP_SUPPORTS="no"
52003  fi
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52018$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52019  supports=no
52020  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52021
52022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52023$as_echo "$supports" >&6; }
52024  if test "x$supports" = "xyes" ; then
52025    :
52026    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52027  else
52028    :
52029    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52030  fi
52031
52032
52033
52034
52035
52036
52037
52038
52039  # Check whether --enable-warnings-as-errors was given.
52040if test "${enable_warnings_as_errors+set}" = set; then :
52041  enableval=$enable_warnings_as_errors;
52042fi
52043
52044
52045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52046$as_echo_n "checking if native warnings are errors... " >&6; }
52047  if test "x$enable_warnings_as_errors" = "xyes"; then
52048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52049$as_echo "yes (explicitly set)" >&6; }
52050    WARNINGS_AS_ERRORS=true
52051  elif test "x$enable_warnings_as_errors" = "xno"; then
52052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52053$as_echo "no" >&6; }
52054    WARNINGS_AS_ERRORS=false
52055  elif test "x$enable_warnings_as_errors" = "x"; then
52056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52057$as_echo "yes (default)" >&6; }
52058    WARNINGS_AS_ERRORS=true
52059  else
52060    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52061  fi
52062
52063  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52064    # Set legacy hotspot variable
52065    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52066  else
52067    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52068  fi
52069
52070
52071
52072
52073  case "${TOOLCHAIN_TYPE}" in
52074    microsoft)
52075      DISABLE_WARNING_PREFIX="-wd"
52076      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52077      ;;
52078    solstudio)
52079      DISABLE_WARNING_PREFIX="-erroff="
52080      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52081      ;;
52082    gcc)
52083      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52126
52127
52128
52129
52130
52131    # Execute function body
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180    # Execute function body
52181
52182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52183$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52184  supports=yes
52185
52186  saved_cflags="$CFLAGS"
52187  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52188  ac_ext=c
52189ac_cpp='$CPP $CPPFLAGS'
52190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52192ac_compiler_gnu=$ac_cv_c_compiler_gnu
52193
52194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52195/* end confdefs.h.  */
52196int i;
52197_ACEOF
52198if ac_fn_c_try_compile "$LINENO"; then :
52199
52200else
52201  supports=no
52202fi
52203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52204  ac_ext=cpp
52205ac_cpp='$CXXCPP $CPPFLAGS'
52206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52209
52210  CFLAGS="$saved_cflags"
52211
52212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52213$as_echo "$supports" >&6; }
52214  if test "x$supports" = "xyes" ; then
52215    :
52216    C_COMP_SUPPORTS="yes"
52217  else
52218    :
52219    C_COMP_SUPPORTS="no"
52220  fi
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
52275
52276
52277
52278
52279
52280    # Execute function body
52281
52282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52283$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52284  supports=yes
52285
52286  saved_cxxflags="$CXXFLAGS"
52287  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52288  ac_ext=cpp
52289ac_cpp='$CXXCPP $CPPFLAGS'
52290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52293
52294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52295/* end confdefs.h.  */
52296int i;
52297_ACEOF
52298if ac_fn_cxx_try_compile "$LINENO"; then :
52299
52300else
52301  supports=no
52302fi
52303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52304  ac_ext=cpp
52305ac_cpp='$CXXCPP $CPPFLAGS'
52306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52309
52310  CXXFLAGS="$saved_cxxflags"
52311
52312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52313$as_echo "$supports" >&6; }
52314  if test "x$supports" = "xyes" ; then
52315    :
52316    CXX_COMP_SUPPORTS="yes"
52317  else
52318    :
52319    CXX_COMP_SUPPORTS="no"
52320  fi
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52335$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52336  supports=no
52337  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52338
52339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52340$as_echo "$supports" >&6; }
52341  if test "x$supports" = "xyes" ; then
52342    :
52343    GCC_CAN_DISABLE_WARNINGS=true
52344  else
52345    :
52346    GCC_CAN_DISABLE_WARNINGS=false
52347
52348  fi
52349
52350
52351
52352
52353
52354
52355      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52356        DISABLE_WARNING_PREFIX="-Wno-"
52357      else
52358        DISABLE_WARNING_PREFIX=
52359      fi
52360      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52361      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52362      # CFLAGS since any target specific flags will likely not work with the
52363      # build compiler
52364      CC_OLD="$CC"
52365      CXX_OLD="$CXX"
52366      CC="$BUILD_CC"
52367      CXX="$BUILD_CXX"
52368      CFLAGS_OLD="$CFLAGS"
52369      CFLAGS=""
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
52412
52413
52414
52415
52416
52417    # Execute function body
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466    # Execute function body
52467
52468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52469$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52470  supports=yes
52471
52472  saved_cflags="$CFLAGS"
52473  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52474  ac_ext=c
52475ac_cpp='$CPP $CPPFLAGS'
52476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52478ac_compiler_gnu=$ac_cv_c_compiler_gnu
52479
52480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52481/* end confdefs.h.  */
52482int i;
52483_ACEOF
52484if ac_fn_c_try_compile "$LINENO"; then :
52485
52486else
52487  supports=no
52488fi
52489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52490  ac_ext=cpp
52491ac_cpp='$CXXCPP $CPPFLAGS'
52492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52495
52496  CFLAGS="$saved_cflags"
52497
52498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52499$as_echo "$supports" >&6; }
52500  if test "x$supports" = "xyes" ; then
52501    :
52502    C_COMP_SUPPORTS="yes"
52503  else
52504    :
52505    C_COMP_SUPPORTS="no"
52506  fi
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
52561
52562
52563
52564
52565
52566    # Execute function body
52567
52568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52569$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52570  supports=yes
52571
52572  saved_cxxflags="$CXXFLAGS"
52573  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52574  ac_ext=cpp
52575ac_cpp='$CXXCPP $CPPFLAGS'
52576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52579
52580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52581/* end confdefs.h.  */
52582int i;
52583_ACEOF
52584if ac_fn_cxx_try_compile "$LINENO"; then :
52585
52586else
52587  supports=no
52588fi
52589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52590  ac_ext=cpp
52591ac_cpp='$CXXCPP $CPPFLAGS'
52592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52595
52596  CXXFLAGS="$saved_cxxflags"
52597
52598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52599$as_echo "$supports" >&6; }
52600  if test "x$supports" = "xyes" ; then
52601    :
52602    CXX_COMP_SUPPORTS="yes"
52603  else
52604    :
52605    CXX_COMP_SUPPORTS="no"
52606  fi
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52621$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52622  supports=no
52623  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52624
52625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52626$as_echo "$supports" >&6; }
52627  if test "x$supports" = "xyes" ; then
52628    :
52629    BUILD_CC_CAN_DISABLE_WARNINGS=true
52630  else
52631    :
52632    BUILD_CC_CAN_DISABLE_WARNINGS=false
52633
52634  fi
52635
52636
52637
52638
52639
52640
52641      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52642        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52643      else
52644        BUILD_CC_DISABLE_WARNING_PREFIX=
52645      fi
52646      CC="$CC_OLD"
52647      CXX="$CXX_OLD"
52648      CFLAGS="$CFLAGS_OLD"
52649      ;;
52650    clang)
52651      DISABLE_WARNING_PREFIX="-Wno-"
52652      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52653      ;;
52654    xlc)
52655      DISABLE_WARNING_PREFIX="-qsuppress="
52656      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52657      ;;
52658  esac
52659
52660
52661
52662
52663
52664# Setup debug symbols (need objcopy from the toolchain for that)
52665
52666  #
52667  # NATIVE_DEBUG_SYMBOLS
52668  # This must be done after the toolchain is setup, since we're looking at objcopy.
52669  #
52670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52671$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52672
52673# Check whether --with-native-debug-symbols was given.
52674if test "${with_native_debug_symbols+set}" = set; then :
52675  withval=$with_native_debug_symbols;
52676        if test "x$OPENJDK_TARGET_OS" = xaix; then
52677          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52678            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52679          fi
52680        fi
52681
52682else
52683
52684        if test "x$OPENJDK_TARGET_OS" = xaix; then
52685          # AIX doesn't support 'zipped' so use 'internal' as default
52686          with_native_debug_symbols="internal"
52687        else
52688          if test "x$STATIC_BUILD" = xtrue; then
52689            with_native_debug_symbols="none"
52690          else
52691            with_native_debug_symbols="zipped"
52692          fi
52693        fi
52694
52695fi
52696
52697  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52699$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52700
52701  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52702
52703    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52704      if test "x$OBJCOPY" = x; then
52705        # enabling of enable-debug-symbols and can't find objcopy
52706        # this is an error
52707        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52708      fi
52709    fi
52710
52711    COMPILE_WITH_DEBUG_SYMBOLS=true
52712    COPY_DEBUG_SYMBOLS=true
52713    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52714  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52715    COMPILE_WITH_DEBUG_SYMBOLS=false
52716    COPY_DEBUG_SYMBOLS=false
52717    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52718  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52719    COMPILE_WITH_DEBUG_SYMBOLS=true
52720    COPY_DEBUG_SYMBOLS=false
52721    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52722  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52723
52724    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52725      if test "x$OBJCOPY" = x; then
52726        # enabling of enable-debug-symbols and can't find objcopy
52727        # this is an error
52728        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52729      fi
52730    fi
52731
52732    COMPILE_WITH_DEBUG_SYMBOLS=true
52733    COPY_DEBUG_SYMBOLS=true
52734    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52735  else
52736    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52737  fi
52738
52739  # --enable-debug-symbols is deprecated.
52740  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52741
52742  # Check whether --enable-debug-symbols was given.
52743if test "${enable_debug_symbols+set}" = set; then :
52744  enableval=$enable_debug_symbols;
52745fi
52746
52747  if test "x$enable_debug_symbols" != x; then
52748    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52749$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52750
52751    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52752      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52753$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52754    fi
52755
52756  fi
52757
52758
52759  # --enable-zip-debug-info is deprecated.
52760  # Please use --with-native-debug-symbols=zipped .
52761
52762  # Check whether --enable-zip-debug-info was given.
52763if test "${enable_zip_debug_info+set}" = set; then :
52764  enableval=$enable_zip_debug_info;
52765fi
52766
52767  if test "x$enable_zip_debug_info" != x; then
52768    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52769$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52770
52771    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52772      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52773$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52774    fi
52775
52776  fi
52777
52778
52779
52780
52781
52782
52783
52784  # Check whether --enable-native-coverage was given.
52785if test "${enable_native_coverage+set}" = set; then :
52786  enableval=$enable_native_coverage;
52787fi
52788
52789  GCOV_ENABLED="false"
52790  if test "x$enable_native_coverage" = "xyes"; then
52791    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52793$as_echo_n "checking if native coverage is enabled... " >&6; }
52794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52795$as_echo "yes" >&6; }
52796      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52797      GCOV_LDFLAGS="-fprofile-arcs"
52798      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52799      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52800      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52801      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52802      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52803      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52804      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52805      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52806      GCOV_ENABLED="true"
52807    else
52808      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52809    fi
52810  elif test "x$enable_native_coverage" = "xno"; then
52811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52812$as_echo_n "checking if native coverage is enabled... " >&6; }
52813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52814$as_echo "no" >&6; }
52815  elif test "x$enable_native_coverage" != "x"; then
52816    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52817  fi
52818
52819
52820
52821
52822# Need toolchain to setup dtrace
52823
52824  # Test for dtrace dependencies
52825  # Check whether --enable-dtrace was given.
52826if test "${enable_dtrace+set}" = set; then :
52827  enableval=$enable_dtrace;
52828fi
52829
52830
52831  DTRACE_DEP_MISSING=false
52832
52833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52834$as_echo_n "checking for dtrace tool... " >&6; }
52835  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52837$as_echo "$DTRACE" >&6; }
52838  else
52839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52840$as_echo "not found, cannot build dtrace" >&6; }
52841    DTRACE_DEP_MISSING=true
52842  fi
52843
52844  for ac_header in sys/sdt.h
52845do :
52846  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52847if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52848  cat >>confdefs.h <<_ACEOF
52849#define HAVE_SYS_SDT_H 1
52850_ACEOF
52851 DTRACE_HEADERS_OK=yes
52852else
52853  DTRACE_HEADERS_OK=no
52854fi
52855
52856done
52857
52858  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52859    DTRACE_DEP_MISSING=true
52860  fi
52861
52862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52863$as_echo_n "checking if dtrace should be built... " >&6; }
52864  if test "x$enable_dtrace" = "xyes"; then
52865    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52867$as_echo "no, missing dependencies" >&6; }
52868
52869  # Print a helpful message on how to acquire the necessary build dependency.
52870  # dtrace is the help tag: freetype, cups, alsa etc
52871  MISSING_DEPENDENCY=dtrace
52872
52873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52874    cygwin_help $MISSING_DEPENDENCY
52875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52876    msys_help $MISSING_DEPENDENCY
52877  else
52878    PKGHANDLER_COMMAND=
52879
52880    case $PKGHANDLER in
52881      apt-get)
52882        apt_help     $MISSING_DEPENDENCY ;;
52883      yum)
52884        yum_help     $MISSING_DEPENDENCY ;;
52885      brew)
52886        brew_help    $MISSING_DEPENDENCY ;;
52887      port)
52888        port_help    $MISSING_DEPENDENCY ;;
52889      pkgutil)
52890        pkgutil_help $MISSING_DEPENDENCY ;;
52891      pkgadd)
52892        pkgadd_help  $MISSING_DEPENDENCY ;;
52893    esac
52894
52895    if test "x$PKGHANDLER_COMMAND" != x; then
52896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52897    fi
52898  fi
52899
52900      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52901    else
52902      INCLUDE_DTRACE=true
52903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52904$as_echo "yes, forced" >&6; }
52905    fi
52906  elif test "x$enable_dtrace" = "xno"; then
52907    INCLUDE_DTRACE=false
52908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52909$as_echo "no, forced" >&6; }
52910  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52911    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52912      INCLUDE_DTRACE=false
52913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52914$as_echo "no, missing dependencies" >&6; }
52915    else
52916      INCLUDE_DTRACE=true
52917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52918$as_echo "yes, dependencies present" >&6; }
52919    fi
52920  else
52921    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52922  fi
52923
52924
52925
52926  # Check whether --enable-aot was given.
52927if test "${enable_aot+set}" = set; then :
52928  enableval=$enable_aot;
52929fi
52930
52931
52932  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52933    ENABLE_AOT="true"
52934  elif test "x$enable_aot" = "xyes"; then
52935    ENABLE_AOT="true"
52936  elif test "x$enable_aot" = "xno"; then
52937    ENABLE_AOT="false"
52938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52939$as_echo_n "checking if aot should be enabled... " >&6; }
52940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52941$as_echo "no, forced" >&6; }
52942  else
52943    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52944  fi
52945
52946  if test "x$ENABLE_AOT" = "xtrue"; then
52947    # Only enable AOT on linux-X64.
52948    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52949      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52950        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52951          ENABLE_AOT="true"
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.vm.compiler 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 $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52962        fi
52963      fi
52964    else
52965      ENABLE_AOT="false"
52966      if test "x$enable_aot" = "xyes"; then
52967        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52968      fi
52969    fi
52970  fi
52971
52972
52973
52974
52975  # Check whether --enable-hotspot-gtest was given.
52976if test "${enable_hotspot_gtest+set}" = set; then :
52977  enableval=$enable_hotspot_gtest;
52978fi
52979
52980
52981  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52982    GTEST_DIR_EXISTS="true"
52983  else
52984    GTEST_DIR_EXISTS="false"
52985  fi
52986
52987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52988$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52989  if test "x$enable_hotspot_gtest" = "xyes"; then
52990    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52992$as_echo "yes, forced" >&6; }
52993      BUILD_GTEST="true"
52994    else
52995      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52996    fi
52997  elif test "x$enable_hotspot_gtest" = "xno"; then
52998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52999$as_echo "no, forced" >&6; }
53000    BUILD_GTEST="false"
53001  elif test "x$enable_hotspot_gtest" = "x"; then
53002    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53004$as_echo "yes" >&6; }
53005      BUILD_GTEST="true"
53006    else
53007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53008$as_echo "no" >&6; }
53009      BUILD_GTEST="false"
53010    fi
53011  else
53012    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53013  fi
53014
53015
53016
53017
53018###############################################################################
53019#
53020# Check dependencies for external and internal libraries.
53021#
53022###############################################################################
53023
53024# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53025
53026  # When using cygwin or msys, we need a wrapper binary that renames
53027  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53028  # @files and rewrites these too! This wrapper binary is
53029  # called fixpath.
53030  FIXPATH=
53031  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53033$as_echo_n "checking if fixpath can be created... " >&6; }
53034    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53035    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53036    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53037    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53038      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53039      FIXPATH="$FIXPATH_BIN -c"
53040    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53041      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53042      # @ was chosen as separator to minimize risk of other tools messing around with it
53043      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53044          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53045      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53046      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53047    fi
53048    FIXPATH_SRC_W="$FIXPATH_SRC"
53049    FIXPATH_BIN_W="$FIXPATH_BIN"
53050
53051  unix_path="$FIXPATH_SRC_W"
53052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53053    windows_path=`$CYGPATH -m "$unix_path"`
53054    FIXPATH_SRC_W="$windows_path"
53055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53056    windows_path=`cmd //c echo $unix_path`
53057    FIXPATH_SRC_W="$windows_path"
53058  fi
53059
53060
53061  unix_path="$FIXPATH_BIN_W"
53062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53063    windows_path=`$CYGPATH -m "$unix_path"`
53064    FIXPATH_BIN_W="$windows_path"
53065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53066    windows_path=`cmd //c echo $unix_path`
53067    FIXPATH_BIN_W="$windows_path"
53068  fi
53069
53070    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53071    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53072    cd $FIXPATH_DIR
53073    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53074    cd $CURDIR
53075
53076    if test ! -x $FIXPATH_BIN; then
53077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53078$as_echo "no" >&6; }
53079      cat $FIXPATH_DIR/fixpath1.log
53080      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53081    fi
53082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53083$as_echo "yes" >&6; }
53084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53085$as_echo_n "checking if fixpath.exe works... " >&6; }
53086    cd $FIXPATH_DIR
53087    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53088        > $FIXPATH_DIR/fixpath2.log 2>&1
53089    cd $CURDIR
53090    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53092$as_echo "no" >&6; }
53093      cat $FIXPATH_DIR/fixpath2.log
53094      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53095    fi
53096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53097$as_echo "yes" >&6; }
53098
53099    FIXPATH_DETACH_FLAG="--detach"
53100  fi
53101
53102
53103
53104
53105
53106
53107  # Check if X11 is needed
53108  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53109    # No X11 support on windows or macosx
53110    NEEDS_LIB_X11=false
53111  else
53112    # All other instances need X11, even if building headless only, libawt still
53113    # needs X11 headers.
53114    NEEDS_LIB_X11=true
53115  fi
53116
53117  # Check if cups is needed
53118  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53119    # Windows have a separate print system
53120    NEEDS_LIB_CUPS=false
53121  else
53122    NEEDS_LIB_CUPS=true
53123  fi
53124
53125  # A custom hook may have set this already
53126  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53127    NEEDS_LIB_FREETYPE=true
53128  fi
53129
53130  # Check if alsa is needed
53131  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53132    NEEDS_LIB_ALSA=true
53133  else
53134    NEEDS_LIB_ALSA=false
53135  fi
53136
53137  # Check if ffi is needed
53138  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53139    NEEDS_LIB_FFI=true
53140  else
53141    NEEDS_LIB_FFI=false
53142  fi
53143
53144
53145  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53146  # dynamic build is configured on command line.
53147
53148# Check whether --with-stdc++lib was given.
53149if test "${with_stdc__lib+set}" = set; then :
53150  withval=$with_stdc__lib;
53151        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53152                && test "x$with_stdc__lib" != xdefault; then
53153          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53154        fi
53155
53156else
53157  with_stdc__lib=default
53158
53159fi
53160
53161
53162  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53163    # Test if stdc++ can be linked statically.
53164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53165$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53166    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53167    ac_ext=cpp
53168ac_cpp='$CXXCPP $CPPFLAGS'
53169ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53170ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53171ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53172
53173    OLD_LIBS="$LIBS"
53174    LIBS="$STATIC_STDCXX_FLAGS"
53175    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53176/* end confdefs.h.  */
53177
53178int
53179main ()
53180{
53181return 0;
53182  ;
53183  return 0;
53184}
53185_ACEOF
53186if ac_fn_cxx_try_link "$LINENO"; then :
53187  has_static_libstdcxx=yes
53188else
53189  has_static_libstdcxx=no
53190fi
53191rm -f core conftest.err conftest.$ac_objext \
53192    conftest$ac_exeext conftest.$ac_ext
53193    LIBS="$OLD_LIBS"
53194    ac_ext=cpp
53195ac_cpp='$CXXCPP $CPPFLAGS'
53196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53199
53200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53201$as_echo "$has_static_libstdcxx" >&6; }
53202
53203    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53204      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53205    fi
53206
53207    # If dynamic was requested, it's available since it would fail above otherwise.
53208    # If dynamic wasn't requested, go with static unless it isn't available.
53209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53210$as_echo_n "checking how to link with libstdc++... " >&6; }
53211    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53212        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53214$as_echo "dynamic" >&6; }
53215    else
53216      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53217      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53218      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53219      # just use the same setting as for the TARGET toolchain.
53220      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53222$as_echo "static" >&6; }
53223    fi
53224  fi
53225
53226  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53227  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53228    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53229  fi
53230
53231
53232
53233  # Setup Windows runtime dlls
53234  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53235
53236
53237# Check whether --with-msvcr-dll was given.
53238if test "${with_msvcr_dll+set}" = set; then :
53239  withval=$with_msvcr_dll;
53240fi
53241
53242
53243  if test "x$with_msvcr_dll" != x; then
53244    # If given explicitly by user, do not probe. If not present, fail directly.
53245
53246  DLL_NAME="$MSVCR_NAME"
53247  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53248  METHOD="--with-msvcr-dll"
53249  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53250    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53251$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53252
53253    # Need to check if the found msvcr is correct architecture
53254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53255$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53256    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53258      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53259      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53260      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53261        CORRECT_MSVCR_ARCH="PE32 executable"
53262      else
53263        CORRECT_MSVCR_ARCH="PE32+ executable"
53264      fi
53265    else
53266      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53267        CORRECT_MSVCR_ARCH=386
53268      else
53269        CORRECT_MSVCR_ARCH=x86-64
53270      fi
53271    fi
53272    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53274$as_echo "ok" >&6; }
53275      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53276
53277  # Only process if variable expands to non-empty
53278
53279  if test "x$MSVC_DLL" != x; then
53280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53281
53282  # Input might be given as Windows format, start by converting to
53283  # unix format.
53284  path="$MSVC_DLL"
53285  new_path=`$CYGPATH -u "$path"`
53286
53287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53290  # "foo.exe" is OK but "foo" is an error.
53291  #
53292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53293  # It is also a way to make sure we got the proper file name for the real test later on.
53294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53295  if test "x$test_shortpath" = x; then
53296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53297$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53298    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53299  fi
53300
53301  # Call helper function which possibly converts this using DOS-style short mode.
53302  # If so, the updated path is stored in $new_path.
53303
53304  input_path="$new_path"
53305  # Check if we need to convert this using DOS-style short mode. If the path
53306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53307  # take no chances and rewrite it.
53308  # Note: m4 eats our [], so we need to use [ and ] instead.
53309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53310  if test "x$has_forbidden_chars" != x; then
53311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53315      # Going to short mode and back again did indeed matter. Since short mode is
53316      # case insensitive, let's make it lowercase to improve readability.
53317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53318      # Now convert it back to Unix-style (cygpath)
53319      input_path=`$CYGPATH -u "$shortmode_path"`
53320      new_path="$input_path"
53321    fi
53322  fi
53323
53324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53325  if test "x$test_cygdrive_prefix" = x; then
53326    # As a simple fix, exclude /usr/bin since it's not a real path.
53327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53329      # a path prefixed by /cygdrive for fixpath to work.
53330      new_path="$CYGWIN_ROOT_PATH$input_path"
53331    fi
53332  fi
53333
53334
53335  if test "x$path" != "x$new_path"; then
53336    MSVC_DLL="$new_path"
53337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53338$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53339  fi
53340
53341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53342
53343  path="$MSVC_DLL"
53344  has_colon=`$ECHO $path | $GREP ^.:`
53345  new_path="$path"
53346  if test "x$has_colon" = x; then
53347    # Not in mixed or Windows style, start by that.
53348    new_path=`cmd //c echo $path`
53349  fi
53350
53351
53352  input_path="$new_path"
53353  # Check if we need to convert this using DOS-style short mode. If the path
53354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53355  # take no chances and rewrite it.
53356  # Note: m4 eats our [], so we need to use [ and ] instead.
53357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53358  if test "x$has_forbidden_chars" != x; then
53359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53361  fi
53362
53363
53364  windows_path="$new_path"
53365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53366    unix_path=`$CYGPATH -u "$windows_path"`
53367    new_path="$unix_path"
53368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53370    new_path="$unix_path"
53371  fi
53372
53373  if test "x$path" != "x$new_path"; then
53374    MSVC_DLL="$new_path"
53375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53376$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53377  fi
53378
53379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53381
53382    else
53383      # We're on a unix platform. Hooray! :)
53384      path="$MSVC_DLL"
53385      has_space=`$ECHO "$path" | $GREP " "`
53386      if test "x$has_space" != x; then
53387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53388$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53390      fi
53391
53392      # Use eval to expand a potential ~
53393      eval path="$path"
53394      if test ! -f "$path" && test ! -d "$path"; then
53395        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53396      fi
53397
53398      if test -d "$path"; then
53399        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53400      else
53401        dir="`$DIRNAME "$path"`"
53402        base="`$BASENAME "$path"`"
53403        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53404      fi
53405    fi
53406  fi
53407
53408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53409$as_echo_n "checking for $DLL_NAME... " >&6; }
53410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53411$as_echo "$MSVC_DLL" >&6; }
53412    else
53413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53414$as_echo "incorrect, ignoring" >&6; }
53415      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53416$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53417    fi
53418  fi
53419
53420    if test "x$MSVC_DLL" = x; then
53421      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53422    fi
53423    MSVCR_DLL="$MSVC_DLL"
53424  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53425
53426  DLL_NAME="$MSVCR_NAME"
53427  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53428  METHOD="devkit"
53429  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53431$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53432
53433    # Need to check if the found msvcr is correct architecture
53434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53435$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53436    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53438      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53439      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53441        CORRECT_MSVCR_ARCH="PE32 executable"
53442      else
53443        CORRECT_MSVCR_ARCH="PE32+ executable"
53444      fi
53445    else
53446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53447        CORRECT_MSVCR_ARCH=386
53448      else
53449        CORRECT_MSVCR_ARCH=x86-64
53450      fi
53451    fi
53452    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53454$as_echo "ok" >&6; }
53455      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53456
53457  # Only process if variable expands to non-empty
53458
53459  if test "x$MSVC_DLL" != x; then
53460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53461
53462  # Input might be given as Windows format, start by converting to
53463  # unix format.
53464  path="$MSVC_DLL"
53465  new_path=`$CYGPATH -u "$path"`
53466
53467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53470  # "foo.exe" is OK but "foo" is an error.
53471  #
53472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53473  # It is also a way to make sure we got the proper file name for the real test later on.
53474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53475  if test "x$test_shortpath" = x; then
53476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53478    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53479  fi
53480
53481  # Call helper function which possibly converts this using DOS-style short mode.
53482  # If so, the updated path is stored in $new_path.
53483
53484  input_path="$new_path"
53485  # Check if we need to convert this using DOS-style short mode. If the path
53486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53487  # take no chances and rewrite it.
53488  # Note: m4 eats our [], so we need to use [ and ] instead.
53489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53490  if test "x$has_forbidden_chars" != x; then
53491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53495      # Going to short mode and back again did indeed matter. Since short mode is
53496      # case insensitive, let's make it lowercase to improve readability.
53497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53498      # Now convert it back to Unix-style (cygpath)
53499      input_path=`$CYGPATH -u "$shortmode_path"`
53500      new_path="$input_path"
53501    fi
53502  fi
53503
53504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53505  if test "x$test_cygdrive_prefix" = x; then
53506    # As a simple fix, exclude /usr/bin since it's not a real path.
53507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53509      # a path prefixed by /cygdrive for fixpath to work.
53510      new_path="$CYGWIN_ROOT_PATH$input_path"
53511    fi
53512  fi
53513
53514
53515  if test "x$path" != "x$new_path"; then
53516    MSVC_DLL="$new_path"
53517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53518$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53519  fi
53520
53521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53522
53523  path="$MSVC_DLL"
53524  has_colon=`$ECHO $path | $GREP ^.:`
53525  new_path="$path"
53526  if test "x$has_colon" = x; then
53527    # Not in mixed or Windows style, start by that.
53528    new_path=`cmd //c echo $path`
53529  fi
53530
53531
53532  input_path="$new_path"
53533  # Check if we need to convert this using DOS-style short mode. If the path
53534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53535  # take no chances and rewrite it.
53536  # Note: m4 eats our [], so we need to use [ and ] instead.
53537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53538  if test "x$has_forbidden_chars" != x; then
53539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53541  fi
53542
53543
53544  windows_path="$new_path"
53545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53546    unix_path=`$CYGPATH -u "$windows_path"`
53547    new_path="$unix_path"
53548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53550    new_path="$unix_path"
53551  fi
53552
53553  if test "x$path" != "x$new_path"; then
53554    MSVC_DLL="$new_path"
53555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53557  fi
53558
53559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53561
53562    else
53563      # We're on a unix platform. Hooray! :)
53564      path="$MSVC_DLL"
53565      has_space=`$ECHO "$path" | $GREP " "`
53566      if test "x$has_space" != x; then
53567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53570      fi
53571
53572      # Use eval to expand a potential ~
53573      eval path="$path"
53574      if test ! -f "$path" && test ! -d "$path"; then
53575        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53576      fi
53577
53578      if test -d "$path"; then
53579        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53580      else
53581        dir="`$DIRNAME "$path"`"
53582        base="`$BASENAME "$path"`"
53583        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53584      fi
53585    fi
53586  fi
53587
53588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53589$as_echo_n "checking for $DLL_NAME... " >&6; }
53590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53591$as_echo "$MSVC_DLL" >&6; }
53592    else
53593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53594$as_echo "incorrect, ignoring" >&6; }
53595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53596$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53597    fi
53598  fi
53599
53600    if test "x$MSVC_DLL" = x; then
53601      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53602    fi
53603    MSVCR_DLL="$MSVC_DLL"
53604  else
53605
53606  DLL_NAME="${MSVCR_NAME}"
53607  MSVC_DLL=
53608
53609  if test "x$MSVC_DLL" = x; then
53610    # Probe: Using well-known location from Visual Studio 10.0
53611    if test "x$VCINSTALLDIR" != x; then
53612      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53613
53614  windows_path="$CYGWIN_VC_INSTALL_DIR"
53615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53616    unix_path=`$CYGPATH -u "$windows_path"`
53617    CYGWIN_VC_INSTALL_DIR="$unix_path"
53618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53620    CYGWIN_VC_INSTALL_DIR="$unix_path"
53621  fi
53622
53623      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53624        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53625      else
53626        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53627      fi
53628      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53629
53630  DLL_NAME="$DLL_NAME"
53631  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53632  METHOD="well-known location in VCINSTALLDIR"
53633  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53635$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53636
53637    # Need to check if the found msvcr is correct architecture
53638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53639$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53640    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53642      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53643      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53645        CORRECT_MSVCR_ARCH="PE32 executable"
53646      else
53647        CORRECT_MSVCR_ARCH="PE32+ executable"
53648      fi
53649    else
53650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53651        CORRECT_MSVCR_ARCH=386
53652      else
53653        CORRECT_MSVCR_ARCH=x86-64
53654      fi
53655    fi
53656    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53658$as_echo "ok" >&6; }
53659      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53660
53661  # Only process if variable expands to non-empty
53662
53663  if test "x$MSVC_DLL" != x; then
53664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53665
53666  # Input might be given as Windows format, start by converting to
53667  # unix format.
53668  path="$MSVC_DLL"
53669  new_path=`$CYGPATH -u "$path"`
53670
53671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53674  # "foo.exe" is OK but "foo" is an error.
53675  #
53676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53677  # It is also a way to make sure we got the proper file name for the real test later on.
53678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53679  if test "x$test_shortpath" = x; then
53680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53681$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53682    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53683  fi
53684
53685  # Call helper function which possibly converts this using DOS-style short mode.
53686  # If so, the updated path is stored in $new_path.
53687
53688  input_path="$new_path"
53689  # Check if we need to convert this using DOS-style short mode. If the path
53690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53691  # take no chances and rewrite it.
53692  # Note: m4 eats our [], so we need to use [ and ] instead.
53693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53694  if test "x$has_forbidden_chars" != x; then
53695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53699      # Going to short mode and back again did indeed matter. Since short mode is
53700      # case insensitive, let's make it lowercase to improve readability.
53701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53702      # Now convert it back to Unix-style (cygpath)
53703      input_path=`$CYGPATH -u "$shortmode_path"`
53704      new_path="$input_path"
53705    fi
53706  fi
53707
53708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53709  if test "x$test_cygdrive_prefix" = x; then
53710    # As a simple fix, exclude /usr/bin since it's not a real path.
53711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53713      # a path prefixed by /cygdrive for fixpath to work.
53714      new_path="$CYGWIN_ROOT_PATH$input_path"
53715    fi
53716  fi
53717
53718
53719  if test "x$path" != "x$new_path"; then
53720    MSVC_DLL="$new_path"
53721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53722$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53723  fi
53724
53725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53726
53727  path="$MSVC_DLL"
53728  has_colon=`$ECHO $path | $GREP ^.:`
53729  new_path="$path"
53730  if test "x$has_colon" = x; then
53731    # Not in mixed or Windows style, start by that.
53732    new_path=`cmd //c echo $path`
53733  fi
53734
53735
53736  input_path="$new_path"
53737  # Check if we need to convert this using DOS-style short mode. If the path
53738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53739  # take no chances and rewrite it.
53740  # Note: m4 eats our [], so we need to use [ and ] instead.
53741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53742  if test "x$has_forbidden_chars" != x; then
53743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53745  fi
53746
53747
53748  windows_path="$new_path"
53749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53750    unix_path=`$CYGPATH -u "$windows_path"`
53751    new_path="$unix_path"
53752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53754    new_path="$unix_path"
53755  fi
53756
53757  if test "x$path" != "x$new_path"; then
53758    MSVC_DLL="$new_path"
53759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53760$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53761  fi
53762
53763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53765
53766    else
53767      # We're on a unix platform. Hooray! :)
53768      path="$MSVC_DLL"
53769      has_space=`$ECHO "$path" | $GREP " "`
53770      if test "x$has_space" != x; then
53771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53772$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53774      fi
53775
53776      # Use eval to expand a potential ~
53777      eval path="$path"
53778      if test ! -f "$path" && test ! -d "$path"; then
53779        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53780      fi
53781
53782      if test -d "$path"; then
53783        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53784      else
53785        dir="`$DIRNAME "$path"`"
53786        base="`$BASENAME "$path"`"
53787        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53788      fi
53789    fi
53790  fi
53791
53792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53793$as_echo_n "checking for $DLL_NAME... " >&6; }
53794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53795$as_echo "$MSVC_DLL" >&6; }
53796    else
53797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53798$as_echo "incorrect, ignoring" >&6; }
53799      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53800$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53801    fi
53802  fi
53803
53804    fi
53805  fi
53806
53807  if test "x$MSVC_DLL" = x; then
53808    # Probe: Check in the Boot JDK directory.
53809    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53810
53811  DLL_NAME="$DLL_NAME"
53812  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53813  METHOD="well-known location in Boot JDK"
53814  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53815    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53816$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53817
53818    # Need to check if the found msvcr is correct architecture
53819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53820$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53821    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53823      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53824      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53825      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53826        CORRECT_MSVCR_ARCH="PE32 executable"
53827      else
53828        CORRECT_MSVCR_ARCH="PE32+ executable"
53829      fi
53830    else
53831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53832        CORRECT_MSVCR_ARCH=386
53833      else
53834        CORRECT_MSVCR_ARCH=x86-64
53835      fi
53836    fi
53837    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53839$as_echo "ok" >&6; }
53840      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53841
53842  # Only process if variable expands to non-empty
53843
53844  if test "x$MSVC_DLL" != x; then
53845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53846
53847  # Input might be given as Windows format, start by converting to
53848  # unix format.
53849  path="$MSVC_DLL"
53850  new_path=`$CYGPATH -u "$path"`
53851
53852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53855  # "foo.exe" is OK but "foo" is an error.
53856  #
53857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53858  # It is also a way to make sure we got the proper file name for the real test later on.
53859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53860  if test "x$test_shortpath" = x; then
53861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53862$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53863    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53864  fi
53865
53866  # Call helper function which possibly converts this using DOS-style short mode.
53867  # If so, the updated path is stored in $new_path.
53868
53869  input_path="$new_path"
53870  # Check if we need to convert this using DOS-style short mode. If the path
53871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53872  # take no chances and rewrite it.
53873  # Note: m4 eats our [], so we need to use [ and ] instead.
53874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53875  if test "x$has_forbidden_chars" != x; then
53876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53880      # Going to short mode and back again did indeed matter. Since short mode is
53881      # case insensitive, let's make it lowercase to improve readability.
53882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53883      # Now convert it back to Unix-style (cygpath)
53884      input_path=`$CYGPATH -u "$shortmode_path"`
53885      new_path="$input_path"
53886    fi
53887  fi
53888
53889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53890  if test "x$test_cygdrive_prefix" = x; then
53891    # As a simple fix, exclude /usr/bin since it's not a real path.
53892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53894      # a path prefixed by /cygdrive for fixpath to work.
53895      new_path="$CYGWIN_ROOT_PATH$input_path"
53896    fi
53897  fi
53898
53899
53900  if test "x$path" != "x$new_path"; then
53901    MSVC_DLL="$new_path"
53902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53903$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53904  fi
53905
53906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53907
53908  path="$MSVC_DLL"
53909  has_colon=`$ECHO $path | $GREP ^.:`
53910  new_path="$path"
53911  if test "x$has_colon" = x; then
53912    # Not in mixed or Windows style, start by that.
53913    new_path=`cmd //c echo $path`
53914  fi
53915
53916
53917  input_path="$new_path"
53918  # Check if we need to convert this using DOS-style short mode. If the path
53919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53920  # take no chances and rewrite it.
53921  # Note: m4 eats our [], so we need to use [ and ] instead.
53922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53923  if test "x$has_forbidden_chars" != x; then
53924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53926  fi
53927
53928
53929  windows_path="$new_path"
53930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53931    unix_path=`$CYGPATH -u "$windows_path"`
53932    new_path="$unix_path"
53933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53935    new_path="$unix_path"
53936  fi
53937
53938  if test "x$path" != "x$new_path"; then
53939    MSVC_DLL="$new_path"
53940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53941$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53942  fi
53943
53944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53946
53947    else
53948      # We're on a unix platform. Hooray! :)
53949      path="$MSVC_DLL"
53950      has_space=`$ECHO "$path" | $GREP " "`
53951      if test "x$has_space" != x; then
53952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53953$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53955      fi
53956
53957      # Use eval to expand a potential ~
53958      eval path="$path"
53959      if test ! -f "$path" && test ! -d "$path"; then
53960        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53961      fi
53962
53963      if test -d "$path"; then
53964        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53965      else
53966        dir="`$DIRNAME "$path"`"
53967        base="`$BASENAME "$path"`"
53968        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53969      fi
53970    fi
53971  fi
53972
53973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53974$as_echo_n "checking for $DLL_NAME... " >&6; }
53975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53976$as_echo "$MSVC_DLL" >&6; }
53977    else
53978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53979$as_echo "incorrect, ignoring" >&6; }
53980      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53981$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53982    fi
53983  fi
53984
53985  fi
53986
53987  if test "x$MSVC_DLL" = x; then
53988    # Probe: Look in the Windows system32 directory
53989    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53990
53991  windows_path="$CYGWIN_SYSTEMROOT"
53992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53993    unix_path=`$CYGPATH -u "$windows_path"`
53994    CYGWIN_SYSTEMROOT="$unix_path"
53995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53997    CYGWIN_SYSTEMROOT="$unix_path"
53998  fi
53999
54000    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54001
54002  DLL_NAME="$DLL_NAME"
54003  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54004  METHOD="well-known location in SYSTEMROOT"
54005  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54007$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54008
54009    # Need to check if the found msvcr is correct architecture
54010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54011$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54012    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54014      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54015      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54016      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54017        CORRECT_MSVCR_ARCH="PE32 executable"
54018      else
54019        CORRECT_MSVCR_ARCH="PE32+ executable"
54020      fi
54021    else
54022      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54023        CORRECT_MSVCR_ARCH=386
54024      else
54025        CORRECT_MSVCR_ARCH=x86-64
54026      fi
54027    fi
54028    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54030$as_echo "ok" >&6; }
54031      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54032
54033  # Only process if variable expands to non-empty
54034
54035  if test "x$MSVC_DLL" != x; then
54036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54037
54038  # Input might be given as Windows format, start by converting to
54039  # unix format.
54040  path="$MSVC_DLL"
54041  new_path=`$CYGPATH -u "$path"`
54042
54043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54046  # "foo.exe" is OK but "foo" is an error.
54047  #
54048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54049  # It is also a way to make sure we got the proper file name for the real test later on.
54050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54051  if test "x$test_shortpath" = x; then
54052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54053$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54054    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54055  fi
54056
54057  # Call helper function which possibly converts this using DOS-style short mode.
54058  # If so, the updated path is stored in $new_path.
54059
54060  input_path="$new_path"
54061  # Check if we need to convert this using DOS-style short mode. If the path
54062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54063  # take no chances and rewrite it.
54064  # Note: m4 eats our [], so we need to use [ and ] instead.
54065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54066  if test "x$has_forbidden_chars" != x; then
54067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54071      # Going to short mode and back again did indeed matter. Since short mode is
54072      # case insensitive, let's make it lowercase to improve readability.
54073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54074      # Now convert it back to Unix-style (cygpath)
54075      input_path=`$CYGPATH -u "$shortmode_path"`
54076      new_path="$input_path"
54077    fi
54078  fi
54079
54080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54081  if test "x$test_cygdrive_prefix" = x; then
54082    # As a simple fix, exclude /usr/bin since it's not a real path.
54083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54085      # a path prefixed by /cygdrive for fixpath to work.
54086      new_path="$CYGWIN_ROOT_PATH$input_path"
54087    fi
54088  fi
54089
54090
54091  if test "x$path" != "x$new_path"; then
54092    MSVC_DLL="$new_path"
54093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54095  fi
54096
54097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54098
54099  path="$MSVC_DLL"
54100  has_colon=`$ECHO $path | $GREP ^.:`
54101  new_path="$path"
54102  if test "x$has_colon" = x; then
54103    # Not in mixed or Windows style, start by that.
54104    new_path=`cmd //c echo $path`
54105  fi
54106
54107
54108  input_path="$new_path"
54109  # Check if we need to convert this using DOS-style short mode. If the path
54110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54111  # take no chances and rewrite it.
54112  # Note: m4 eats our [], so we need to use [ and ] instead.
54113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54114  if test "x$has_forbidden_chars" != x; then
54115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54117  fi
54118
54119
54120  windows_path="$new_path"
54121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54122    unix_path=`$CYGPATH -u "$windows_path"`
54123    new_path="$unix_path"
54124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54126    new_path="$unix_path"
54127  fi
54128
54129  if test "x$path" != "x$new_path"; then
54130    MSVC_DLL="$new_path"
54131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54132$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54133  fi
54134
54135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54137
54138    else
54139      # We're on a unix platform. Hooray! :)
54140      path="$MSVC_DLL"
54141      has_space=`$ECHO "$path" | $GREP " "`
54142      if test "x$has_space" != x; then
54143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54144$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54146      fi
54147
54148      # Use eval to expand a potential ~
54149      eval path="$path"
54150      if test ! -f "$path" && test ! -d "$path"; then
54151        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54152      fi
54153
54154      if test -d "$path"; then
54155        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54156      else
54157        dir="`$DIRNAME "$path"`"
54158        base="`$BASENAME "$path"`"
54159        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54160      fi
54161    fi
54162  fi
54163
54164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54165$as_echo_n "checking for $DLL_NAME... " >&6; }
54166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54167$as_echo "$MSVC_DLL" >&6; }
54168    else
54169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54170$as_echo "incorrect, ignoring" >&6; }
54171      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54172$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54173    fi
54174  fi
54175
54176  fi
54177
54178  if test "x$MSVC_DLL" = x; then
54179    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54180    if test "x$VS100COMNTOOLS" != x; then
54181      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54182
54183  windows_path="$CYGWIN_VS_TOOLS_DIR"
54184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54185    unix_path=`$CYGPATH -u "$windows_path"`
54186    CYGWIN_VS_TOOLS_DIR="$unix_path"
54187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54189    CYGWIN_VS_TOOLS_DIR="$unix_path"
54190  fi
54191
54192      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54193        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54194	    | $GREP -i /x64/ | $HEAD --lines 1`
54195      else
54196        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54197	    | $GREP -i /x86/ | $HEAD --lines 1`
54198      fi
54199
54200  DLL_NAME="$DLL_NAME"
54201  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54202  METHOD="search of VS100COMNTOOLS"
54203  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54204    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54205$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54206
54207    # Need to check if the found msvcr is correct architecture
54208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54209$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54210    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54212      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54213      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54214      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54215        CORRECT_MSVCR_ARCH="PE32 executable"
54216      else
54217        CORRECT_MSVCR_ARCH="PE32+ executable"
54218      fi
54219    else
54220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54221        CORRECT_MSVCR_ARCH=386
54222      else
54223        CORRECT_MSVCR_ARCH=x86-64
54224      fi
54225    fi
54226    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54228$as_echo "ok" >&6; }
54229      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54230
54231  # Only process if variable expands to non-empty
54232
54233  if test "x$MSVC_DLL" != x; then
54234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54235
54236  # Input might be given as Windows format, start by converting to
54237  # unix format.
54238  path="$MSVC_DLL"
54239  new_path=`$CYGPATH -u "$path"`
54240
54241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54244  # "foo.exe" is OK but "foo" is an error.
54245  #
54246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54247  # It is also a way to make sure we got the proper file name for the real test later on.
54248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54249  if test "x$test_shortpath" = x; then
54250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54251$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54252    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54253  fi
54254
54255  # Call helper function which possibly converts this using DOS-style short mode.
54256  # If so, the updated path is stored in $new_path.
54257
54258  input_path="$new_path"
54259  # Check if we need to convert this using DOS-style short mode. If the path
54260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54261  # take no chances and rewrite it.
54262  # Note: m4 eats our [], so we need to use [ and ] instead.
54263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54264  if test "x$has_forbidden_chars" != x; then
54265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54269      # Going to short mode and back again did indeed matter. Since short mode is
54270      # case insensitive, let's make it lowercase to improve readability.
54271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54272      # Now convert it back to Unix-style (cygpath)
54273      input_path=`$CYGPATH -u "$shortmode_path"`
54274      new_path="$input_path"
54275    fi
54276  fi
54277
54278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54279  if test "x$test_cygdrive_prefix" = x; then
54280    # As a simple fix, exclude /usr/bin since it's not a real path.
54281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54283      # a path prefixed by /cygdrive for fixpath to work.
54284      new_path="$CYGWIN_ROOT_PATH$input_path"
54285    fi
54286  fi
54287
54288
54289  if test "x$path" != "x$new_path"; then
54290    MSVC_DLL="$new_path"
54291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54292$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54293  fi
54294
54295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54296
54297  path="$MSVC_DLL"
54298  has_colon=`$ECHO $path | $GREP ^.:`
54299  new_path="$path"
54300  if test "x$has_colon" = x; then
54301    # Not in mixed or Windows style, start by that.
54302    new_path=`cmd //c echo $path`
54303  fi
54304
54305
54306  input_path="$new_path"
54307  # Check if we need to convert this using DOS-style short mode. If the path
54308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54309  # take no chances and rewrite it.
54310  # Note: m4 eats our [], so we need to use [ and ] instead.
54311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54312  if test "x$has_forbidden_chars" != x; then
54313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54315  fi
54316
54317
54318  windows_path="$new_path"
54319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54320    unix_path=`$CYGPATH -u "$windows_path"`
54321    new_path="$unix_path"
54322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54324    new_path="$unix_path"
54325  fi
54326
54327  if test "x$path" != "x$new_path"; then
54328    MSVC_DLL="$new_path"
54329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54330$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54331  fi
54332
54333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54335
54336    else
54337      # We're on a unix platform. Hooray! :)
54338      path="$MSVC_DLL"
54339      has_space=`$ECHO "$path" | $GREP " "`
54340      if test "x$has_space" != x; then
54341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54342$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54344      fi
54345
54346      # Use eval to expand a potential ~
54347      eval path="$path"
54348      if test ! -f "$path" && test ! -d "$path"; then
54349        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54350      fi
54351
54352      if test -d "$path"; then
54353        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54354      else
54355        dir="`$DIRNAME "$path"`"
54356        base="`$BASENAME "$path"`"
54357        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54358      fi
54359    fi
54360  fi
54361
54362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54363$as_echo_n "checking for $DLL_NAME... " >&6; }
54364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54365$as_echo "$MSVC_DLL" >&6; }
54366    else
54367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54368$as_echo "incorrect, ignoring" >&6; }
54369      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54370$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54371    fi
54372  fi
54373
54374    fi
54375  fi
54376
54377  if test "x$MSVC_DLL" = x; then
54378    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54379    # (This was the original behaviour; kept since it might turn something up)
54380    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54381      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54382        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54383	    | $GREP x64 | $HEAD --lines 1`
54384      else
54385        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54386	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54387        if test "x$POSSIBLE_MSVC_DLL" = x; then
54388          # We're grasping at straws now...
54389          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54390	      | $HEAD --lines 1`
54391        fi
54392      fi
54393
54394
54395  DLL_NAME="$DLL_NAME"
54396  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54397  METHOD="search of VCINSTALLDIR"
54398  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54400$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54401
54402    # Need to check if the found msvcr is correct architecture
54403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54404$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54405    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54407      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54408      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54409      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54410        CORRECT_MSVCR_ARCH="PE32 executable"
54411      else
54412        CORRECT_MSVCR_ARCH="PE32+ executable"
54413      fi
54414    else
54415      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54416        CORRECT_MSVCR_ARCH=386
54417      else
54418        CORRECT_MSVCR_ARCH=x86-64
54419      fi
54420    fi
54421    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54423$as_echo "ok" >&6; }
54424      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54425
54426  # Only process if variable expands to non-empty
54427
54428  if test "x$MSVC_DLL" != x; then
54429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54430
54431  # Input might be given as Windows format, start by converting to
54432  # unix format.
54433  path="$MSVC_DLL"
54434  new_path=`$CYGPATH -u "$path"`
54435
54436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54439  # "foo.exe" is OK but "foo" is an error.
54440  #
54441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54442  # It is also a way to make sure we got the proper file name for the real test later on.
54443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54444  if test "x$test_shortpath" = x; then
54445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54446$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54447    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54448  fi
54449
54450  # Call helper function which possibly converts this using DOS-style short mode.
54451  # If so, the updated path is stored in $new_path.
54452
54453  input_path="$new_path"
54454  # Check if we need to convert this using DOS-style short mode. If the path
54455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54456  # take no chances and rewrite it.
54457  # Note: m4 eats our [], so we need to use [ and ] instead.
54458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54459  if test "x$has_forbidden_chars" != x; then
54460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54464      # Going to short mode and back again did indeed matter. Since short mode is
54465      # case insensitive, let's make it lowercase to improve readability.
54466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54467      # Now convert it back to Unix-style (cygpath)
54468      input_path=`$CYGPATH -u "$shortmode_path"`
54469      new_path="$input_path"
54470    fi
54471  fi
54472
54473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54474  if test "x$test_cygdrive_prefix" = x; then
54475    # As a simple fix, exclude /usr/bin since it's not a real path.
54476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54478      # a path prefixed by /cygdrive for fixpath to work.
54479      new_path="$CYGWIN_ROOT_PATH$input_path"
54480    fi
54481  fi
54482
54483
54484  if test "x$path" != "x$new_path"; then
54485    MSVC_DLL="$new_path"
54486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54487$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54488  fi
54489
54490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54491
54492  path="$MSVC_DLL"
54493  has_colon=`$ECHO $path | $GREP ^.:`
54494  new_path="$path"
54495  if test "x$has_colon" = x; then
54496    # Not in mixed or Windows style, start by that.
54497    new_path=`cmd //c echo $path`
54498  fi
54499
54500
54501  input_path="$new_path"
54502  # Check if we need to convert this using DOS-style short mode. If the path
54503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54504  # take no chances and rewrite it.
54505  # Note: m4 eats our [], so we need to use [ and ] instead.
54506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54507  if test "x$has_forbidden_chars" != x; then
54508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54510  fi
54511
54512
54513  windows_path="$new_path"
54514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54515    unix_path=`$CYGPATH -u "$windows_path"`
54516    new_path="$unix_path"
54517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54519    new_path="$unix_path"
54520  fi
54521
54522  if test "x$path" != "x$new_path"; then
54523    MSVC_DLL="$new_path"
54524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54526  fi
54527
54528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54530
54531    else
54532      # We're on a unix platform. Hooray! :)
54533      path="$MSVC_DLL"
54534      has_space=`$ECHO "$path" | $GREP " "`
54535      if test "x$has_space" != x; then
54536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54537$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54539      fi
54540
54541      # Use eval to expand a potential ~
54542      eval path="$path"
54543      if test ! -f "$path" && test ! -d "$path"; then
54544        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54545      fi
54546
54547      if test -d "$path"; then
54548        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54549      else
54550        dir="`$DIRNAME "$path"`"
54551        base="`$BASENAME "$path"`"
54552        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54553      fi
54554    fi
54555  fi
54556
54557      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54558$as_echo_n "checking for $DLL_NAME... " >&6; }
54559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54560$as_echo "$MSVC_DLL" >&6; }
54561    else
54562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54563$as_echo "incorrect, ignoring" >&6; }
54564      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54565$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54566    fi
54567  fi
54568
54569    fi
54570  fi
54571
54572  if test "x$MSVC_DLL" = x; then
54573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54574$as_echo_n "checking for $DLL_NAME... " >&6; }
54575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54576$as_echo "no" >&6; }
54577    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54578  fi
54579
54580    MSVCR_DLL="$MSVC_DLL"
54581  fi
54582
54583
54584
54585# Check whether --with-msvcp-dll was given.
54586if test "${with_msvcp_dll+set}" = set; then :
54587  withval=$with_msvcp_dll;
54588fi
54589
54590
54591  if test "x$MSVCP_NAME" != "x"; then
54592    if test "x$with_msvcp_dll" != x; then
54593      # If given explicitly by user, do not probe. If not present, fail directly.
54594
54595  DLL_NAME="$MSVCP_NAME"
54596  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54597  METHOD="--with-msvcp-dll"
54598  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54600$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54601
54602    # Need to check if the found msvcr is correct architecture
54603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54604$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54605    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54607      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54608      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54609      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54610        CORRECT_MSVCR_ARCH="PE32 executable"
54611      else
54612        CORRECT_MSVCR_ARCH="PE32+ executable"
54613      fi
54614    else
54615      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54616        CORRECT_MSVCR_ARCH=386
54617      else
54618        CORRECT_MSVCR_ARCH=x86-64
54619      fi
54620    fi
54621    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54623$as_echo "ok" >&6; }
54624      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54625
54626  # Only process if variable expands to non-empty
54627
54628  if test "x$MSVC_DLL" != x; then
54629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54630
54631  # Input might be given as Windows format, start by converting to
54632  # unix format.
54633  path="$MSVC_DLL"
54634  new_path=`$CYGPATH -u "$path"`
54635
54636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54639  # "foo.exe" is OK but "foo" is an error.
54640  #
54641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54642  # It is also a way to make sure we got the proper file name for the real test later on.
54643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54644  if test "x$test_shortpath" = x; then
54645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54646$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54647    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54648  fi
54649
54650  # Call helper function which possibly converts this using DOS-style short mode.
54651  # If so, the updated path is stored in $new_path.
54652
54653  input_path="$new_path"
54654  # Check if we need to convert this using DOS-style short mode. If the path
54655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54656  # take no chances and rewrite it.
54657  # Note: m4 eats our [], so we need to use [ and ] instead.
54658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54659  if test "x$has_forbidden_chars" != x; then
54660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54664      # Going to short mode and back again did indeed matter. Since short mode is
54665      # case insensitive, let's make it lowercase to improve readability.
54666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54667      # Now convert it back to Unix-style (cygpath)
54668      input_path=`$CYGPATH -u "$shortmode_path"`
54669      new_path="$input_path"
54670    fi
54671  fi
54672
54673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54674  if test "x$test_cygdrive_prefix" = x; then
54675    # As a simple fix, exclude /usr/bin since it's not a real path.
54676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54678      # a path prefixed by /cygdrive for fixpath to work.
54679      new_path="$CYGWIN_ROOT_PATH$input_path"
54680    fi
54681  fi
54682
54683
54684  if test "x$path" != "x$new_path"; then
54685    MSVC_DLL="$new_path"
54686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54687$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54688  fi
54689
54690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54691
54692  path="$MSVC_DLL"
54693  has_colon=`$ECHO $path | $GREP ^.:`
54694  new_path="$path"
54695  if test "x$has_colon" = x; then
54696    # Not in mixed or Windows style, start by that.
54697    new_path=`cmd //c echo $path`
54698  fi
54699
54700
54701  input_path="$new_path"
54702  # Check if we need to convert this using DOS-style short mode. If the path
54703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54704  # take no chances and rewrite it.
54705  # Note: m4 eats our [], so we need to use [ and ] instead.
54706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54707  if test "x$has_forbidden_chars" != x; then
54708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54710  fi
54711
54712
54713  windows_path="$new_path"
54714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54715    unix_path=`$CYGPATH -u "$windows_path"`
54716    new_path="$unix_path"
54717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54719    new_path="$unix_path"
54720  fi
54721
54722  if test "x$path" != "x$new_path"; then
54723    MSVC_DLL="$new_path"
54724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54725$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54726  fi
54727
54728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54730
54731    else
54732      # We're on a unix platform. Hooray! :)
54733      path="$MSVC_DLL"
54734      has_space=`$ECHO "$path" | $GREP " "`
54735      if test "x$has_space" != x; then
54736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54737$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54739      fi
54740
54741      # Use eval to expand a potential ~
54742      eval path="$path"
54743      if test ! -f "$path" && test ! -d "$path"; then
54744        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54745      fi
54746
54747      if test -d "$path"; then
54748        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54749      else
54750        dir="`$DIRNAME "$path"`"
54751        base="`$BASENAME "$path"`"
54752        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54753      fi
54754    fi
54755  fi
54756
54757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54758$as_echo_n "checking for $DLL_NAME... " >&6; }
54759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54760$as_echo "$MSVC_DLL" >&6; }
54761    else
54762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54763$as_echo "incorrect, ignoring" >&6; }
54764      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54765$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54766    fi
54767  fi
54768
54769      if test "x$MSVC_DLL" = x; then
54770        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54771      fi
54772      MSVCP_DLL="$MSVC_DLL"
54773    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54774
54775  DLL_NAME="$MSVCP_NAME"
54776  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54777  METHOD="devkit"
54778  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54780$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54781
54782    # Need to check if the found msvcr is correct architecture
54783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54784$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54785    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54787      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54788      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54789      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54790        CORRECT_MSVCR_ARCH="PE32 executable"
54791      else
54792        CORRECT_MSVCR_ARCH="PE32+ executable"
54793      fi
54794    else
54795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54796        CORRECT_MSVCR_ARCH=386
54797      else
54798        CORRECT_MSVCR_ARCH=x86-64
54799      fi
54800    fi
54801    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54803$as_echo "ok" >&6; }
54804      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54805
54806  # Only process if variable expands to non-empty
54807
54808  if test "x$MSVC_DLL" != x; then
54809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54810
54811  # Input might be given as Windows format, start by converting to
54812  # unix format.
54813  path="$MSVC_DLL"
54814  new_path=`$CYGPATH -u "$path"`
54815
54816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54819  # "foo.exe" is OK but "foo" is an error.
54820  #
54821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54822  # It is also a way to make sure we got the proper file name for the real test later on.
54823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54824  if test "x$test_shortpath" = x; then
54825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54826$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54827    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54828  fi
54829
54830  # Call helper function which possibly converts this using DOS-style short mode.
54831  # If so, the updated path is stored in $new_path.
54832
54833  input_path="$new_path"
54834  # Check if we need to convert this using DOS-style short mode. If the path
54835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54836  # take no chances and rewrite it.
54837  # Note: m4 eats our [], so we need to use [ and ] instead.
54838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54839  if test "x$has_forbidden_chars" != x; then
54840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54844      # Going to short mode and back again did indeed matter. Since short mode is
54845      # case insensitive, let's make it lowercase to improve readability.
54846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54847      # Now convert it back to Unix-style (cygpath)
54848      input_path=`$CYGPATH -u "$shortmode_path"`
54849      new_path="$input_path"
54850    fi
54851  fi
54852
54853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54854  if test "x$test_cygdrive_prefix" = x; then
54855    # As a simple fix, exclude /usr/bin since it's not a real path.
54856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54858      # a path prefixed by /cygdrive for fixpath to work.
54859      new_path="$CYGWIN_ROOT_PATH$input_path"
54860    fi
54861  fi
54862
54863
54864  if test "x$path" != "x$new_path"; then
54865    MSVC_DLL="$new_path"
54866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54867$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54868  fi
54869
54870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54871
54872  path="$MSVC_DLL"
54873  has_colon=`$ECHO $path | $GREP ^.:`
54874  new_path="$path"
54875  if test "x$has_colon" = x; then
54876    # Not in mixed or Windows style, start by that.
54877    new_path=`cmd //c echo $path`
54878  fi
54879
54880
54881  input_path="$new_path"
54882  # Check if we need to convert this using DOS-style short mode. If the path
54883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54884  # take no chances and rewrite it.
54885  # Note: m4 eats our [], so we need to use [ and ] instead.
54886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54887  if test "x$has_forbidden_chars" != x; then
54888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54890  fi
54891
54892
54893  windows_path="$new_path"
54894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54895    unix_path=`$CYGPATH -u "$windows_path"`
54896    new_path="$unix_path"
54897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54899    new_path="$unix_path"
54900  fi
54901
54902  if test "x$path" != "x$new_path"; then
54903    MSVC_DLL="$new_path"
54904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54905$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54906  fi
54907
54908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54910
54911    else
54912      # We're on a unix platform. Hooray! :)
54913      path="$MSVC_DLL"
54914      has_space=`$ECHO "$path" | $GREP " "`
54915      if test "x$has_space" != x; then
54916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54917$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54919      fi
54920
54921      # Use eval to expand a potential ~
54922      eval path="$path"
54923      if test ! -f "$path" && test ! -d "$path"; then
54924        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54925      fi
54926
54927      if test -d "$path"; then
54928        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54929      else
54930        dir="`$DIRNAME "$path"`"
54931        base="`$BASENAME "$path"`"
54932        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54933      fi
54934    fi
54935  fi
54936
54937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54938$as_echo_n "checking for $DLL_NAME... " >&6; }
54939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54940$as_echo "$MSVC_DLL" >&6; }
54941    else
54942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54943$as_echo "incorrect, ignoring" >&6; }
54944      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54945$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54946    fi
54947  fi
54948
54949      if test "x$MSVC_DLL" = x; then
54950        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54951      fi
54952      MSVCP_DLL="$MSVC_DLL"
54953    else
54954
54955  DLL_NAME="${MSVCP_NAME}"
54956  MSVC_DLL=
54957
54958  if test "x$MSVC_DLL" = x; then
54959    # Probe: Using well-known location from Visual Studio 10.0
54960    if test "x$VCINSTALLDIR" != x; then
54961      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54962
54963  windows_path="$CYGWIN_VC_INSTALL_DIR"
54964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54965    unix_path=`$CYGPATH -u "$windows_path"`
54966    CYGWIN_VC_INSTALL_DIR="$unix_path"
54967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54969    CYGWIN_VC_INSTALL_DIR="$unix_path"
54970  fi
54971
54972      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54973        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54974      else
54975        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54976      fi
54977      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54978
54979  DLL_NAME="$DLL_NAME"
54980  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54981  METHOD="well-known location in VCINSTALLDIR"
54982  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54983    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54984$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54985
54986    # Need to check if the found msvcr is correct architecture
54987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54988$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54989    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54991      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54992      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54993      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54994        CORRECT_MSVCR_ARCH="PE32 executable"
54995      else
54996        CORRECT_MSVCR_ARCH="PE32+ executable"
54997      fi
54998    else
54999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55000        CORRECT_MSVCR_ARCH=386
55001      else
55002        CORRECT_MSVCR_ARCH=x86-64
55003      fi
55004    fi
55005    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55007$as_echo "ok" >&6; }
55008      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55009
55010  # Only process if variable expands to non-empty
55011
55012  if test "x$MSVC_DLL" != x; then
55013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55014
55015  # Input might be given as Windows format, start by converting to
55016  # unix format.
55017  path="$MSVC_DLL"
55018  new_path=`$CYGPATH -u "$path"`
55019
55020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55023  # "foo.exe" is OK but "foo" is an error.
55024  #
55025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55026  # It is also a way to make sure we got the proper file name for the real test later on.
55027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55028  if test "x$test_shortpath" = x; then
55029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55030$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55031    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55032  fi
55033
55034  # Call helper function which possibly converts this using DOS-style short mode.
55035  # If so, the updated path is stored in $new_path.
55036
55037  input_path="$new_path"
55038  # Check if we need to convert this using DOS-style short mode. If the path
55039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55040  # take no chances and rewrite it.
55041  # Note: m4 eats our [], so we need to use [ and ] instead.
55042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55043  if test "x$has_forbidden_chars" != x; then
55044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55048      # Going to short mode and back again did indeed matter. Since short mode is
55049      # case insensitive, let's make it lowercase to improve readability.
55050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55051      # Now convert it back to Unix-style (cygpath)
55052      input_path=`$CYGPATH -u "$shortmode_path"`
55053      new_path="$input_path"
55054    fi
55055  fi
55056
55057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55058  if test "x$test_cygdrive_prefix" = x; then
55059    # As a simple fix, exclude /usr/bin since it's not a real path.
55060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55062      # a path prefixed by /cygdrive for fixpath to work.
55063      new_path="$CYGWIN_ROOT_PATH$input_path"
55064    fi
55065  fi
55066
55067
55068  if test "x$path" != "x$new_path"; then
55069    MSVC_DLL="$new_path"
55070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55071$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55072  fi
55073
55074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55075
55076  path="$MSVC_DLL"
55077  has_colon=`$ECHO $path | $GREP ^.:`
55078  new_path="$path"
55079  if test "x$has_colon" = x; then
55080    # Not in mixed or Windows style, start by that.
55081    new_path=`cmd //c echo $path`
55082  fi
55083
55084
55085  input_path="$new_path"
55086  # Check if we need to convert this using DOS-style short mode. If the path
55087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55088  # take no chances and rewrite it.
55089  # Note: m4 eats our [], so we need to use [ and ] instead.
55090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55091  if test "x$has_forbidden_chars" != x; then
55092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55094  fi
55095
55096
55097  windows_path="$new_path"
55098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55099    unix_path=`$CYGPATH -u "$windows_path"`
55100    new_path="$unix_path"
55101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55103    new_path="$unix_path"
55104  fi
55105
55106  if test "x$path" != "x$new_path"; then
55107    MSVC_DLL="$new_path"
55108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55109$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55110  fi
55111
55112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55114
55115    else
55116      # We're on a unix platform. Hooray! :)
55117      path="$MSVC_DLL"
55118      has_space=`$ECHO "$path" | $GREP " "`
55119      if test "x$has_space" != x; then
55120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55121$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55123      fi
55124
55125      # Use eval to expand a potential ~
55126      eval path="$path"
55127      if test ! -f "$path" && test ! -d "$path"; then
55128        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55129      fi
55130
55131      if test -d "$path"; then
55132        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55133      else
55134        dir="`$DIRNAME "$path"`"
55135        base="`$BASENAME "$path"`"
55136        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55137      fi
55138    fi
55139  fi
55140
55141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55142$as_echo_n "checking for $DLL_NAME... " >&6; }
55143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55144$as_echo "$MSVC_DLL" >&6; }
55145    else
55146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55147$as_echo "incorrect, ignoring" >&6; }
55148      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55149$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55150    fi
55151  fi
55152
55153    fi
55154  fi
55155
55156  if test "x$MSVC_DLL" = x; then
55157    # Probe: Check in the Boot JDK directory.
55158    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55159
55160  DLL_NAME="$DLL_NAME"
55161  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55162  METHOD="well-known location in Boot JDK"
55163  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55165$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55166
55167    # Need to check if the found msvcr is correct architecture
55168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55169$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55170    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55172      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55173      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55175        CORRECT_MSVCR_ARCH="PE32 executable"
55176      else
55177        CORRECT_MSVCR_ARCH="PE32+ executable"
55178      fi
55179    else
55180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55181        CORRECT_MSVCR_ARCH=386
55182      else
55183        CORRECT_MSVCR_ARCH=x86-64
55184      fi
55185    fi
55186    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55188$as_echo "ok" >&6; }
55189      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55190
55191  # Only process if variable expands to non-empty
55192
55193  if test "x$MSVC_DLL" != x; then
55194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55195
55196  # Input might be given as Windows format, start by converting to
55197  # unix format.
55198  path="$MSVC_DLL"
55199  new_path=`$CYGPATH -u "$path"`
55200
55201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55204  # "foo.exe" is OK but "foo" is an error.
55205  #
55206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55207  # It is also a way to make sure we got the proper file name for the real test later on.
55208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55209  if test "x$test_shortpath" = x; then
55210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55211$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55212    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55213  fi
55214
55215  # Call helper function which possibly converts this using DOS-style short mode.
55216  # If so, the updated path is stored in $new_path.
55217
55218  input_path="$new_path"
55219  # Check if we need to convert this using DOS-style short mode. If the path
55220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55221  # take no chances and rewrite it.
55222  # Note: m4 eats our [], so we need to use [ and ] instead.
55223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55224  if test "x$has_forbidden_chars" != x; then
55225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55229      # Going to short mode and back again did indeed matter. Since short mode is
55230      # case insensitive, let's make it lowercase to improve readability.
55231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55232      # Now convert it back to Unix-style (cygpath)
55233      input_path=`$CYGPATH -u "$shortmode_path"`
55234      new_path="$input_path"
55235    fi
55236  fi
55237
55238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55239  if test "x$test_cygdrive_prefix" = x; then
55240    # As a simple fix, exclude /usr/bin since it's not a real path.
55241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55243      # a path prefixed by /cygdrive for fixpath to work.
55244      new_path="$CYGWIN_ROOT_PATH$input_path"
55245    fi
55246  fi
55247
55248
55249  if test "x$path" != "x$new_path"; then
55250    MSVC_DLL="$new_path"
55251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55253  fi
55254
55255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55256
55257  path="$MSVC_DLL"
55258  has_colon=`$ECHO $path | $GREP ^.:`
55259  new_path="$path"
55260  if test "x$has_colon" = x; then
55261    # Not in mixed or Windows style, start by that.
55262    new_path=`cmd //c echo $path`
55263  fi
55264
55265
55266  input_path="$new_path"
55267  # Check if we need to convert this using DOS-style short mode. If the path
55268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55269  # take no chances and rewrite it.
55270  # Note: m4 eats our [], so we need to use [ and ] instead.
55271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55272  if test "x$has_forbidden_chars" != x; then
55273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55275  fi
55276
55277
55278  windows_path="$new_path"
55279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55280    unix_path=`$CYGPATH -u "$windows_path"`
55281    new_path="$unix_path"
55282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55284    new_path="$unix_path"
55285  fi
55286
55287  if test "x$path" != "x$new_path"; then
55288    MSVC_DLL="$new_path"
55289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55290$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55291  fi
55292
55293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55295
55296    else
55297      # We're on a unix platform. Hooray! :)
55298      path="$MSVC_DLL"
55299      has_space=`$ECHO "$path" | $GREP " "`
55300      if test "x$has_space" != x; then
55301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55302$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55304      fi
55305
55306      # Use eval to expand a potential ~
55307      eval path="$path"
55308      if test ! -f "$path" && test ! -d "$path"; then
55309        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55310      fi
55311
55312      if test -d "$path"; then
55313        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55314      else
55315        dir="`$DIRNAME "$path"`"
55316        base="`$BASENAME "$path"`"
55317        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55318      fi
55319    fi
55320  fi
55321
55322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55323$as_echo_n "checking for $DLL_NAME... " >&6; }
55324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55325$as_echo "$MSVC_DLL" >&6; }
55326    else
55327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55328$as_echo "incorrect, ignoring" >&6; }
55329      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55330$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55331    fi
55332  fi
55333
55334  fi
55335
55336  if test "x$MSVC_DLL" = x; then
55337    # Probe: Look in the Windows system32 directory
55338    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55339
55340  windows_path="$CYGWIN_SYSTEMROOT"
55341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55342    unix_path=`$CYGPATH -u "$windows_path"`
55343    CYGWIN_SYSTEMROOT="$unix_path"
55344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55346    CYGWIN_SYSTEMROOT="$unix_path"
55347  fi
55348
55349    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55350
55351  DLL_NAME="$DLL_NAME"
55352  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55353  METHOD="well-known location in SYSTEMROOT"
55354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55357
55358    # Need to check if the found msvcr is correct architecture
55359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55366        CORRECT_MSVCR_ARCH="PE32 executable"
55367      else
55368        CORRECT_MSVCR_ARCH="PE32+ executable"
55369      fi
55370    else
55371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55372        CORRECT_MSVCR_ARCH=386
55373      else
55374        CORRECT_MSVCR_ARCH=x86-64
55375      fi
55376    fi
55377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55379$as_echo "ok" >&6; }
55380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55381
55382  # Only process if variable expands to non-empty
55383
55384  if test "x$MSVC_DLL" != x; then
55385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55386
55387  # Input might be given as Windows format, start by converting to
55388  # unix format.
55389  path="$MSVC_DLL"
55390  new_path=`$CYGPATH -u "$path"`
55391
55392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55395  # "foo.exe" is OK but "foo" is an error.
55396  #
55397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55398  # It is also a way to make sure we got the proper file name for the real test later on.
55399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55400  if test "x$test_shortpath" = x; then
55401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55403    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55404  fi
55405
55406  # Call helper function which possibly converts this using DOS-style short mode.
55407  # If so, the updated path is stored in $new_path.
55408
55409  input_path="$new_path"
55410  # Check if we need to convert this using DOS-style short mode. If the path
55411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55412  # take no chances and rewrite it.
55413  # Note: m4 eats our [], so we need to use [ and ] instead.
55414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55415  if test "x$has_forbidden_chars" != x; then
55416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55420      # Going to short mode and back again did indeed matter. Since short mode is
55421      # case insensitive, let's make it lowercase to improve readability.
55422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55423      # Now convert it back to Unix-style (cygpath)
55424      input_path=`$CYGPATH -u "$shortmode_path"`
55425      new_path="$input_path"
55426    fi
55427  fi
55428
55429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55430  if test "x$test_cygdrive_prefix" = x; then
55431    # As a simple fix, exclude /usr/bin since it's not a real path.
55432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55434      # a path prefixed by /cygdrive for fixpath to work.
55435      new_path="$CYGWIN_ROOT_PATH$input_path"
55436    fi
55437  fi
55438
55439
55440  if test "x$path" != "x$new_path"; then
55441    MSVC_DLL="$new_path"
55442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55444  fi
55445
55446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55447
55448  path="$MSVC_DLL"
55449  has_colon=`$ECHO $path | $GREP ^.:`
55450  new_path="$path"
55451  if test "x$has_colon" = x; then
55452    # Not in mixed or Windows style, start by that.
55453    new_path=`cmd //c echo $path`
55454  fi
55455
55456
55457  input_path="$new_path"
55458  # Check if we need to convert this using DOS-style short mode. If the path
55459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55460  # take no chances and rewrite it.
55461  # Note: m4 eats our [], so we need to use [ and ] instead.
55462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55463  if test "x$has_forbidden_chars" != x; then
55464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55466  fi
55467
55468
55469  windows_path="$new_path"
55470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55471    unix_path=`$CYGPATH -u "$windows_path"`
55472    new_path="$unix_path"
55473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55475    new_path="$unix_path"
55476  fi
55477
55478  if test "x$path" != "x$new_path"; then
55479    MSVC_DLL="$new_path"
55480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55482  fi
55483
55484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55486
55487    else
55488      # We're on a unix platform. Hooray! :)
55489      path="$MSVC_DLL"
55490      has_space=`$ECHO "$path" | $GREP " "`
55491      if test "x$has_space" != x; then
55492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55493$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55495      fi
55496
55497      # Use eval to expand a potential ~
55498      eval path="$path"
55499      if test ! -f "$path" && test ! -d "$path"; then
55500        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55501      fi
55502
55503      if test -d "$path"; then
55504        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55505      else
55506        dir="`$DIRNAME "$path"`"
55507        base="`$BASENAME "$path"`"
55508        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55509      fi
55510    fi
55511  fi
55512
55513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55514$as_echo_n "checking for $DLL_NAME... " >&6; }
55515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55516$as_echo "$MSVC_DLL" >&6; }
55517    else
55518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55519$as_echo "incorrect, ignoring" >&6; }
55520      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55521$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55522    fi
55523  fi
55524
55525  fi
55526
55527  if test "x$MSVC_DLL" = x; then
55528    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55529    if test "x$VS100COMNTOOLS" != x; then
55530      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55531
55532  windows_path="$CYGWIN_VS_TOOLS_DIR"
55533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55534    unix_path=`$CYGPATH -u "$windows_path"`
55535    CYGWIN_VS_TOOLS_DIR="$unix_path"
55536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55538    CYGWIN_VS_TOOLS_DIR="$unix_path"
55539  fi
55540
55541      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55542        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55543	    | $GREP -i /x64/ | $HEAD --lines 1`
55544      else
55545        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55546	    | $GREP -i /x86/ | $HEAD --lines 1`
55547      fi
55548
55549  DLL_NAME="$DLL_NAME"
55550  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55551  METHOD="search of VS100COMNTOOLS"
55552  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55554$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55555
55556    # Need to check if the found msvcr is correct architecture
55557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55558$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55559    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55561      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55562      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55563      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55564        CORRECT_MSVCR_ARCH="PE32 executable"
55565      else
55566        CORRECT_MSVCR_ARCH="PE32+ executable"
55567      fi
55568    else
55569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55570        CORRECT_MSVCR_ARCH=386
55571      else
55572        CORRECT_MSVCR_ARCH=x86-64
55573      fi
55574    fi
55575    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55577$as_echo "ok" >&6; }
55578      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55579
55580  # Only process if variable expands to non-empty
55581
55582  if test "x$MSVC_DLL" != x; then
55583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55584
55585  # Input might be given as Windows format, start by converting to
55586  # unix format.
55587  path="$MSVC_DLL"
55588  new_path=`$CYGPATH -u "$path"`
55589
55590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55593  # "foo.exe" is OK but "foo" is an error.
55594  #
55595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55596  # It is also a way to make sure we got the proper file name for the real test later on.
55597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55598  if test "x$test_shortpath" = x; then
55599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55600$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55601    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55602  fi
55603
55604  # Call helper function which possibly converts this using DOS-style short mode.
55605  # If so, the updated path is stored in $new_path.
55606
55607  input_path="$new_path"
55608  # Check if we need to convert this using DOS-style short mode. If the path
55609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55610  # take no chances and rewrite it.
55611  # Note: m4 eats our [], so we need to use [ and ] instead.
55612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55613  if test "x$has_forbidden_chars" != x; then
55614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55618      # Going to short mode and back again did indeed matter. Since short mode is
55619      # case insensitive, let's make it lowercase to improve readability.
55620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55621      # Now convert it back to Unix-style (cygpath)
55622      input_path=`$CYGPATH -u "$shortmode_path"`
55623      new_path="$input_path"
55624    fi
55625  fi
55626
55627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55628  if test "x$test_cygdrive_prefix" = x; then
55629    # As a simple fix, exclude /usr/bin since it's not a real path.
55630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55632      # a path prefixed by /cygdrive for fixpath to work.
55633      new_path="$CYGWIN_ROOT_PATH$input_path"
55634    fi
55635  fi
55636
55637
55638  if test "x$path" != "x$new_path"; then
55639    MSVC_DLL="$new_path"
55640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55641$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55642  fi
55643
55644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55645
55646  path="$MSVC_DLL"
55647  has_colon=`$ECHO $path | $GREP ^.:`
55648  new_path="$path"
55649  if test "x$has_colon" = x; then
55650    # Not in mixed or Windows style, start by that.
55651    new_path=`cmd //c echo $path`
55652  fi
55653
55654
55655  input_path="$new_path"
55656  # Check if we need to convert this using DOS-style short mode. If the path
55657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55658  # take no chances and rewrite it.
55659  # Note: m4 eats our [], so we need to use [ and ] instead.
55660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55661  if test "x$has_forbidden_chars" != x; then
55662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55664  fi
55665
55666
55667  windows_path="$new_path"
55668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55669    unix_path=`$CYGPATH -u "$windows_path"`
55670    new_path="$unix_path"
55671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55673    new_path="$unix_path"
55674  fi
55675
55676  if test "x$path" != "x$new_path"; then
55677    MSVC_DLL="$new_path"
55678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55679$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55680  fi
55681
55682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55684
55685    else
55686      # We're on a unix platform. Hooray! :)
55687      path="$MSVC_DLL"
55688      has_space=`$ECHO "$path" | $GREP " "`
55689      if test "x$has_space" != x; then
55690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55693      fi
55694
55695      # Use eval to expand a potential ~
55696      eval path="$path"
55697      if test ! -f "$path" && test ! -d "$path"; then
55698        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55699      fi
55700
55701      if test -d "$path"; then
55702        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55703      else
55704        dir="`$DIRNAME "$path"`"
55705        base="`$BASENAME "$path"`"
55706        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55707      fi
55708    fi
55709  fi
55710
55711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55712$as_echo_n "checking for $DLL_NAME... " >&6; }
55713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55714$as_echo "$MSVC_DLL" >&6; }
55715    else
55716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55717$as_echo "incorrect, ignoring" >&6; }
55718      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55719$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55720    fi
55721  fi
55722
55723    fi
55724  fi
55725
55726  if test "x$MSVC_DLL" = x; then
55727    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55728    # (This was the original behaviour; kept since it might turn something up)
55729    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55730      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55731        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55732	    | $GREP x64 | $HEAD --lines 1`
55733      else
55734        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55735	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55736        if test "x$POSSIBLE_MSVC_DLL" = x; then
55737          # We're grasping at straws now...
55738          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55739	      | $HEAD --lines 1`
55740        fi
55741      fi
55742
55743
55744  DLL_NAME="$DLL_NAME"
55745  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55746  METHOD="search of VCINSTALLDIR"
55747  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55748    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55749$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55750
55751    # Need to check if the found msvcr is correct architecture
55752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55753$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55754    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55756      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55757      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55758      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55759        CORRECT_MSVCR_ARCH="PE32 executable"
55760      else
55761        CORRECT_MSVCR_ARCH="PE32+ executable"
55762      fi
55763    else
55764      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55765        CORRECT_MSVCR_ARCH=386
55766      else
55767        CORRECT_MSVCR_ARCH=x86-64
55768      fi
55769    fi
55770    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55772$as_echo "ok" >&6; }
55773      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55774
55775  # Only process if variable expands to non-empty
55776
55777  if test "x$MSVC_DLL" != x; then
55778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55779
55780  # Input might be given as Windows format, start by converting to
55781  # unix format.
55782  path="$MSVC_DLL"
55783  new_path=`$CYGPATH -u "$path"`
55784
55785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55788  # "foo.exe" is OK but "foo" is an error.
55789  #
55790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55791  # It is also a way to make sure we got the proper file name for the real test later on.
55792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55793  if test "x$test_shortpath" = x; then
55794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55795$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55796    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55797  fi
55798
55799  # Call helper function which possibly converts this using DOS-style short mode.
55800  # If so, the updated path is stored in $new_path.
55801
55802  input_path="$new_path"
55803  # Check if we need to convert this using DOS-style short mode. If the path
55804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55805  # take no chances and rewrite it.
55806  # Note: m4 eats our [], so we need to use [ and ] instead.
55807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55808  if test "x$has_forbidden_chars" != x; then
55809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55813      # Going to short mode and back again did indeed matter. Since short mode is
55814      # case insensitive, let's make it lowercase to improve readability.
55815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55816      # Now convert it back to Unix-style (cygpath)
55817      input_path=`$CYGPATH -u "$shortmode_path"`
55818      new_path="$input_path"
55819    fi
55820  fi
55821
55822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55823  if test "x$test_cygdrive_prefix" = x; then
55824    # As a simple fix, exclude /usr/bin since it's not a real path.
55825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55827      # a path prefixed by /cygdrive for fixpath to work.
55828      new_path="$CYGWIN_ROOT_PATH$input_path"
55829    fi
55830  fi
55831
55832
55833  if test "x$path" != "x$new_path"; then
55834    MSVC_DLL="$new_path"
55835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55836$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55837  fi
55838
55839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55840
55841  path="$MSVC_DLL"
55842  has_colon=`$ECHO $path | $GREP ^.:`
55843  new_path="$path"
55844  if test "x$has_colon" = x; then
55845    # Not in mixed or Windows style, start by that.
55846    new_path=`cmd //c echo $path`
55847  fi
55848
55849
55850  input_path="$new_path"
55851  # Check if we need to convert this using DOS-style short mode. If the path
55852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55853  # take no chances and rewrite it.
55854  # Note: m4 eats our [], so we need to use [ and ] instead.
55855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55856  if test "x$has_forbidden_chars" != x; then
55857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55859  fi
55860
55861
55862  windows_path="$new_path"
55863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55864    unix_path=`$CYGPATH -u "$windows_path"`
55865    new_path="$unix_path"
55866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55868    new_path="$unix_path"
55869  fi
55870
55871  if test "x$path" != "x$new_path"; then
55872    MSVC_DLL="$new_path"
55873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55874$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55875  fi
55876
55877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55879
55880    else
55881      # We're on a unix platform. Hooray! :)
55882      path="$MSVC_DLL"
55883      has_space=`$ECHO "$path" | $GREP " "`
55884      if test "x$has_space" != x; then
55885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55886$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55887        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55888      fi
55889
55890      # Use eval to expand a potential ~
55891      eval path="$path"
55892      if test ! -f "$path" && test ! -d "$path"; then
55893        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55894      fi
55895
55896      if test -d "$path"; then
55897        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55898      else
55899        dir="`$DIRNAME "$path"`"
55900        base="`$BASENAME "$path"`"
55901        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55902      fi
55903    fi
55904  fi
55905
55906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55907$as_echo_n "checking for $DLL_NAME... " >&6; }
55908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55909$as_echo "$MSVC_DLL" >&6; }
55910    else
55911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55912$as_echo "incorrect, ignoring" >&6; }
55913      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55914$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55915    fi
55916  fi
55917
55918    fi
55919  fi
55920
55921  if test "x$MSVC_DLL" = x; then
55922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55923$as_echo_n "checking for $DLL_NAME... " >&6; }
55924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55925$as_echo "no" >&6; }
55926    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55927  fi
55928
55929      MSVCP_DLL="$MSVC_DLL"
55930    fi
55931
55932  fi
55933
55934  fi
55935
55936
55937  if test "x$NEEDS_LIB_X11" = xfalse; then
55938    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55939      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55940$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55941    fi
55942    X_CFLAGS=
55943    X_LIBS=
55944  else
55945
55946    if test "x${with_x}" = xno; then
55947      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55948    fi
55949
55950    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55951      # The user has specified a X11 base directory. Use it for includes and
55952      # libraries, unless explicitly overridden.
55953      if test "x$x_includes" = xNONE; then
55954        x_includes="${with_x}/include"
55955      fi
55956      if test "x$x_libraries" = xNONE; then
55957        x_libraries="${with_x}/lib"
55958      fi
55959    else
55960      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55961      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55962      # --x-libraries for the sysroot, if that seems to be correct.
55963      if test "x$SYSROOT" != "x"; then
55964        if test "x$x_includes" = xNONE; then
55965          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55966            x_includes="$SYSROOT/usr/X11R6/include"
55967          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55968            x_includes="$SYSROOT/usr/include"
55969          fi
55970        fi
55971        if test "x$x_libraries" = xNONE; then
55972          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55973            x_libraries="$SYSROOT/usr/X11R6/lib"
55974          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55975            x_libraries="$SYSROOT/usr/lib64"
55976          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55977            x_libraries="$SYSROOT/usr/lib"
55978          fi
55979        fi
55980      fi
55981    fi
55982
55983    # Now let autoconf do it's magic
55984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55985$as_echo_n "checking for X... " >&6; }
55986
55987
55988# Check whether --with-x was given.
55989if test "${with_x+set}" = set; then :
55990  withval=$with_x;
55991fi
55992
55993# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55994if test "x$with_x" = xno; then
55995  # The user explicitly disabled X.
55996  have_x=disabled
55997else
55998  case $x_includes,$x_libraries in #(
55999    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56000    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56001  $as_echo_n "(cached) " >&6
56002else
56003  # One or both of the vars are not set, and there is no cached value.
56004ac_x_includes=no ac_x_libraries=no
56005rm -f -r conftest.dir
56006if mkdir conftest.dir; then
56007  cd conftest.dir
56008  cat >Imakefile <<'_ACEOF'
56009incroot:
56010	@echo incroot='${INCROOT}'
56011usrlibdir:
56012	@echo usrlibdir='${USRLIBDIR}'
56013libdir:
56014	@echo libdir='${LIBDIR}'
56015_ACEOF
56016  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56017    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56018    for ac_var in incroot usrlibdir libdir; do
56019      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56020    done
56021    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56022    for ac_extension in a so sl dylib la dll; do
56023      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56024	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56025	ac_im_usrlibdir=$ac_im_libdir; break
56026      fi
56027    done
56028    # Screen out bogus values from the imake configuration.  They are
56029    # bogus both because they are the default anyway, and because
56030    # using them would break gcc on systems where it needs fixed includes.
56031    case $ac_im_incroot in
56032	/usr/include) ac_x_includes= ;;
56033	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56034    esac
56035    case $ac_im_usrlibdir in
56036	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56037	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56038    esac
56039  fi
56040  cd ..
56041  rm -f -r conftest.dir
56042fi
56043
56044# Standard set of common directories for X headers.
56045# Check X11 before X11Rn because it is often a symlink to the current release.
56046ac_x_header_dirs='
56047/usr/X11/include
56048/usr/X11R7/include
56049/usr/X11R6/include
56050/usr/X11R5/include
56051/usr/X11R4/include
56052
56053/usr/include/X11
56054/usr/include/X11R7
56055/usr/include/X11R6
56056/usr/include/X11R5
56057/usr/include/X11R4
56058
56059/usr/local/X11/include
56060/usr/local/X11R7/include
56061/usr/local/X11R6/include
56062/usr/local/X11R5/include
56063/usr/local/X11R4/include
56064
56065/usr/local/include/X11
56066/usr/local/include/X11R7
56067/usr/local/include/X11R6
56068/usr/local/include/X11R5
56069/usr/local/include/X11R4
56070
56071/usr/X386/include
56072/usr/x386/include
56073/usr/XFree86/include/X11
56074
56075/usr/include
56076/usr/local/include
56077/usr/unsupported/include
56078/usr/athena/include
56079/usr/local/x11r5/include
56080/usr/lpp/Xamples/include
56081
56082/usr/openwin/include
56083/usr/openwin/share/include'
56084
56085if test "$ac_x_includes" = no; then
56086  # Guess where to find include files, by looking for Xlib.h.
56087  # First, try using that file with no special directory specified.
56088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56089/* end confdefs.h.  */
56090#include <X11/Xlib.h>
56091_ACEOF
56092if ac_fn_cxx_try_cpp "$LINENO"; then :
56093  # We can compile using X headers with no special include directory.
56094ac_x_includes=
56095else
56096  for ac_dir in $ac_x_header_dirs; do
56097  if test -r "$ac_dir/X11/Xlib.h"; then
56098    ac_x_includes=$ac_dir
56099    break
56100  fi
56101done
56102fi
56103rm -f conftest.err conftest.i conftest.$ac_ext
56104fi # $ac_x_includes = no
56105
56106if test "$ac_x_libraries" = no; then
56107  # Check for the libraries.
56108  # See if we find them without any special options.
56109  # Don't add to $LIBS permanently.
56110  ac_save_LIBS=$LIBS
56111  LIBS="-lX11 $LIBS"
56112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56113/* end confdefs.h.  */
56114#include <X11/Xlib.h>
56115int
56116main ()
56117{
56118XrmInitialize ()
56119  ;
56120  return 0;
56121}
56122_ACEOF
56123if ac_fn_cxx_try_link "$LINENO"; then :
56124  LIBS=$ac_save_LIBS
56125# We can link X programs with no special library path.
56126ac_x_libraries=
56127else
56128  LIBS=$ac_save_LIBS
56129for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56130do
56131  # Don't even attempt the hair of trying to link an X program!
56132  for ac_extension in a so sl dylib la dll; do
56133    if test -r "$ac_dir/libX11.$ac_extension"; then
56134      ac_x_libraries=$ac_dir
56135      break 2
56136    fi
56137  done
56138done
56139fi
56140rm -f core conftest.err conftest.$ac_objext \
56141    conftest$ac_exeext conftest.$ac_ext
56142fi # $ac_x_libraries = no
56143
56144case $ac_x_includes,$ac_x_libraries in #(
56145  no,* | *,no | *\'*)
56146    # Didn't find X, or a directory has "'" in its name.
56147    ac_cv_have_x="have_x=no";; #(
56148  *)
56149    # Record where we found X for the cache.
56150    ac_cv_have_x="have_x=yes\
56151	ac_x_includes='$ac_x_includes'\
56152	ac_x_libraries='$ac_x_libraries'"
56153esac
56154fi
56155;; #(
56156    *) have_x=yes;;
56157  esac
56158  eval "$ac_cv_have_x"
56159fi # $with_x != no
56160
56161if test "$have_x" != yes; then
56162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56163$as_echo "$have_x" >&6; }
56164  no_x=yes
56165else
56166  # If each of the values was on the command line, it overrides each guess.
56167  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56168  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56169  # Update the cache value to reflect the command line values.
56170  ac_cv_have_x="have_x=yes\
56171	ac_x_includes='$x_includes'\
56172	ac_x_libraries='$x_libraries'"
56173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56174$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56175fi
56176
56177    if test "$no_x" = yes; then
56178  # Not all programs may use this symbol, but it does not hurt to define it.
56179
56180$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56181
56182  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56183else
56184  if test -n "$x_includes"; then
56185    X_CFLAGS="$X_CFLAGS -I$x_includes"
56186  fi
56187
56188  # It would also be nice to do this for all -L options, not just this one.
56189  if test -n "$x_libraries"; then
56190    X_LIBS="$X_LIBS -L$x_libraries"
56191    # For Solaris; some versions of Sun CC require a space after -R and
56192    # others require no space.  Words are not sufficient . . . .
56193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56194$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56195    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56196    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56197    ac_cxx_werror_flag=yes
56198    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56199/* end confdefs.h.  */
56200
56201int
56202main ()
56203{
56204
56205  ;
56206  return 0;
56207}
56208_ACEOF
56209if ac_fn_cxx_try_link "$LINENO"; then :
56210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56211$as_echo "no" >&6; }
56212       X_LIBS="$X_LIBS -R$x_libraries"
56213else
56214  LIBS="$ac_xsave_LIBS -R $x_libraries"
56215       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56216/* end confdefs.h.  */
56217
56218int
56219main ()
56220{
56221
56222  ;
56223  return 0;
56224}
56225_ACEOF
56226if ac_fn_cxx_try_link "$LINENO"; then :
56227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56228$as_echo "yes" >&6; }
56229	  X_LIBS="$X_LIBS -R $x_libraries"
56230else
56231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56232$as_echo "neither works" >&6; }
56233fi
56234rm -f core conftest.err conftest.$ac_objext \
56235    conftest$ac_exeext conftest.$ac_ext
56236fi
56237rm -f core conftest.err conftest.$ac_objext \
56238    conftest$ac_exeext conftest.$ac_ext
56239    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56240    LIBS=$ac_xsave_LIBS
56241  fi
56242
56243  # Check for system-dependent libraries X programs must link with.
56244  # Do this before checking for the system-independent R6 libraries
56245  # (-lICE), since we may need -lsocket or whatever for X linking.
56246
56247  if test "$ISC" = yes; then
56248    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56249  else
56250    # Martyn Johnson says this is needed for Ultrix, if the X
56251    # libraries were built with DECnet support.  And Karl Berry says
56252    # the Alpha needs dnet_stub (dnet does not exist).
56253    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56254    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56255/* end confdefs.h.  */
56256
56257/* Override any GCC internal prototype to avoid an error.
56258   Use char because int might match the return type of a GCC
56259   builtin and then its argument prototype would still apply.  */
56260#ifdef __cplusplus
56261extern "C"
56262#endif
56263char XOpenDisplay ();
56264int
56265main ()
56266{
56267return XOpenDisplay ();
56268  ;
56269  return 0;
56270}
56271_ACEOF
56272if ac_fn_cxx_try_link "$LINENO"; then :
56273
56274else
56275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56276$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56277if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56278  $as_echo_n "(cached) " >&6
56279else
56280  ac_check_lib_save_LIBS=$LIBS
56281LIBS="-ldnet  $LIBS"
56282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56283/* end confdefs.h.  */
56284
56285/* Override any GCC internal prototype to avoid an error.
56286   Use char because int might match the return type of a GCC
56287   builtin and then its argument prototype would still apply.  */
56288#ifdef __cplusplus
56289extern "C"
56290#endif
56291char dnet_ntoa ();
56292int
56293main ()
56294{
56295return dnet_ntoa ();
56296  ;
56297  return 0;
56298}
56299_ACEOF
56300if ac_fn_cxx_try_link "$LINENO"; then :
56301  ac_cv_lib_dnet_dnet_ntoa=yes
56302else
56303  ac_cv_lib_dnet_dnet_ntoa=no
56304fi
56305rm -f core conftest.err conftest.$ac_objext \
56306    conftest$ac_exeext conftest.$ac_ext
56307LIBS=$ac_check_lib_save_LIBS
56308fi
56309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56310$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56311if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56312  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56313fi
56314
56315    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56317$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56318if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56319  $as_echo_n "(cached) " >&6
56320else
56321  ac_check_lib_save_LIBS=$LIBS
56322LIBS="-ldnet_stub  $LIBS"
56323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56324/* end confdefs.h.  */
56325
56326/* Override any GCC internal prototype to avoid an error.
56327   Use char because int might match the return type of a GCC
56328   builtin and then its argument prototype would still apply.  */
56329#ifdef __cplusplus
56330extern "C"
56331#endif
56332char dnet_ntoa ();
56333int
56334main ()
56335{
56336return dnet_ntoa ();
56337  ;
56338  return 0;
56339}
56340_ACEOF
56341if ac_fn_cxx_try_link "$LINENO"; then :
56342  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56343else
56344  ac_cv_lib_dnet_stub_dnet_ntoa=no
56345fi
56346rm -f core conftest.err conftest.$ac_objext \
56347    conftest$ac_exeext conftest.$ac_ext
56348LIBS=$ac_check_lib_save_LIBS
56349fi
56350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56351$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56352if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56353  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56354fi
56355
56356    fi
56357fi
56358rm -f core conftest.err conftest.$ac_objext \
56359    conftest$ac_exeext conftest.$ac_ext
56360    LIBS="$ac_xsave_LIBS"
56361
56362    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56363    # to get the SysV transport functions.
56364    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56365    # needs -lnsl.
56366    # The nsl library prevents programs from opening the X display
56367    # on Irix 5.2, according to T.E. Dickey.
56368    # The functions gethostbyname, getservbyname, and inet_addr are
56369    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56370    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56371if test "x$ac_cv_func_gethostbyname" = xyes; then :
56372
56373fi
56374
56375    if test $ac_cv_func_gethostbyname = no; then
56376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56377$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56378if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56379  $as_echo_n "(cached) " >&6
56380else
56381  ac_check_lib_save_LIBS=$LIBS
56382LIBS="-lnsl  $LIBS"
56383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56384/* end confdefs.h.  */
56385
56386/* Override any GCC internal prototype to avoid an error.
56387   Use char because int might match the return type of a GCC
56388   builtin and then its argument prototype would still apply.  */
56389#ifdef __cplusplus
56390extern "C"
56391#endif
56392char gethostbyname ();
56393int
56394main ()
56395{
56396return gethostbyname ();
56397  ;
56398  return 0;
56399}
56400_ACEOF
56401if ac_fn_cxx_try_link "$LINENO"; then :
56402  ac_cv_lib_nsl_gethostbyname=yes
56403else
56404  ac_cv_lib_nsl_gethostbyname=no
56405fi
56406rm -f core conftest.err conftest.$ac_objext \
56407    conftest$ac_exeext conftest.$ac_ext
56408LIBS=$ac_check_lib_save_LIBS
56409fi
56410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56411$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56412if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56413  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56414fi
56415
56416      if test $ac_cv_lib_nsl_gethostbyname = no; then
56417	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56418$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56419if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56420  $as_echo_n "(cached) " >&6
56421else
56422  ac_check_lib_save_LIBS=$LIBS
56423LIBS="-lbsd  $LIBS"
56424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56425/* end confdefs.h.  */
56426
56427/* Override any GCC internal prototype to avoid an error.
56428   Use char because int might match the return type of a GCC
56429   builtin and then its argument prototype would still apply.  */
56430#ifdef __cplusplus
56431extern "C"
56432#endif
56433char gethostbyname ();
56434int
56435main ()
56436{
56437return gethostbyname ();
56438  ;
56439  return 0;
56440}
56441_ACEOF
56442if ac_fn_cxx_try_link "$LINENO"; then :
56443  ac_cv_lib_bsd_gethostbyname=yes
56444else
56445  ac_cv_lib_bsd_gethostbyname=no
56446fi
56447rm -f core conftest.err conftest.$ac_objext \
56448    conftest$ac_exeext conftest.$ac_ext
56449LIBS=$ac_check_lib_save_LIBS
56450fi
56451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56452$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56453if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56454  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56455fi
56456
56457      fi
56458    fi
56459
56460    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56461    # socket/setsockopt and other routines are undefined under SCO ODT
56462    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56463    # on later versions), says Simon Leinen: it contains gethostby*
56464    # variants that don't use the name server (or something).  -lsocket
56465    # must be given before -lnsl if both are needed.  We assume that
56466    # if connect needs -lnsl, so does gethostbyname.
56467    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56468if test "x$ac_cv_func_connect" = xyes; then :
56469
56470fi
56471
56472    if test $ac_cv_func_connect = no; then
56473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56474$as_echo_n "checking for connect in -lsocket... " >&6; }
56475if ${ac_cv_lib_socket_connect+:} false; then :
56476  $as_echo_n "(cached) " >&6
56477else
56478  ac_check_lib_save_LIBS=$LIBS
56479LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56481/* end confdefs.h.  */
56482
56483/* Override any GCC internal prototype to avoid an error.
56484   Use char because int might match the return type of a GCC
56485   builtin and then its argument prototype would still apply.  */
56486#ifdef __cplusplus
56487extern "C"
56488#endif
56489char connect ();
56490int
56491main ()
56492{
56493return connect ();
56494  ;
56495  return 0;
56496}
56497_ACEOF
56498if ac_fn_cxx_try_link "$LINENO"; then :
56499  ac_cv_lib_socket_connect=yes
56500else
56501  ac_cv_lib_socket_connect=no
56502fi
56503rm -f core conftest.err conftest.$ac_objext \
56504    conftest$ac_exeext conftest.$ac_ext
56505LIBS=$ac_check_lib_save_LIBS
56506fi
56507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56508$as_echo "$ac_cv_lib_socket_connect" >&6; }
56509if test "x$ac_cv_lib_socket_connect" = xyes; then :
56510  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56511fi
56512
56513    fi
56514
56515    # Guillermo Gomez says -lposix is necessary on A/UX.
56516    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56517if test "x$ac_cv_func_remove" = xyes; then :
56518
56519fi
56520
56521    if test $ac_cv_func_remove = no; then
56522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56523$as_echo_n "checking for remove in -lposix... " >&6; }
56524if ${ac_cv_lib_posix_remove+:} false; then :
56525  $as_echo_n "(cached) " >&6
56526else
56527  ac_check_lib_save_LIBS=$LIBS
56528LIBS="-lposix  $LIBS"
56529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56530/* end confdefs.h.  */
56531
56532/* Override any GCC internal prototype to avoid an error.
56533   Use char because int might match the return type of a GCC
56534   builtin and then its argument prototype would still apply.  */
56535#ifdef __cplusplus
56536extern "C"
56537#endif
56538char remove ();
56539int
56540main ()
56541{
56542return remove ();
56543  ;
56544  return 0;
56545}
56546_ACEOF
56547if ac_fn_cxx_try_link "$LINENO"; then :
56548  ac_cv_lib_posix_remove=yes
56549else
56550  ac_cv_lib_posix_remove=no
56551fi
56552rm -f core conftest.err conftest.$ac_objext \
56553    conftest$ac_exeext conftest.$ac_ext
56554LIBS=$ac_check_lib_save_LIBS
56555fi
56556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56557$as_echo "$ac_cv_lib_posix_remove" >&6; }
56558if test "x$ac_cv_lib_posix_remove" = xyes; then :
56559  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56560fi
56561
56562    fi
56563
56564    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56565    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56566if test "x$ac_cv_func_shmat" = xyes; then :
56567
56568fi
56569
56570    if test $ac_cv_func_shmat = no; then
56571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56572$as_echo_n "checking for shmat in -lipc... " >&6; }
56573if ${ac_cv_lib_ipc_shmat+:} false; then :
56574  $as_echo_n "(cached) " >&6
56575else
56576  ac_check_lib_save_LIBS=$LIBS
56577LIBS="-lipc  $LIBS"
56578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56579/* end confdefs.h.  */
56580
56581/* Override any GCC internal prototype to avoid an error.
56582   Use char because int might match the return type of a GCC
56583   builtin and then its argument prototype would still apply.  */
56584#ifdef __cplusplus
56585extern "C"
56586#endif
56587char shmat ();
56588int
56589main ()
56590{
56591return shmat ();
56592  ;
56593  return 0;
56594}
56595_ACEOF
56596if ac_fn_cxx_try_link "$LINENO"; then :
56597  ac_cv_lib_ipc_shmat=yes
56598else
56599  ac_cv_lib_ipc_shmat=no
56600fi
56601rm -f core conftest.err conftest.$ac_objext \
56602    conftest$ac_exeext conftest.$ac_ext
56603LIBS=$ac_check_lib_save_LIBS
56604fi
56605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56606$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56607if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56608  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56609fi
56610
56611    fi
56612  fi
56613
56614  # Check for libraries that X11R6 Xt/Xaw programs need.
56615  ac_save_LDFLAGS=$LDFLAGS
56616  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56617  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56618  # check for ICE first), but we must link in the order -lSM -lICE or
56619  # we get undefined symbols.  So assume we have SM if we have ICE.
56620  # These have to be linked with before -lX11, unlike the other
56621  # libraries we check for below, so use a different variable.
56622  # John Interrante, Karl Berry
56623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56624$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56625if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56626  $as_echo_n "(cached) " >&6
56627else
56628  ac_check_lib_save_LIBS=$LIBS
56629LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56631/* end confdefs.h.  */
56632
56633/* Override any GCC internal prototype to avoid an error.
56634   Use char because int might match the return type of a GCC
56635   builtin and then its argument prototype would still apply.  */
56636#ifdef __cplusplus
56637extern "C"
56638#endif
56639char IceConnectionNumber ();
56640int
56641main ()
56642{
56643return IceConnectionNumber ();
56644  ;
56645  return 0;
56646}
56647_ACEOF
56648if ac_fn_cxx_try_link "$LINENO"; then :
56649  ac_cv_lib_ICE_IceConnectionNumber=yes
56650else
56651  ac_cv_lib_ICE_IceConnectionNumber=no
56652fi
56653rm -f core conftest.err conftest.$ac_objext \
56654    conftest$ac_exeext conftest.$ac_ext
56655LIBS=$ac_check_lib_save_LIBS
56656fi
56657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56658$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56659if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56660  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56661fi
56662
56663  LDFLAGS=$ac_save_LDFLAGS
56664
56665fi
56666
56667
56668    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56669    # this doesn't make sense so we remove it.
56670    if test "x$COMPILE_TYPE" = xcross; then
56671      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56672    fi
56673
56674    if test "x$no_x" = xyes; then
56675
56676  # Print a helpful message on how to acquire the necessary build dependency.
56677  # x11 is the help tag: freetype, cups, alsa etc
56678  MISSING_DEPENDENCY=x11
56679
56680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56681    cygwin_help $MISSING_DEPENDENCY
56682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56683    msys_help $MISSING_DEPENDENCY
56684  else
56685    PKGHANDLER_COMMAND=
56686
56687    case $PKGHANDLER in
56688      apt-get)
56689        apt_help     $MISSING_DEPENDENCY ;;
56690      yum)
56691        yum_help     $MISSING_DEPENDENCY ;;
56692      brew)
56693        brew_help    $MISSING_DEPENDENCY ;;
56694      port)
56695        port_help    $MISSING_DEPENDENCY ;;
56696      pkgutil)
56697        pkgutil_help $MISSING_DEPENDENCY ;;
56698      pkgadd)
56699        pkgadd_help  $MISSING_DEPENDENCY ;;
56700    esac
56701
56702    if test "x$PKGHANDLER_COMMAND" != x; then
56703      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56704    fi
56705  fi
56706
56707      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56708    fi
56709
56710    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56711      OPENWIN_HOME="/usr/openwin"
56712      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56713      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56714          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56715    fi
56716
56717    ac_ext=c
56718ac_cpp='$CPP $CPPFLAGS'
56719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56721ac_compiler_gnu=$ac_cv_c_compiler_gnu
56722
56723    OLD_CFLAGS="$CFLAGS"
56724    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56725
56726    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56727    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56728do :
56729  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56730ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56731          # include <X11/Xlib.h>
56732          # include <X11/Xutil.h>
56733
56734
56735"
56736if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56737  cat >>confdefs.h <<_ACEOF
56738#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56739_ACEOF
56740 X11_HEADERS_OK=yes
56741else
56742  X11_HEADERS_OK=no; break
56743fi
56744
56745done
56746
56747
56748    if test "x$X11_HEADERS_OK" = xno; then
56749
56750  # Print a helpful message on how to acquire the necessary build dependency.
56751  # x11 is the help tag: freetype, cups, alsa etc
56752  MISSING_DEPENDENCY=x11
56753
56754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56755    cygwin_help $MISSING_DEPENDENCY
56756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56757    msys_help $MISSING_DEPENDENCY
56758  else
56759    PKGHANDLER_COMMAND=
56760
56761    case $PKGHANDLER in
56762      apt-get)
56763        apt_help     $MISSING_DEPENDENCY ;;
56764      yum)
56765        yum_help     $MISSING_DEPENDENCY ;;
56766      brew)
56767        brew_help    $MISSING_DEPENDENCY ;;
56768      port)
56769        port_help    $MISSING_DEPENDENCY ;;
56770      pkgutil)
56771        pkgutil_help $MISSING_DEPENDENCY ;;
56772      pkgadd)
56773        pkgadd_help  $MISSING_DEPENDENCY ;;
56774    esac
56775
56776    if test "x$PKGHANDLER_COMMAND" != x; then
56777      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56778    fi
56779  fi
56780
56781      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56782    fi
56783
56784    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56785    # defined in libawt_xawt.
56786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56787$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56789/* end confdefs.h.  */
56790#include <X11/extensions/Xrender.h>
56791int
56792main ()
56793{
56794XLinearGradient x;
56795  ;
56796  return 0;
56797}
56798_ACEOF
56799if ac_fn_c_try_compile "$LINENO"; then :
56800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56801$as_echo "yes" >&6; }
56802else
56803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56804$as_echo "no" >&6; }
56805         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56806fi
56807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56808
56809    CFLAGS="$OLD_CFLAGS"
56810    ac_ext=cpp
56811ac_cpp='$CXXCPP $CPPFLAGS'
56812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56815
56816  fi # NEEDS_LIB_X11
56817
56818
56819
56820
56821
56822
56823# Check whether --with-cups was given.
56824if test "${with_cups+set}" = set; then :
56825  withval=$with_cups;
56826fi
56827
56828
56829# Check whether --with-cups-include was given.
56830if test "${with_cups_include+set}" = set; then :
56831  withval=$with_cups_include;
56832fi
56833
56834
56835  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56836    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56837        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56838      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56839$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56840    fi
56841    CUPS_CFLAGS=
56842  else
56843    CUPS_FOUND=no
56844
56845    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56846      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56847    fi
56848
56849    if test "x${with_cups}" != x; then
56850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56851$as_echo_n "checking for cups headers... " >&6; }
56852      if test -s "${with_cups}/include/cups/cups.h"; then
56853        CUPS_CFLAGS="-I${with_cups}/include"
56854        CUPS_FOUND=yes
56855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56856$as_echo "$CUPS_FOUND" >&6; }
56857      else
56858        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56859      fi
56860    fi
56861    if test "x${with_cups_include}" != x; then
56862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56863$as_echo_n "checking for cups headers... " >&6; }
56864      if test -s "${with_cups_include}/cups/cups.h"; then
56865        CUPS_CFLAGS="-I${with_cups_include}"
56866        CUPS_FOUND=yes
56867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56868$as_echo "$CUPS_FOUND" >&6; }
56869      else
56870        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56871      fi
56872    fi
56873    if test "x$CUPS_FOUND" = xno; then
56874      # Are the cups headers installed in the default /usr/include location?
56875      for ac_header in cups/cups.h cups/ppd.h
56876do :
56877  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56878ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56880  cat >>confdefs.h <<_ACEOF
56881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56882_ACEOF
56883
56884          CUPS_FOUND=yes
56885          CUPS_CFLAGS=
56886          DEFAULT_CUPS=yes
56887
56888fi
56889
56890done
56891
56892    fi
56893    if test "x$CUPS_FOUND" = xno; then
56894
56895  # Print a helpful message on how to acquire the necessary build dependency.
56896  # cups is the help tag: freetype, cups, alsa etc
56897  MISSING_DEPENDENCY=cups
56898
56899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56900    cygwin_help $MISSING_DEPENDENCY
56901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56902    msys_help $MISSING_DEPENDENCY
56903  else
56904    PKGHANDLER_COMMAND=
56905
56906    case $PKGHANDLER in
56907      apt-get)
56908        apt_help     $MISSING_DEPENDENCY ;;
56909      yum)
56910        yum_help     $MISSING_DEPENDENCY ;;
56911      brew)
56912        brew_help    $MISSING_DEPENDENCY ;;
56913      port)
56914        port_help    $MISSING_DEPENDENCY ;;
56915      pkgutil)
56916        pkgutil_help $MISSING_DEPENDENCY ;;
56917      pkgadd)
56918        pkgadd_help  $MISSING_DEPENDENCY ;;
56919    esac
56920
56921    if test "x$PKGHANDLER_COMMAND" != x; then
56922      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56923    fi
56924  fi
56925
56926      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56927    fi
56928  fi
56929
56930
56931
56932
56933
56934# Check whether --with-freetype was given.
56935if test "${with_freetype+set}" = set; then :
56936  withval=$with_freetype;
56937fi
56938
56939
56940# Check whether --with-freetype-include was given.
56941if test "${with_freetype_include+set}" = set; then :
56942  withval=$with_freetype_include;
56943fi
56944
56945
56946# Check whether --with-freetype-lib was given.
56947if test "${with_freetype_lib+set}" = set; then :
56948  withval=$with_freetype_lib;
56949fi
56950
56951
56952# Check whether --with-freetype-src was given.
56953if test "${with_freetype_src+set}" = set; then :
56954  withval=$with_freetype_src;
56955fi
56956
56957  # Check whether --enable-freetype-bundling was given.
56958if test "${enable_freetype_bundling+set}" = set; then :
56959  enableval=$enable_freetype_bundling;
56960fi
56961
56962
56963  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56964  FREETYPE_BASE_NAME=freetype
56965  FREETYPE_CFLAGS=
56966  FREETYPE_LIBS=
56967  FREETYPE_BUNDLE_LIB_PATH=
56968
56969  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56970    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56971        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56972        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56973        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56974      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56975$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56976    fi
56977    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56978      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56979$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56980    fi
56981  else
56982    # freetype is needed to build; go get it!
56983
56984    BUNDLE_FREETYPE="$enable_freetype_bundling"
56985
56986    if  test "x$with_freetype_src" != x; then
56987      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56988        # Try to build freetype if --with-freetype-src was given on Windows
56989
56990  FREETYPE_SRC_PATH="$with_freetype_src"
56991  BUILD_FREETYPE=yes
56992
56993  # Check if the freetype sources are acessible..
56994  if ! test -d $FREETYPE_SRC_PATH; then
56995    { $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
56996$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56997    BUILD_FREETYPE=no
56998  fi
56999  # ..and contain a vc2010 project file
57000  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57001  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57002    { $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
57003$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57004    BUILD_FREETYPE=no
57005  fi
57006  # Now check if configure found a version of 'msbuild.exe'
57007  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57008    { $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
57009$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;}
57010    BUILD_FREETYPE=no
57011  fi
57012
57013  # Ready to go..
57014  if test "x$BUILD_FREETYPE" = xyes; then
57015    # msbuild requires trailing slashes for output directories
57016    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57017    freetype_lib_path_unix="$freetype_lib_path"
57018    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57019
57020  unix_path="$vcxproj_path"
57021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57022    windows_path=`$CYGPATH -m "$unix_path"`
57023    vcxproj_path="$windows_path"
57024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57025    windows_path=`cmd //c echo $unix_path`
57026    vcxproj_path="$windows_path"
57027  fi
57028
57029
57030  unix_path="$freetype_lib_path"
57031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57032    windows_path=`$CYGPATH -m "$unix_path"`
57033    freetype_lib_path="$windows_path"
57034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57035    windows_path=`cmd //c echo $unix_path`
57036    freetype_lib_path="$windows_path"
57037  fi
57038
57039
57040  unix_path="$freetype_obj_path"
57041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57042    windows_path=`$CYGPATH -m "$unix_path"`
57043    freetype_obj_path="$windows_path"
57044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57045    windows_path=`cmd //c echo $unix_path`
57046    freetype_obj_path="$windows_path"
57047  fi
57048
57049    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57050      freetype_platform=x64
57051    else
57052      freetype_platform=win32
57053    fi
57054
57055    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57056    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57057    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57058    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57059    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57060$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57061
57062    # First we try to build the freetype.dll
57063    $ECHO -e "@echo off\n"\
57064        "$MSBUILD $vcxproj_path "\
57065        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57066        "/p:Configuration=\"Release Multithreaded\" "\
57067        "/p:Platform=$freetype_platform "\
57068        "/p:ConfigurationType=DynamicLibrary "\
57069        "/p:TargetName=freetype "\
57070        "/p:OutDir=\"$freetype_lib_path\" "\
57071        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57072    cmd /c freetype.bat
57073
57074    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57075      # If that succeeds we also build freetype.lib
57076      $ECHO -e "@echo off\n"\
57077          "$MSBUILD $vcxproj_path "\
57078          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57079          "/p:Configuration=\"Release Multithreaded\" "\
57080          "/p:Platform=$freetype_platform "\
57081          "/p:ConfigurationType=StaticLibrary "\
57082          "/p:TargetName=freetype "\
57083          "/p:OutDir=\"$freetype_lib_path\" "\
57084          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57085      cmd /c freetype.bat
57086
57087      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57088        # Once we build both, lib and dll, set freetype lib and include path appropriately
57089        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57090        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57091        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57092$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57093      else
57094        BUILD_FREETYPE=no
57095      fi
57096    else
57097      BUILD_FREETYPE=no
57098    fi
57099  fi
57100
57101        if test "x$BUILD_FREETYPE" = xyes; then
57102          # Okay, we built it. Check that it works.
57103
57104  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57105  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57106  METHOD="--with-freetype-src"
57107
57108  # Let's start with an optimistic view of the world :-)
57109  FOUND_FREETYPE=yes
57110
57111  # First look for the canonical freetype main include file ft2build.h.
57112  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57113    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57114    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57115    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57116      # Fail.
57117      FOUND_FREETYPE=no
57118    fi
57119  fi
57120
57121  if test "x$FOUND_FREETYPE" = xyes; then
57122    # Include file found, let's continue the sanity check.
57123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57124$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57125
57126    # Reset to default value
57127    FREETYPE_BASE_NAME=freetype
57128    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57129    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57130      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57131          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57132        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57133        # for the .6 version explicitly.
57134        FREETYPE_BASE_NAME=freetype.6
57135        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57136        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57137$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57138      else
57139        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57140$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57141        FOUND_FREETYPE=no
57142      fi
57143    else
57144      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57145        # On Windows, we will need both .lib and .dll file.
57146        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57147          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57148$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57149          FOUND_FREETYPE=no
57150        fi
57151      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57153        # Found lib in isa dir, use that instead.
57154        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57155        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57156$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57157      fi
57158    fi
57159  fi
57160
57161  if test "x$FOUND_FREETYPE" = xyes; then
57162
57163  # Only process if variable expands to non-empty
57164
57165  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57167
57168  # Input might be given as Windows format, start by converting to
57169  # unix format.
57170  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57171  new_path=`$CYGPATH -u "$path"`
57172
57173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57176  # "foo.exe" is OK but "foo" is an error.
57177  #
57178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57179  # It is also a way to make sure we got the proper file name for the real test later on.
57180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57181  if test "x$test_shortpath" = x; then
57182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57184    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57185  fi
57186
57187  # Call helper function which possibly converts this using DOS-style short mode.
57188  # If so, the updated path is stored in $new_path.
57189
57190  input_path="$new_path"
57191  # Check if we need to convert this using DOS-style short mode. If the path
57192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57193  # take no chances and rewrite it.
57194  # Note: m4 eats our [], so we need to use [ and ] instead.
57195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57196  if test "x$has_forbidden_chars" != x; then
57197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57201      # Going to short mode and back again did indeed matter. Since short mode is
57202      # case insensitive, let's make it lowercase to improve readability.
57203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57204      # Now convert it back to Unix-style (cygpath)
57205      input_path=`$CYGPATH -u "$shortmode_path"`
57206      new_path="$input_path"
57207    fi
57208  fi
57209
57210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57211  if test "x$test_cygdrive_prefix" = x; then
57212    # As a simple fix, exclude /usr/bin since it's not a real path.
57213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57215      # a path prefixed by /cygdrive for fixpath to work.
57216      new_path="$CYGWIN_ROOT_PATH$input_path"
57217    fi
57218  fi
57219
57220
57221  if test "x$path" != "x$new_path"; then
57222    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57225  fi
57226
57227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57228
57229  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57230  has_colon=`$ECHO $path | $GREP ^.:`
57231  new_path="$path"
57232  if test "x$has_colon" = x; then
57233    # Not in mixed or Windows style, start by that.
57234    new_path=`cmd //c echo $path`
57235  fi
57236
57237
57238  input_path="$new_path"
57239  # Check if we need to convert this using DOS-style short mode. If the path
57240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57241  # take no chances and rewrite it.
57242  # Note: m4 eats our [], so we need to use [ and ] instead.
57243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57244  if test "x$has_forbidden_chars" != x; then
57245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57247  fi
57248
57249
57250  windows_path="$new_path"
57251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57252    unix_path=`$CYGPATH -u "$windows_path"`
57253    new_path="$unix_path"
57254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57256    new_path="$unix_path"
57257  fi
57258
57259  if test "x$path" != "x$new_path"; then
57260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57263  fi
57264
57265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57267
57268    else
57269      # We're on a unix platform. Hooray! :)
57270      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57271      has_space=`$ECHO "$path" | $GREP " "`
57272      if test "x$has_space" != x; then
57273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57276      fi
57277
57278      # Use eval to expand a potential ~
57279      eval path="$path"
57280      if test ! -f "$path" && test ! -d "$path"; then
57281        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57282      fi
57283
57284      if test -d "$path"; then
57285        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57286      else
57287        dir="`$DIRNAME "$path"`"
57288        base="`$BASENAME "$path"`"
57289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57290      fi
57291    fi
57292  fi
57293
57294
57295  # Only process if variable expands to non-empty
57296
57297  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57299
57300  # Input might be given as Windows format, start by converting to
57301  # unix format.
57302  path="$POTENTIAL_FREETYPE_LIB_PATH"
57303  new_path=`$CYGPATH -u "$path"`
57304
57305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57308  # "foo.exe" is OK but "foo" is an error.
57309  #
57310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57311  # It is also a way to make sure we got the proper file name for the real test later on.
57312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57313  if test "x$test_shortpath" = x; then
57314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57316    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57317  fi
57318
57319  # Call helper function which possibly converts this using DOS-style short mode.
57320  # If so, the updated path is stored in $new_path.
57321
57322  input_path="$new_path"
57323  # Check if we need to convert this using DOS-style short mode. If the path
57324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57325  # take no chances and rewrite it.
57326  # Note: m4 eats our [], so we need to use [ and ] instead.
57327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57328  if test "x$has_forbidden_chars" != x; then
57329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57333      # Going to short mode and back again did indeed matter. Since short mode is
57334      # case insensitive, let's make it lowercase to improve readability.
57335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57336      # Now convert it back to Unix-style (cygpath)
57337      input_path=`$CYGPATH -u "$shortmode_path"`
57338      new_path="$input_path"
57339    fi
57340  fi
57341
57342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57343  if test "x$test_cygdrive_prefix" = x; then
57344    # As a simple fix, exclude /usr/bin since it's not a real path.
57345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57347      # a path prefixed by /cygdrive for fixpath to work.
57348      new_path="$CYGWIN_ROOT_PATH$input_path"
57349    fi
57350  fi
57351
57352
57353  if test "x$path" != "x$new_path"; then
57354    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57357  fi
57358
57359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57360
57361  path="$POTENTIAL_FREETYPE_LIB_PATH"
57362  has_colon=`$ECHO $path | $GREP ^.:`
57363  new_path="$path"
57364  if test "x$has_colon" = x; then
57365    # Not in mixed or Windows style, start by that.
57366    new_path=`cmd //c echo $path`
57367  fi
57368
57369
57370  input_path="$new_path"
57371  # Check if we need to convert this using DOS-style short mode. If the path
57372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57373  # take no chances and rewrite it.
57374  # Note: m4 eats our [], so we need to use [ and ] instead.
57375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57376  if test "x$has_forbidden_chars" != x; then
57377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57379  fi
57380
57381
57382  windows_path="$new_path"
57383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57384    unix_path=`$CYGPATH -u "$windows_path"`
57385    new_path="$unix_path"
57386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57388    new_path="$unix_path"
57389  fi
57390
57391  if test "x$path" != "x$new_path"; then
57392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57395  fi
57396
57397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57399
57400    else
57401      # We're on a unix platform. Hooray! :)
57402      path="$POTENTIAL_FREETYPE_LIB_PATH"
57403      has_space=`$ECHO "$path" | $GREP " "`
57404      if test "x$has_space" != x; then
57405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57408      fi
57409
57410      # Use eval to expand a potential ~
57411      eval path="$path"
57412      if test ! -f "$path" && test ! -d "$path"; then
57413        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57414      fi
57415
57416      if test -d "$path"; then
57417        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57418      else
57419        dir="`$DIRNAME "$path"`"
57420        base="`$BASENAME "$path"`"
57421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57422      fi
57423    fi
57424  fi
57425
57426
57427    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57429$as_echo_n "checking for freetype includes... " >&6; }
57430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57431$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57432    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57434$as_echo_n "checking for freetype libraries... " >&6; }
57435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57436$as_echo "$FREETYPE_LIB_PATH" >&6; }
57437  fi
57438
57439          if test "x$FOUND_FREETYPE" != xyes; then
57440            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57441          fi
57442        else
57443          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57444$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57445          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57446        fi
57447      else
57448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57449$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57450      fi
57451    fi
57452
57453    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57454      # User has specified settings
57455
57456      if test "x$BUNDLE_FREETYPE" = x; then
57457        # If not specified, default is to bundle freetype
57458        BUNDLE_FREETYPE=yes
57459      fi
57460
57461      if test "x$with_freetype" != x; then
57462        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57463        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57464      fi
57465
57466      # Allow --with-freetype-lib and --with-freetype-include to override
57467      if test "x$with_freetype_include" != x; then
57468        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57469      fi
57470      if test "x$with_freetype_lib" != x; then
57471        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57472      fi
57473
57474      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57475        # Okay, we got it. Check that it works.
57476
57477  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57478  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57479  METHOD="--with-freetype"
57480
57481  # Let's start with an optimistic view of the world :-)
57482  FOUND_FREETYPE=yes
57483
57484  # First look for the canonical freetype main include file ft2build.h.
57485  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57486    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57487    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57488    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57489      # Fail.
57490      FOUND_FREETYPE=no
57491    fi
57492  fi
57493
57494  if test "x$FOUND_FREETYPE" = xyes; then
57495    # Include file found, let's continue the sanity check.
57496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57497$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57498
57499    # Reset to default value
57500    FREETYPE_BASE_NAME=freetype
57501    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57502    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57503      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57505        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57506        # for the .6 version explicitly.
57507        FREETYPE_BASE_NAME=freetype.6
57508        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57509        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57510$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57511      else
57512        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57513$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57514        FOUND_FREETYPE=no
57515      fi
57516    else
57517      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57518        # On Windows, we will need both .lib and .dll file.
57519        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57520          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57521$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57522          FOUND_FREETYPE=no
57523        fi
57524      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57526        # Found lib in isa dir, use that instead.
57527        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57528        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57529$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57530      fi
57531    fi
57532  fi
57533
57534  if test "x$FOUND_FREETYPE" = xyes; then
57535
57536  # Only process if variable expands to non-empty
57537
57538  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57540
57541  # Input might be given as Windows format, start by converting to
57542  # unix format.
57543  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57544  new_path=`$CYGPATH -u "$path"`
57545
57546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57549  # "foo.exe" is OK but "foo" is an error.
57550  #
57551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57552  # It is also a way to make sure we got the proper file name for the real test later on.
57553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57554  if test "x$test_shortpath" = x; then
57555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57558  fi
57559
57560  # Call helper function which possibly converts this using DOS-style short mode.
57561  # If so, the updated path is stored in $new_path.
57562
57563  input_path="$new_path"
57564  # Check if we need to convert this using DOS-style short mode. If the path
57565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57566  # take no chances and rewrite it.
57567  # Note: m4 eats our [], so we need to use [ and ] instead.
57568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57569  if test "x$has_forbidden_chars" != x; then
57570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57574      # Going to short mode and back again did indeed matter. Since short mode is
57575      # case insensitive, let's make it lowercase to improve readability.
57576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57577      # Now convert it back to Unix-style (cygpath)
57578      input_path=`$CYGPATH -u "$shortmode_path"`
57579      new_path="$input_path"
57580    fi
57581  fi
57582
57583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57584  if test "x$test_cygdrive_prefix" = x; then
57585    # As a simple fix, exclude /usr/bin since it's not a real path.
57586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57588      # a path prefixed by /cygdrive for fixpath to work.
57589      new_path="$CYGWIN_ROOT_PATH$input_path"
57590    fi
57591  fi
57592
57593
57594  if test "x$path" != "x$new_path"; then
57595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57598  fi
57599
57600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57601
57602  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57603  has_colon=`$ECHO $path | $GREP ^.:`
57604  new_path="$path"
57605  if test "x$has_colon" = x; then
57606    # Not in mixed or Windows style, start by that.
57607    new_path=`cmd //c echo $path`
57608  fi
57609
57610
57611  input_path="$new_path"
57612  # Check if we need to convert this using DOS-style short mode. If the path
57613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57614  # take no chances and rewrite it.
57615  # Note: m4 eats our [], so we need to use [ and ] instead.
57616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57617  if test "x$has_forbidden_chars" != x; then
57618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57620  fi
57621
57622
57623  windows_path="$new_path"
57624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57625    unix_path=`$CYGPATH -u "$windows_path"`
57626    new_path="$unix_path"
57627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57629    new_path="$unix_path"
57630  fi
57631
57632  if test "x$path" != "x$new_path"; then
57633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57636  fi
57637
57638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57640
57641    else
57642      # We're on a unix platform. Hooray! :)
57643      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57644      has_space=`$ECHO "$path" | $GREP " "`
57645      if test "x$has_space" != x; then
57646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57649      fi
57650
57651      # Use eval to expand a potential ~
57652      eval path="$path"
57653      if test ! -f "$path" && test ! -d "$path"; then
57654        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57655      fi
57656
57657      if test -d "$path"; then
57658        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57659      else
57660        dir="`$DIRNAME "$path"`"
57661        base="`$BASENAME "$path"`"
57662        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57663      fi
57664    fi
57665  fi
57666
57667
57668  # Only process if variable expands to non-empty
57669
57670  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57672
57673  # Input might be given as Windows format, start by converting to
57674  # unix format.
57675  path="$POTENTIAL_FREETYPE_LIB_PATH"
57676  new_path=`$CYGPATH -u "$path"`
57677
57678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57681  # "foo.exe" is OK but "foo" is an error.
57682  #
57683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57684  # It is also a way to make sure we got the proper file name for the real test later on.
57685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57686  if test "x$test_shortpath" = x; then
57687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57690  fi
57691
57692  # Call helper function which possibly converts this using DOS-style short mode.
57693  # If so, the updated path is stored in $new_path.
57694
57695  input_path="$new_path"
57696  # Check if we need to convert this using DOS-style short mode. If the path
57697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57698  # take no chances and rewrite it.
57699  # Note: m4 eats our [], so we need to use [ and ] instead.
57700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57701  if test "x$has_forbidden_chars" != x; then
57702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57706      # Going to short mode and back again did indeed matter. Since short mode is
57707      # case insensitive, let's make it lowercase to improve readability.
57708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57709      # Now convert it back to Unix-style (cygpath)
57710      input_path=`$CYGPATH -u "$shortmode_path"`
57711      new_path="$input_path"
57712    fi
57713  fi
57714
57715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57716  if test "x$test_cygdrive_prefix" = x; then
57717    # As a simple fix, exclude /usr/bin since it's not a real path.
57718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57720      # a path prefixed by /cygdrive for fixpath to work.
57721      new_path="$CYGWIN_ROOT_PATH$input_path"
57722    fi
57723  fi
57724
57725
57726  if test "x$path" != "x$new_path"; then
57727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57730  fi
57731
57732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57733
57734  path="$POTENTIAL_FREETYPE_LIB_PATH"
57735  has_colon=`$ECHO $path | $GREP ^.:`
57736  new_path="$path"
57737  if test "x$has_colon" = x; then
57738    # Not in mixed or Windows style, start by that.
57739    new_path=`cmd //c echo $path`
57740  fi
57741
57742
57743  input_path="$new_path"
57744  # Check if we need to convert this using DOS-style short mode. If the path
57745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57746  # take no chances and rewrite it.
57747  # Note: m4 eats our [], so we need to use [ and ] instead.
57748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57749  if test "x$has_forbidden_chars" != x; then
57750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57752  fi
57753
57754
57755  windows_path="$new_path"
57756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57757    unix_path=`$CYGPATH -u "$windows_path"`
57758    new_path="$unix_path"
57759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57761    new_path="$unix_path"
57762  fi
57763
57764  if test "x$path" != "x$new_path"; then
57765    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57768  fi
57769
57770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57772
57773    else
57774      # We're on a unix platform. Hooray! :)
57775      path="$POTENTIAL_FREETYPE_LIB_PATH"
57776      has_space=`$ECHO "$path" | $GREP " "`
57777      if test "x$has_space" != x; then
57778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57781      fi
57782
57783      # Use eval to expand a potential ~
57784      eval path="$path"
57785      if test ! -f "$path" && test ! -d "$path"; then
57786        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57787      fi
57788
57789      if test -d "$path"; then
57790        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57791      else
57792        dir="`$DIRNAME "$path"`"
57793        base="`$BASENAME "$path"`"
57794        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57795      fi
57796    fi
57797  fi
57798
57799
57800    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57802$as_echo_n "checking for freetype includes... " >&6; }
57803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57804$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57805    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57807$as_echo_n "checking for freetype libraries... " >&6; }
57808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57809$as_echo "$FREETYPE_LIB_PATH" >&6; }
57810  fi
57811
57812        if test "x$FOUND_FREETYPE" != xyes; then
57813          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57814        fi
57815      else
57816        # User specified only one of lib or include. This is an error.
57817        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57818          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57819$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57820          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57821        else
57822          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57823$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57824          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57825        fi
57826      fi
57827    else
57828      # User did not specify settings, but we need freetype. Try to locate it.
57829
57830      if test "x$BUNDLE_FREETYPE" = x; then
57831        # If not specified, default is to bundle freetype only on windows
57832        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57833          BUNDLE_FREETYPE=yes
57834        else
57835          BUNDLE_FREETYPE=no
57836        fi
57837      fi
57838
57839      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57840      if test "x$SYSROOT" = x; then
57841        if test "x$FOUND_FREETYPE" != xyes; then
57842          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57843          if test "x$PKG_CONFIG" != x; then
57844
57845pkg_failed=no
57846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57847$as_echo_n "checking for FREETYPE... " >&6; }
57848
57849if test -n "$FREETYPE_CFLAGS"; then
57850    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57851 elif test -n "$PKG_CONFIG"; then
57852    if test -n "$PKG_CONFIG" && \
57853    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57854  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57855  ac_status=$?
57856  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57857  test $ac_status = 0; }; then
57858  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57859else
57860  pkg_failed=yes
57861fi
57862 else
57863    pkg_failed=untried
57864fi
57865if test -n "$FREETYPE_LIBS"; then
57866    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57867 elif test -n "$PKG_CONFIG"; then
57868    if test -n "$PKG_CONFIG" && \
57869    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57870  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57871  ac_status=$?
57872  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57873  test $ac_status = 0; }; then
57874  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57875else
57876  pkg_failed=yes
57877fi
57878 else
57879    pkg_failed=untried
57880fi
57881
57882
57883
57884if test $pkg_failed = yes; then
57885
57886if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57887        _pkg_short_errors_supported=yes
57888else
57889        _pkg_short_errors_supported=no
57890fi
57891        if test $_pkg_short_errors_supported = yes; then
57892	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57893        else
57894	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57895        fi
57896	# Put the nasty error message in config.log where it belongs
57897	echo "$FREETYPE_PKG_ERRORS" >&5
57898
57899	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57900$as_echo "no" >&6; }
57901                FOUND_FREETYPE=no
57902elif test $pkg_failed = untried; then
57903	FOUND_FREETYPE=no
57904else
57905	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57906	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57908$as_echo "yes" >&6; }
57909	FOUND_FREETYPE=yes
57910fi
57911            if test "x$FOUND_FREETYPE" = xyes; then
57912              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57913              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57914              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57915              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57916                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57917              fi
57918              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57919              if test "x$BUNDLE_FREETYPE" = xyes; then
57920                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57921$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57922                FOUND_FREETYPE=no
57923              else
57924                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57925$as_echo_n "checking for freetype... " >&6; }
57926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57927$as_echo "yes (using pkg-config)" >&6; }
57928              fi
57929            fi
57930          fi
57931        fi
57932      fi
57933
57934      if test "x$FOUND_FREETYPE" != xyes; then
57935        # Check in well-known locations
57936        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57937          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57938
57939  windows_path="$FREETYPE_BASE_DIR"
57940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57941    unix_path=`$CYGPATH -u "$windows_path"`
57942    FREETYPE_BASE_DIR="$unix_path"
57943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57945    FREETYPE_BASE_DIR="$unix_path"
57946  fi
57947
57948
57949  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57950  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57951  METHOD="well-known location"
57952
57953  # Let's start with an optimistic view of the world :-)
57954  FOUND_FREETYPE=yes
57955
57956  # First look for the canonical freetype main include file ft2build.h.
57957  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57958    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57959    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57960    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57961      # Fail.
57962      FOUND_FREETYPE=no
57963    fi
57964  fi
57965
57966  if test "x$FOUND_FREETYPE" = xyes; then
57967    # Include file found, let's continue the sanity check.
57968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57969$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57970
57971    # Reset to default value
57972    FREETYPE_BASE_NAME=freetype
57973    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57974    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57975      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57977        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57978        # for the .6 version explicitly.
57979        FREETYPE_BASE_NAME=freetype.6
57980        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57981        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57982$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57983      else
57984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57986        FOUND_FREETYPE=no
57987      fi
57988    else
57989      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57990        # On Windows, we will need both .lib and .dll file.
57991        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57992          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57993$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57994          FOUND_FREETYPE=no
57995        fi
57996      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57997          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57998        # Found lib in isa dir, use that instead.
57999        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58000        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58001$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58002      fi
58003    fi
58004  fi
58005
58006  if test "x$FOUND_FREETYPE" = xyes; then
58007
58008  # Only process if variable expands to non-empty
58009
58010  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58012
58013  # Input might be given as Windows format, start by converting to
58014  # unix format.
58015  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58016  new_path=`$CYGPATH -u "$path"`
58017
58018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58021  # "foo.exe" is OK but "foo" is an error.
58022  #
58023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58024  # It is also a way to make sure we got the proper file name for the real test later on.
58025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58026  if test "x$test_shortpath" = x; then
58027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58030  fi
58031
58032  # Call helper function which possibly converts this using DOS-style short mode.
58033  # If so, the updated path is stored in $new_path.
58034
58035  input_path="$new_path"
58036  # Check if we need to convert this using DOS-style short mode. If the path
58037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58038  # take no chances and rewrite it.
58039  # Note: m4 eats our [], so we need to use [ and ] instead.
58040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58041  if test "x$has_forbidden_chars" != x; then
58042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58046      # Going to short mode and back again did indeed matter. Since short mode is
58047      # case insensitive, let's make it lowercase to improve readability.
58048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58049      # Now convert it back to Unix-style (cygpath)
58050      input_path=`$CYGPATH -u "$shortmode_path"`
58051      new_path="$input_path"
58052    fi
58053  fi
58054
58055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58056  if test "x$test_cygdrive_prefix" = x; then
58057    # As a simple fix, exclude /usr/bin since it's not a real path.
58058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58060      # a path prefixed by /cygdrive for fixpath to work.
58061      new_path="$CYGWIN_ROOT_PATH$input_path"
58062    fi
58063  fi
58064
58065
58066  if test "x$path" != "x$new_path"; then
58067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58070  fi
58071
58072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58073
58074  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58075  has_colon=`$ECHO $path | $GREP ^.:`
58076  new_path="$path"
58077  if test "x$has_colon" = x; then
58078    # Not in mixed or Windows style, start by that.
58079    new_path=`cmd //c echo $path`
58080  fi
58081
58082
58083  input_path="$new_path"
58084  # Check if we need to convert this using DOS-style short mode. If the path
58085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58086  # take no chances and rewrite it.
58087  # Note: m4 eats our [], so we need to use [ and ] instead.
58088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58089  if test "x$has_forbidden_chars" != x; then
58090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58092  fi
58093
58094
58095  windows_path="$new_path"
58096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58097    unix_path=`$CYGPATH -u "$windows_path"`
58098    new_path="$unix_path"
58099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58101    new_path="$unix_path"
58102  fi
58103
58104  if test "x$path" != "x$new_path"; then
58105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58108  fi
58109
58110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58112
58113    else
58114      # We're on a unix platform. Hooray! :)
58115      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58116      has_space=`$ECHO "$path" | $GREP " "`
58117      if test "x$has_space" != x; then
58118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58121      fi
58122
58123      # Use eval to expand a potential ~
58124      eval path="$path"
58125      if test ! -f "$path" && test ! -d "$path"; then
58126        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58127      fi
58128
58129      if test -d "$path"; then
58130        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58131      else
58132        dir="`$DIRNAME "$path"`"
58133        base="`$BASENAME "$path"`"
58134        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58135      fi
58136    fi
58137  fi
58138
58139
58140  # Only process if variable expands to non-empty
58141
58142  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58144
58145  # Input might be given as Windows format, start by converting to
58146  # unix format.
58147  path="$POTENTIAL_FREETYPE_LIB_PATH"
58148  new_path=`$CYGPATH -u "$path"`
58149
58150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58153  # "foo.exe" is OK but "foo" is an error.
58154  #
58155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58156  # It is also a way to make sure we got the proper file name for the real test later on.
58157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58158  if test "x$test_shortpath" = x; then
58159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58162  fi
58163
58164  # Call helper function which possibly converts this using DOS-style short mode.
58165  # If so, the updated path is stored in $new_path.
58166
58167  input_path="$new_path"
58168  # Check if we need to convert this using DOS-style short mode. If the path
58169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58170  # take no chances and rewrite it.
58171  # Note: m4 eats our [], so we need to use [ and ] instead.
58172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58173  if test "x$has_forbidden_chars" != x; then
58174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58178      # Going to short mode and back again did indeed matter. Since short mode is
58179      # case insensitive, let's make it lowercase to improve readability.
58180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58181      # Now convert it back to Unix-style (cygpath)
58182      input_path=`$CYGPATH -u "$shortmode_path"`
58183      new_path="$input_path"
58184    fi
58185  fi
58186
58187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58188  if test "x$test_cygdrive_prefix" = x; then
58189    # As a simple fix, exclude /usr/bin since it's not a real path.
58190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58192      # a path prefixed by /cygdrive for fixpath to work.
58193      new_path="$CYGWIN_ROOT_PATH$input_path"
58194    fi
58195  fi
58196
58197
58198  if test "x$path" != "x$new_path"; then
58199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58202  fi
58203
58204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58205
58206  path="$POTENTIAL_FREETYPE_LIB_PATH"
58207  has_colon=`$ECHO $path | $GREP ^.:`
58208  new_path="$path"
58209  if test "x$has_colon" = x; then
58210    # Not in mixed or Windows style, start by that.
58211    new_path=`cmd //c echo $path`
58212  fi
58213
58214
58215  input_path="$new_path"
58216  # Check if we need to convert this using DOS-style short mode. If the path
58217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58218  # take no chances and rewrite it.
58219  # Note: m4 eats our [], so we need to use [ and ] instead.
58220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58221  if test "x$has_forbidden_chars" != x; then
58222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58224  fi
58225
58226
58227  windows_path="$new_path"
58228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58229    unix_path=`$CYGPATH -u "$windows_path"`
58230    new_path="$unix_path"
58231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58233    new_path="$unix_path"
58234  fi
58235
58236  if test "x$path" != "x$new_path"; then
58237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58240  fi
58241
58242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58244
58245    else
58246      # We're on a unix platform. Hooray! :)
58247      path="$POTENTIAL_FREETYPE_LIB_PATH"
58248      has_space=`$ECHO "$path" | $GREP " "`
58249      if test "x$has_space" != x; then
58250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58253      fi
58254
58255      # Use eval to expand a potential ~
58256      eval path="$path"
58257      if test ! -f "$path" && test ! -d "$path"; then
58258        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58259      fi
58260
58261      if test -d "$path"; then
58262        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58263      else
58264        dir="`$DIRNAME "$path"`"
58265        base="`$BASENAME "$path"`"
58266        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58267      fi
58268    fi
58269  fi
58270
58271
58272    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58274$as_echo_n "checking for freetype includes... " >&6; }
58275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58276$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58277    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58279$as_echo_n "checking for freetype libraries... " >&6; }
58280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58281$as_echo "$FREETYPE_LIB_PATH" >&6; }
58282  fi
58283
58284          if test "x$FOUND_FREETYPE" != xyes; then
58285            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58286
58287  windows_path="$FREETYPE_BASE_DIR"
58288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58289    unix_path=`$CYGPATH -u "$windows_path"`
58290    FREETYPE_BASE_DIR="$unix_path"
58291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58293    FREETYPE_BASE_DIR="$unix_path"
58294  fi
58295
58296
58297  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58298  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58299  METHOD="well-known location"
58300
58301  # Let's start with an optimistic view of the world :-)
58302  FOUND_FREETYPE=yes
58303
58304  # First look for the canonical freetype main include file ft2build.h.
58305  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58306    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58307    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58308    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58309      # Fail.
58310      FOUND_FREETYPE=no
58311    fi
58312  fi
58313
58314  if test "x$FOUND_FREETYPE" = xyes; then
58315    # Include file found, let's continue the sanity check.
58316    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58317$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58318
58319    # Reset to default value
58320    FREETYPE_BASE_NAME=freetype
58321    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58322    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58323      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58324          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58325        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58326        # for the .6 version explicitly.
58327        FREETYPE_BASE_NAME=freetype.6
58328        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58329        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58330$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58331      else
58332        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58334        FOUND_FREETYPE=no
58335      fi
58336    else
58337      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58338        # On Windows, we will need both .lib and .dll file.
58339        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58340          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58341$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58342          FOUND_FREETYPE=no
58343        fi
58344      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58345          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58346        # Found lib in isa dir, use that instead.
58347        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58348        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58349$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58350      fi
58351    fi
58352  fi
58353
58354  if test "x$FOUND_FREETYPE" = xyes; then
58355
58356  # Only process if variable expands to non-empty
58357
58358  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58360
58361  # Input might be given as Windows format, start by converting to
58362  # unix format.
58363  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58364  new_path=`$CYGPATH -u "$path"`
58365
58366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58369  # "foo.exe" is OK but "foo" is an error.
58370  #
58371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58372  # It is also a way to make sure we got the proper file name for the real test later on.
58373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58374  if test "x$test_shortpath" = x; then
58375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58378  fi
58379
58380  # Call helper function which possibly converts this using DOS-style short mode.
58381  # If so, the updated path is stored in $new_path.
58382
58383  input_path="$new_path"
58384  # Check if we need to convert this using DOS-style short mode. If the path
58385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58386  # take no chances and rewrite it.
58387  # Note: m4 eats our [], so we need to use [ and ] instead.
58388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58389  if test "x$has_forbidden_chars" != x; then
58390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58394      # Going to short mode and back again did indeed matter. Since short mode is
58395      # case insensitive, let's make it lowercase to improve readability.
58396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58397      # Now convert it back to Unix-style (cygpath)
58398      input_path=`$CYGPATH -u "$shortmode_path"`
58399      new_path="$input_path"
58400    fi
58401  fi
58402
58403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58404  if test "x$test_cygdrive_prefix" = x; then
58405    # As a simple fix, exclude /usr/bin since it's not a real path.
58406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58408      # a path prefixed by /cygdrive for fixpath to work.
58409      new_path="$CYGWIN_ROOT_PATH$input_path"
58410    fi
58411  fi
58412
58413
58414  if test "x$path" != "x$new_path"; then
58415    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58418  fi
58419
58420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58421
58422  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58423  has_colon=`$ECHO $path | $GREP ^.:`
58424  new_path="$path"
58425  if test "x$has_colon" = x; then
58426    # Not in mixed or Windows style, start by that.
58427    new_path=`cmd //c echo $path`
58428  fi
58429
58430
58431  input_path="$new_path"
58432  # Check if we need to convert this using DOS-style short mode. If the path
58433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58434  # take no chances and rewrite it.
58435  # Note: m4 eats our [], so we need to use [ and ] instead.
58436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58437  if test "x$has_forbidden_chars" != x; then
58438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58440  fi
58441
58442
58443  windows_path="$new_path"
58444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58445    unix_path=`$CYGPATH -u "$windows_path"`
58446    new_path="$unix_path"
58447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58449    new_path="$unix_path"
58450  fi
58451
58452  if test "x$path" != "x$new_path"; then
58453    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58456  fi
58457
58458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58460
58461    else
58462      # We're on a unix platform. Hooray! :)
58463      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58464      has_space=`$ECHO "$path" | $GREP " "`
58465      if test "x$has_space" != x; then
58466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58469      fi
58470
58471      # Use eval to expand a potential ~
58472      eval path="$path"
58473      if test ! -f "$path" && test ! -d "$path"; then
58474        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58475      fi
58476
58477      if test -d "$path"; then
58478        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58479      else
58480        dir="`$DIRNAME "$path"`"
58481        base="`$BASENAME "$path"`"
58482        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58483      fi
58484    fi
58485  fi
58486
58487
58488  # Only process if variable expands to non-empty
58489
58490  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58492
58493  # Input might be given as Windows format, start by converting to
58494  # unix format.
58495  path="$POTENTIAL_FREETYPE_LIB_PATH"
58496  new_path=`$CYGPATH -u "$path"`
58497
58498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58501  # "foo.exe" is OK but "foo" is an error.
58502  #
58503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58504  # It is also a way to make sure we got the proper file name for the real test later on.
58505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58506  if test "x$test_shortpath" = x; then
58507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58510  fi
58511
58512  # Call helper function which possibly converts this using DOS-style short mode.
58513  # If so, the updated path is stored in $new_path.
58514
58515  input_path="$new_path"
58516  # Check if we need to convert this using DOS-style short mode. If the path
58517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58518  # take no chances and rewrite it.
58519  # Note: m4 eats our [], so we need to use [ and ] instead.
58520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58521  if test "x$has_forbidden_chars" != x; then
58522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58526      # Going to short mode and back again did indeed matter. Since short mode is
58527      # case insensitive, let's make it lowercase to improve readability.
58528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58529      # Now convert it back to Unix-style (cygpath)
58530      input_path=`$CYGPATH -u "$shortmode_path"`
58531      new_path="$input_path"
58532    fi
58533  fi
58534
58535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58536  if test "x$test_cygdrive_prefix" = x; then
58537    # As a simple fix, exclude /usr/bin since it's not a real path.
58538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58540      # a path prefixed by /cygdrive for fixpath to work.
58541      new_path="$CYGWIN_ROOT_PATH$input_path"
58542    fi
58543  fi
58544
58545
58546  if test "x$path" != "x$new_path"; then
58547    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58550  fi
58551
58552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58553
58554  path="$POTENTIAL_FREETYPE_LIB_PATH"
58555  has_colon=`$ECHO $path | $GREP ^.:`
58556  new_path="$path"
58557  if test "x$has_colon" = x; then
58558    # Not in mixed or Windows style, start by that.
58559    new_path=`cmd //c echo $path`
58560  fi
58561
58562
58563  input_path="$new_path"
58564  # Check if we need to convert this using DOS-style short mode. If the path
58565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58566  # take no chances and rewrite it.
58567  # Note: m4 eats our [], so we need to use [ and ] instead.
58568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58569  if test "x$has_forbidden_chars" != x; then
58570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58572  fi
58573
58574
58575  windows_path="$new_path"
58576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58577    unix_path=`$CYGPATH -u "$windows_path"`
58578    new_path="$unix_path"
58579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58581    new_path="$unix_path"
58582  fi
58583
58584  if test "x$path" != "x$new_path"; then
58585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58588  fi
58589
58590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58592
58593    else
58594      # We're on a unix platform. Hooray! :)
58595      path="$POTENTIAL_FREETYPE_LIB_PATH"
58596      has_space=`$ECHO "$path" | $GREP " "`
58597      if test "x$has_space" != x; then
58598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58601      fi
58602
58603      # Use eval to expand a potential ~
58604      eval path="$path"
58605      if test ! -f "$path" && test ! -d "$path"; then
58606        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58607      fi
58608
58609      if test -d "$path"; then
58610        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58611      else
58612        dir="`$DIRNAME "$path"`"
58613        base="`$BASENAME "$path"`"
58614        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58615      fi
58616    fi
58617  fi
58618
58619
58620    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58622$as_echo_n "checking for freetype includes... " >&6; }
58623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58624$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58625    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58627$as_echo_n "checking for freetype libraries... " >&6; }
58628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58629$as_echo "$FREETYPE_LIB_PATH" >&6; }
58630  fi
58631
58632          fi
58633          if test "x$FOUND_FREETYPE" != xyes; then
58634            FREETYPE_BASE_DIR="$HOME/freetype"
58635
58636  windows_path="$FREETYPE_BASE_DIR"
58637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58638    unix_path=`$CYGPATH -u "$windows_path"`
58639    FREETYPE_BASE_DIR="$unix_path"
58640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58642    FREETYPE_BASE_DIR="$unix_path"
58643  fi
58644
58645            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58646
58647  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58648  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58649  METHOD="well-known location"
58650
58651  # Let's start with an optimistic view of the world :-)
58652  FOUND_FREETYPE=yes
58653
58654  # First look for the canonical freetype main include file ft2build.h.
58655  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58656    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58657    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58658    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58659      # Fail.
58660      FOUND_FREETYPE=no
58661    fi
58662  fi
58663
58664  if test "x$FOUND_FREETYPE" = xyes; then
58665    # Include file found, let's continue the sanity check.
58666    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58667$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58668
58669    # Reset to default value
58670    FREETYPE_BASE_NAME=freetype
58671    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58672    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58673      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58675        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58676        # for the .6 version explicitly.
58677        FREETYPE_BASE_NAME=freetype.6
58678        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58679        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58680$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58681      else
58682        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58683$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58684        FOUND_FREETYPE=no
58685      fi
58686    else
58687      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58688        # On Windows, we will need both .lib and .dll file.
58689        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58690          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58692          FOUND_FREETYPE=no
58693        fi
58694      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58695          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58696        # Found lib in isa dir, use that instead.
58697        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58698        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58699$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58700      fi
58701    fi
58702  fi
58703
58704  if test "x$FOUND_FREETYPE" = xyes; then
58705
58706  # Only process if variable expands to non-empty
58707
58708  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58710
58711  # Input might be given as Windows format, start by converting to
58712  # unix format.
58713  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58714  new_path=`$CYGPATH -u "$path"`
58715
58716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58719  # "foo.exe" is OK but "foo" is an error.
58720  #
58721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58722  # It is also a way to make sure we got the proper file name for the real test later on.
58723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58724  if test "x$test_shortpath" = x; then
58725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58728  fi
58729
58730  # Call helper function which possibly converts this using DOS-style short mode.
58731  # If so, the updated path is stored in $new_path.
58732
58733  input_path="$new_path"
58734  # Check if we need to convert this using DOS-style short mode. If the path
58735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58736  # take no chances and rewrite it.
58737  # Note: m4 eats our [], so we need to use [ and ] instead.
58738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58739  if test "x$has_forbidden_chars" != x; then
58740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58744      # Going to short mode and back again did indeed matter. Since short mode is
58745      # case insensitive, let's make it lowercase to improve readability.
58746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58747      # Now convert it back to Unix-style (cygpath)
58748      input_path=`$CYGPATH -u "$shortmode_path"`
58749      new_path="$input_path"
58750    fi
58751  fi
58752
58753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58754  if test "x$test_cygdrive_prefix" = x; then
58755    # As a simple fix, exclude /usr/bin since it's not a real path.
58756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58758      # a path prefixed by /cygdrive for fixpath to work.
58759      new_path="$CYGWIN_ROOT_PATH$input_path"
58760    fi
58761  fi
58762
58763
58764  if test "x$path" != "x$new_path"; then
58765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58768  fi
58769
58770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58771
58772  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58773  has_colon=`$ECHO $path | $GREP ^.:`
58774  new_path="$path"
58775  if test "x$has_colon" = x; then
58776    # Not in mixed or Windows style, start by that.
58777    new_path=`cmd //c echo $path`
58778  fi
58779
58780
58781  input_path="$new_path"
58782  # Check if we need to convert this using DOS-style short mode. If the path
58783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58784  # take no chances and rewrite it.
58785  # Note: m4 eats our [], so we need to use [ and ] instead.
58786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58787  if test "x$has_forbidden_chars" != x; then
58788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58790  fi
58791
58792
58793  windows_path="$new_path"
58794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58795    unix_path=`$CYGPATH -u "$windows_path"`
58796    new_path="$unix_path"
58797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58799    new_path="$unix_path"
58800  fi
58801
58802  if test "x$path" != "x$new_path"; then
58803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58806  fi
58807
58808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58810
58811    else
58812      # We're on a unix platform. Hooray! :)
58813      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58814      has_space=`$ECHO "$path" | $GREP " "`
58815      if test "x$has_space" != x; then
58816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58819      fi
58820
58821      # Use eval to expand a potential ~
58822      eval path="$path"
58823      if test ! -f "$path" && test ! -d "$path"; then
58824        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58825      fi
58826
58827      if test -d "$path"; then
58828        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58829      else
58830        dir="`$DIRNAME "$path"`"
58831        base="`$BASENAME "$path"`"
58832        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58833      fi
58834    fi
58835  fi
58836
58837
58838  # Only process if variable expands to non-empty
58839
58840  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58842
58843  # Input might be given as Windows format, start by converting to
58844  # unix format.
58845  path="$POTENTIAL_FREETYPE_LIB_PATH"
58846  new_path=`$CYGPATH -u "$path"`
58847
58848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58851  # "foo.exe" is OK but "foo" is an error.
58852  #
58853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58854  # It is also a way to make sure we got the proper file name for the real test later on.
58855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58856  if test "x$test_shortpath" = x; then
58857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58860  fi
58861
58862  # Call helper function which possibly converts this using DOS-style short mode.
58863  # If so, the updated path is stored in $new_path.
58864
58865  input_path="$new_path"
58866  # Check if we need to convert this using DOS-style short mode. If the path
58867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58868  # take no chances and rewrite it.
58869  # Note: m4 eats our [], so we need to use [ and ] instead.
58870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58871  if test "x$has_forbidden_chars" != x; then
58872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58876      # Going to short mode and back again did indeed matter. Since short mode is
58877      # case insensitive, let's make it lowercase to improve readability.
58878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58879      # Now convert it back to Unix-style (cygpath)
58880      input_path=`$CYGPATH -u "$shortmode_path"`
58881      new_path="$input_path"
58882    fi
58883  fi
58884
58885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58886  if test "x$test_cygdrive_prefix" = x; then
58887    # As a simple fix, exclude /usr/bin since it's not a real path.
58888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58890      # a path prefixed by /cygdrive for fixpath to work.
58891      new_path="$CYGWIN_ROOT_PATH$input_path"
58892    fi
58893  fi
58894
58895
58896  if test "x$path" != "x$new_path"; then
58897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58900  fi
58901
58902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58903
58904  path="$POTENTIAL_FREETYPE_LIB_PATH"
58905  has_colon=`$ECHO $path | $GREP ^.:`
58906  new_path="$path"
58907  if test "x$has_colon" = x; then
58908    # Not in mixed or Windows style, start by that.
58909    new_path=`cmd //c echo $path`
58910  fi
58911
58912
58913  input_path="$new_path"
58914  # Check if we need to convert this using DOS-style short mode. If the path
58915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58916  # take no chances and rewrite it.
58917  # Note: m4 eats our [], so we need to use [ and ] instead.
58918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58919  if test "x$has_forbidden_chars" != x; then
58920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58922  fi
58923
58924
58925  windows_path="$new_path"
58926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58927    unix_path=`$CYGPATH -u "$windows_path"`
58928    new_path="$unix_path"
58929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58931    new_path="$unix_path"
58932  fi
58933
58934  if test "x$path" != "x$new_path"; then
58935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58938  fi
58939
58940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58942
58943    else
58944      # We're on a unix platform. Hooray! :)
58945      path="$POTENTIAL_FREETYPE_LIB_PATH"
58946      has_space=`$ECHO "$path" | $GREP " "`
58947      if test "x$has_space" != x; then
58948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58951      fi
58952
58953      # Use eval to expand a potential ~
58954      eval path="$path"
58955      if test ! -f "$path" && test ! -d "$path"; then
58956        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58957      fi
58958
58959      if test -d "$path"; then
58960        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58961      else
58962        dir="`$DIRNAME "$path"`"
58963        base="`$BASENAME "$path"`"
58964        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58965      fi
58966    fi
58967  fi
58968
58969
58970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58972$as_echo_n "checking for freetype includes... " >&6; }
58973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58977$as_echo_n "checking for freetype libraries... " >&6; }
58978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58979$as_echo "$FREETYPE_LIB_PATH" >&6; }
58980  fi
58981
58982            else
58983
58984  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58985  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58986  METHOD="well-known location"
58987
58988  # Let's start with an optimistic view of the world :-)
58989  FOUND_FREETYPE=yes
58990
58991  # First look for the canonical freetype main include file ft2build.h.
58992  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58993    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58994    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58995    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58996      # Fail.
58997      FOUND_FREETYPE=no
58998    fi
58999  fi
59000
59001  if test "x$FOUND_FREETYPE" = xyes; then
59002    # Include file found, let's continue the sanity check.
59003    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59004$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59005
59006    # Reset to default value
59007    FREETYPE_BASE_NAME=freetype
59008    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59009    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59010      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59011          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59012        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59013        # for the .6 version explicitly.
59014        FREETYPE_BASE_NAME=freetype.6
59015        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59016        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59017$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59018      else
59019        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59020$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59021        FOUND_FREETYPE=no
59022      fi
59023    else
59024      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59025        # On Windows, we will need both .lib and .dll file.
59026        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59027          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59028$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59029          FOUND_FREETYPE=no
59030        fi
59031      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59032          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59033        # Found lib in isa dir, use that instead.
59034        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59035        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59036$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59037      fi
59038    fi
59039  fi
59040
59041  if test "x$FOUND_FREETYPE" = xyes; then
59042
59043  # Only process if variable expands to non-empty
59044
59045  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59047
59048  # Input might be given as Windows format, start by converting to
59049  # unix format.
59050  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59051  new_path=`$CYGPATH -u "$path"`
59052
59053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59056  # "foo.exe" is OK but "foo" is an error.
59057  #
59058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59059  # It is also a way to make sure we got the proper file name for the real test later on.
59060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59061  if test "x$test_shortpath" = x; then
59062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59064    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59065  fi
59066
59067  # Call helper function which possibly converts this using DOS-style short mode.
59068  # If so, the updated path is stored in $new_path.
59069
59070  input_path="$new_path"
59071  # Check if we need to convert this using DOS-style short mode. If the path
59072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59073  # take no chances and rewrite it.
59074  # Note: m4 eats our [], so we need to use [ and ] instead.
59075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59076  if test "x$has_forbidden_chars" != x; then
59077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59081      # Going to short mode and back again did indeed matter. Since short mode is
59082      # case insensitive, let's make it lowercase to improve readability.
59083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59084      # Now convert it back to Unix-style (cygpath)
59085      input_path=`$CYGPATH -u "$shortmode_path"`
59086      new_path="$input_path"
59087    fi
59088  fi
59089
59090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59091  if test "x$test_cygdrive_prefix" = x; then
59092    # As a simple fix, exclude /usr/bin since it's not a real path.
59093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59095      # a path prefixed by /cygdrive for fixpath to work.
59096      new_path="$CYGWIN_ROOT_PATH$input_path"
59097    fi
59098  fi
59099
59100
59101  if test "x$path" != "x$new_path"; then
59102    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59105  fi
59106
59107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59108
59109  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59110  has_colon=`$ECHO $path | $GREP ^.:`
59111  new_path="$path"
59112  if test "x$has_colon" = x; then
59113    # Not in mixed or Windows style, start by that.
59114    new_path=`cmd //c echo $path`
59115  fi
59116
59117
59118  input_path="$new_path"
59119  # Check if we need to convert this using DOS-style short mode. If the path
59120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59121  # take no chances and rewrite it.
59122  # Note: m4 eats our [], so we need to use [ and ] instead.
59123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59124  if test "x$has_forbidden_chars" != x; then
59125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59127  fi
59128
59129
59130  windows_path="$new_path"
59131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59132    unix_path=`$CYGPATH -u "$windows_path"`
59133    new_path="$unix_path"
59134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59136    new_path="$unix_path"
59137  fi
59138
59139  if test "x$path" != "x$new_path"; then
59140    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59143  fi
59144
59145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59147
59148    else
59149      # We're on a unix platform. Hooray! :)
59150      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59151      has_space=`$ECHO "$path" | $GREP " "`
59152      if test "x$has_space" != x; then
59153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59156      fi
59157
59158      # Use eval to expand a potential ~
59159      eval path="$path"
59160      if test ! -f "$path" && test ! -d "$path"; then
59161        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59162      fi
59163
59164      if test -d "$path"; then
59165        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59166      else
59167        dir="`$DIRNAME "$path"`"
59168        base="`$BASENAME "$path"`"
59169        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59170      fi
59171    fi
59172  fi
59173
59174
59175  # Only process if variable expands to non-empty
59176
59177  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59179
59180  # Input might be given as Windows format, start by converting to
59181  # unix format.
59182  path="$POTENTIAL_FREETYPE_LIB_PATH"
59183  new_path=`$CYGPATH -u "$path"`
59184
59185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59188  # "foo.exe" is OK but "foo" is an error.
59189  #
59190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59191  # It is also a way to make sure we got the proper file name for the real test later on.
59192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59193  if test "x$test_shortpath" = x; then
59194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59196    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59197  fi
59198
59199  # Call helper function which possibly converts this using DOS-style short mode.
59200  # If so, the updated path is stored in $new_path.
59201
59202  input_path="$new_path"
59203  # Check if we need to convert this using DOS-style short mode. If the path
59204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59205  # take no chances and rewrite it.
59206  # Note: m4 eats our [], so we need to use [ and ] instead.
59207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59208  if test "x$has_forbidden_chars" != x; then
59209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59213      # Going to short mode and back again did indeed matter. Since short mode is
59214      # case insensitive, let's make it lowercase to improve readability.
59215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59216      # Now convert it back to Unix-style (cygpath)
59217      input_path=`$CYGPATH -u "$shortmode_path"`
59218      new_path="$input_path"
59219    fi
59220  fi
59221
59222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59223  if test "x$test_cygdrive_prefix" = x; then
59224    # As a simple fix, exclude /usr/bin since it's not a real path.
59225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59227      # a path prefixed by /cygdrive for fixpath to work.
59228      new_path="$CYGWIN_ROOT_PATH$input_path"
59229    fi
59230  fi
59231
59232
59233  if test "x$path" != "x$new_path"; then
59234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59237  fi
59238
59239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59240
59241  path="$POTENTIAL_FREETYPE_LIB_PATH"
59242  has_colon=`$ECHO $path | $GREP ^.:`
59243  new_path="$path"
59244  if test "x$has_colon" = x; then
59245    # Not in mixed or Windows style, start by that.
59246    new_path=`cmd //c echo $path`
59247  fi
59248
59249
59250  input_path="$new_path"
59251  # Check if we need to convert this using DOS-style short mode. If the path
59252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59253  # take no chances and rewrite it.
59254  # Note: m4 eats our [], so we need to use [ and ] instead.
59255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59256  if test "x$has_forbidden_chars" != x; then
59257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59259  fi
59260
59261
59262  windows_path="$new_path"
59263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59264    unix_path=`$CYGPATH -u "$windows_path"`
59265    new_path="$unix_path"
59266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59268    new_path="$unix_path"
59269  fi
59270
59271  if test "x$path" != "x$new_path"; then
59272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59275  fi
59276
59277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59279
59280    else
59281      # We're on a unix platform. Hooray! :)
59282      path="$POTENTIAL_FREETYPE_LIB_PATH"
59283      has_space=`$ECHO "$path" | $GREP " "`
59284      if test "x$has_space" != x; then
59285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59288      fi
59289
59290      # Use eval to expand a potential ~
59291      eval path="$path"
59292      if test ! -f "$path" && test ! -d "$path"; then
59293        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59294      fi
59295
59296      if test -d "$path"; then
59297        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59298      else
59299        dir="`$DIRNAME "$path"`"
59300        base="`$BASENAME "$path"`"
59301        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59302      fi
59303    fi
59304  fi
59305
59306
59307    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59309$as_echo_n "checking for freetype includes... " >&6; }
59310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59311$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59312    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59314$as_echo_n "checking for freetype libraries... " >&6; }
59315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59316$as_echo "$FREETYPE_LIB_PATH" >&6; }
59317  fi
59318
59319            fi
59320            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59321                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59322              # Source is available, as a last resort try to build freetype in default location
59323
59324  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59325  BUILD_FREETYPE=yes
59326
59327  # Check if the freetype sources are acessible..
59328  if ! test -d $FREETYPE_SRC_PATH; then
59329    { $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
59330$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59331    BUILD_FREETYPE=no
59332  fi
59333  # ..and contain a vc2010 project file
59334  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59335  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59336    { $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
59337$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59338    BUILD_FREETYPE=no
59339  fi
59340  # Now check if configure found a version of 'msbuild.exe'
59341  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59342    { $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
59343$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;}
59344    BUILD_FREETYPE=no
59345  fi
59346
59347  # Ready to go..
59348  if test "x$BUILD_FREETYPE" = xyes; then
59349    # msbuild requires trailing slashes for output directories
59350    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59351    freetype_lib_path_unix="$freetype_lib_path"
59352    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59353
59354  unix_path="$vcxproj_path"
59355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59356    windows_path=`$CYGPATH -m "$unix_path"`
59357    vcxproj_path="$windows_path"
59358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59359    windows_path=`cmd //c echo $unix_path`
59360    vcxproj_path="$windows_path"
59361  fi
59362
59363
59364  unix_path="$freetype_lib_path"
59365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59366    windows_path=`$CYGPATH -m "$unix_path"`
59367    freetype_lib_path="$windows_path"
59368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59369    windows_path=`cmd //c echo $unix_path`
59370    freetype_lib_path="$windows_path"
59371  fi
59372
59373
59374  unix_path="$freetype_obj_path"
59375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59376    windows_path=`$CYGPATH -m "$unix_path"`
59377    freetype_obj_path="$windows_path"
59378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59379    windows_path=`cmd //c echo $unix_path`
59380    freetype_obj_path="$windows_path"
59381  fi
59382
59383    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59384      freetype_platform=x64
59385    else
59386      freetype_platform=win32
59387    fi
59388
59389    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59390    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59391    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59392    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59393    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59394$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59395
59396    # First we try to build the freetype.dll
59397    $ECHO -e "@echo off\n"\
59398        "$MSBUILD $vcxproj_path "\
59399        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59400        "/p:Configuration=\"Release Multithreaded\" "\
59401        "/p:Platform=$freetype_platform "\
59402        "/p:ConfigurationType=DynamicLibrary "\
59403        "/p:TargetName=freetype "\
59404        "/p:OutDir=\"$freetype_lib_path\" "\
59405        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59406    cmd /c freetype.bat
59407
59408    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59409      # If that succeeds we also build freetype.lib
59410      $ECHO -e "@echo off\n"\
59411          "$MSBUILD $vcxproj_path "\
59412          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59413          "/p:Configuration=\"Release Multithreaded\" "\
59414          "/p:Platform=$freetype_platform "\
59415          "/p:ConfigurationType=StaticLibrary "\
59416          "/p:TargetName=freetype "\
59417          "/p:OutDir=\"$freetype_lib_path\" "\
59418          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59419      cmd /c freetype.bat
59420
59421      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59422        # Once we build both, lib and dll, set freetype lib and include path appropriately
59423        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59424        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59425        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59426$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59427      else
59428        BUILD_FREETYPE=no
59429      fi
59430    else
59431      BUILD_FREETYPE=no
59432    fi
59433  fi
59434
59435              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59436
59437  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59438  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59439  METHOD="well-known location"
59440
59441  # Let's start with an optimistic view of the world :-)
59442  FOUND_FREETYPE=yes
59443
59444  # First look for the canonical freetype main include file ft2build.h.
59445  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59446    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59447    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59448    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59449      # Fail.
59450      FOUND_FREETYPE=no
59451    fi
59452  fi
59453
59454  if test "x$FOUND_FREETYPE" = xyes; then
59455    # Include file found, let's continue the sanity check.
59456    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59457$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59458
59459    # Reset to default value
59460    FREETYPE_BASE_NAME=freetype
59461    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59462    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59463      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59464          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59465        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59466        # for the .6 version explicitly.
59467        FREETYPE_BASE_NAME=freetype.6
59468        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59469        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59470$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59471      else
59472        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59474        FOUND_FREETYPE=no
59475      fi
59476    else
59477      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59478        # On Windows, we will need both .lib and .dll file.
59479        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59480          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59482          FOUND_FREETYPE=no
59483        fi
59484      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59485          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59486        # Found lib in isa dir, use that instead.
59487        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59488        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59489$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59490      fi
59491    fi
59492  fi
59493
59494  if test "x$FOUND_FREETYPE" = xyes; then
59495
59496  # Only process if variable expands to non-empty
59497
59498  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59500
59501  # Input might be given as Windows format, start by converting to
59502  # unix format.
59503  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59504  new_path=`$CYGPATH -u "$path"`
59505
59506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59509  # "foo.exe" is OK but "foo" is an error.
59510  #
59511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59512  # It is also a way to make sure we got the proper file name for the real test later on.
59513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59514  if test "x$test_shortpath" = x; then
59515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59516$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59517    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59518  fi
59519
59520  # Call helper function which possibly converts this using DOS-style short mode.
59521  # If so, the updated path is stored in $new_path.
59522
59523  input_path="$new_path"
59524  # Check if we need to convert this using DOS-style short mode. If the path
59525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59526  # take no chances and rewrite it.
59527  # Note: m4 eats our [], so we need to use [ and ] instead.
59528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59529  if test "x$has_forbidden_chars" != x; then
59530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59534      # Going to short mode and back again did indeed matter. Since short mode is
59535      # case insensitive, let's make it lowercase to improve readability.
59536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59537      # Now convert it back to Unix-style (cygpath)
59538      input_path=`$CYGPATH -u "$shortmode_path"`
59539      new_path="$input_path"
59540    fi
59541  fi
59542
59543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59544  if test "x$test_cygdrive_prefix" = x; then
59545    # As a simple fix, exclude /usr/bin since it's not a real path.
59546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59548      # a path prefixed by /cygdrive for fixpath to work.
59549      new_path="$CYGWIN_ROOT_PATH$input_path"
59550    fi
59551  fi
59552
59553
59554  if test "x$path" != "x$new_path"; then
59555    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59557$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59558  fi
59559
59560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59561
59562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59563  has_colon=`$ECHO $path | $GREP ^.:`
59564  new_path="$path"
59565  if test "x$has_colon" = x; then
59566    # Not in mixed or Windows style, start by that.
59567    new_path=`cmd //c echo $path`
59568  fi
59569
59570
59571  input_path="$new_path"
59572  # Check if we need to convert this using DOS-style short mode. If the path
59573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59574  # take no chances and rewrite it.
59575  # Note: m4 eats our [], so we need to use [ and ] instead.
59576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59577  if test "x$has_forbidden_chars" != x; then
59578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59580  fi
59581
59582
59583  windows_path="$new_path"
59584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59585    unix_path=`$CYGPATH -u "$windows_path"`
59586    new_path="$unix_path"
59587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59589    new_path="$unix_path"
59590  fi
59591
59592  if test "x$path" != "x$new_path"; then
59593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59596  fi
59597
59598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59600
59601    else
59602      # We're on a unix platform. Hooray! :)
59603      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59604      has_space=`$ECHO "$path" | $GREP " "`
59605      if test "x$has_space" != x; then
59606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59608        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59609      fi
59610
59611      # Use eval to expand a potential ~
59612      eval path="$path"
59613      if test ! -f "$path" && test ! -d "$path"; then
59614        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59615      fi
59616
59617      if test -d "$path"; then
59618        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59619      else
59620        dir="`$DIRNAME "$path"`"
59621        base="`$BASENAME "$path"`"
59622        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59623      fi
59624    fi
59625  fi
59626
59627
59628  # Only process if variable expands to non-empty
59629
59630  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59632
59633  # Input might be given as Windows format, start by converting to
59634  # unix format.
59635  path="$POTENTIAL_FREETYPE_LIB_PATH"
59636  new_path=`$CYGPATH -u "$path"`
59637
59638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59641  # "foo.exe" is OK but "foo" is an error.
59642  #
59643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59644  # It is also a way to make sure we got the proper file name for the real test later on.
59645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59646  if test "x$test_shortpath" = x; then
59647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59649    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59650  fi
59651
59652  # Call helper function which possibly converts this using DOS-style short mode.
59653  # If so, the updated path is stored in $new_path.
59654
59655  input_path="$new_path"
59656  # Check if we need to convert this using DOS-style short mode. If the path
59657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59658  # take no chances and rewrite it.
59659  # Note: m4 eats our [], so we need to use [ and ] instead.
59660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59661  if test "x$has_forbidden_chars" != x; then
59662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59666      # Going to short mode and back again did indeed matter. Since short mode is
59667      # case insensitive, let's make it lowercase to improve readability.
59668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59669      # Now convert it back to Unix-style (cygpath)
59670      input_path=`$CYGPATH -u "$shortmode_path"`
59671      new_path="$input_path"
59672    fi
59673  fi
59674
59675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59676  if test "x$test_cygdrive_prefix" = x; then
59677    # As a simple fix, exclude /usr/bin since it's not a real path.
59678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59680      # a path prefixed by /cygdrive for fixpath to work.
59681      new_path="$CYGWIN_ROOT_PATH$input_path"
59682    fi
59683  fi
59684
59685
59686  if test "x$path" != "x$new_path"; then
59687    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59690  fi
59691
59692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59693
59694  path="$POTENTIAL_FREETYPE_LIB_PATH"
59695  has_colon=`$ECHO $path | $GREP ^.:`
59696  new_path="$path"
59697  if test "x$has_colon" = x; then
59698    # Not in mixed or Windows style, start by that.
59699    new_path=`cmd //c echo $path`
59700  fi
59701
59702
59703  input_path="$new_path"
59704  # Check if we need to convert this using DOS-style short mode. If the path
59705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59706  # take no chances and rewrite it.
59707  # Note: m4 eats our [], so we need to use [ and ] instead.
59708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59709  if test "x$has_forbidden_chars" != x; then
59710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59712  fi
59713
59714
59715  windows_path="$new_path"
59716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59717    unix_path=`$CYGPATH -u "$windows_path"`
59718    new_path="$unix_path"
59719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59721    new_path="$unix_path"
59722  fi
59723
59724  if test "x$path" != "x$new_path"; then
59725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59728  fi
59729
59730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59732
59733    else
59734      # We're on a unix platform. Hooray! :)
59735      path="$POTENTIAL_FREETYPE_LIB_PATH"
59736      has_space=`$ECHO "$path" | $GREP " "`
59737      if test "x$has_space" != x; then
59738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59741      fi
59742
59743      # Use eval to expand a potential ~
59744      eval path="$path"
59745      if test ! -f "$path" && test ! -d "$path"; then
59746        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59747      fi
59748
59749      if test -d "$path"; then
59750        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59751      else
59752        dir="`$DIRNAME "$path"`"
59753        base="`$BASENAME "$path"`"
59754        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59755      fi
59756    fi
59757  fi
59758
59759
59760    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59762$as_echo_n "checking for freetype includes... " >&6; }
59763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59764$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59765    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59767$as_echo_n "checking for freetype libraries... " >&6; }
59768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59769$as_echo "$FREETYPE_LIB_PATH" >&6; }
59770  fi
59771
59772              else
59773
59774  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59775  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59776  METHOD="well-known location"
59777
59778  # Let's start with an optimistic view of the world :-)
59779  FOUND_FREETYPE=yes
59780
59781  # First look for the canonical freetype main include file ft2build.h.
59782  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59783    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59784    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59785    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59786      # Fail.
59787      FOUND_FREETYPE=no
59788    fi
59789  fi
59790
59791  if test "x$FOUND_FREETYPE" = xyes; then
59792    # Include file found, let's continue the sanity check.
59793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59794$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59795
59796    # Reset to default value
59797    FREETYPE_BASE_NAME=freetype
59798    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59799    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59800      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59802        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59803        # for the .6 version explicitly.
59804        FREETYPE_BASE_NAME=freetype.6
59805        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59806        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59807$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59808      else
59809        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59811        FOUND_FREETYPE=no
59812      fi
59813    else
59814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59815        # On Windows, we will need both .lib and .dll file.
59816        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59817          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59819          FOUND_FREETYPE=no
59820        fi
59821      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59823        # Found lib in isa dir, use that instead.
59824        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59825        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59826$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59827      fi
59828    fi
59829  fi
59830
59831  if test "x$FOUND_FREETYPE" = xyes; then
59832
59833  # Only process if variable expands to non-empty
59834
59835  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59837
59838  # Input might be given as Windows format, start by converting to
59839  # unix format.
59840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59841  new_path=`$CYGPATH -u "$path"`
59842
59843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59846  # "foo.exe" is OK but "foo" is an error.
59847  #
59848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59849  # It is also a way to make sure we got the proper file name for the real test later on.
59850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59851  if test "x$test_shortpath" = x; then
59852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59855  fi
59856
59857  # Call helper function which possibly converts this using DOS-style short mode.
59858  # If so, the updated path is stored in $new_path.
59859
59860  input_path="$new_path"
59861  # Check if we need to convert this using DOS-style short mode. If the path
59862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59863  # take no chances and rewrite it.
59864  # Note: m4 eats our [], so we need to use [ and ] instead.
59865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59866  if test "x$has_forbidden_chars" != x; then
59867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59871      # Going to short mode and back again did indeed matter. Since short mode is
59872      # case insensitive, let's make it lowercase to improve readability.
59873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59874      # Now convert it back to Unix-style (cygpath)
59875      input_path=`$CYGPATH -u "$shortmode_path"`
59876      new_path="$input_path"
59877    fi
59878  fi
59879
59880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59881  if test "x$test_cygdrive_prefix" = x; then
59882    # As a simple fix, exclude /usr/bin since it's not a real path.
59883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59885      # a path prefixed by /cygdrive for fixpath to work.
59886      new_path="$CYGWIN_ROOT_PATH$input_path"
59887    fi
59888  fi
59889
59890
59891  if test "x$path" != "x$new_path"; then
59892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59895  fi
59896
59897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59898
59899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59900  has_colon=`$ECHO $path | $GREP ^.:`
59901  new_path="$path"
59902  if test "x$has_colon" = x; then
59903    # Not in mixed or Windows style, start by that.
59904    new_path=`cmd //c echo $path`
59905  fi
59906
59907
59908  input_path="$new_path"
59909  # Check if we need to convert this using DOS-style short mode. If the path
59910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59911  # take no chances and rewrite it.
59912  # Note: m4 eats our [], so we need to use [ and ] instead.
59913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59914  if test "x$has_forbidden_chars" != x; then
59915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59917  fi
59918
59919
59920  windows_path="$new_path"
59921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59922    unix_path=`$CYGPATH -u "$windows_path"`
59923    new_path="$unix_path"
59924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59926    new_path="$unix_path"
59927  fi
59928
59929  if test "x$path" != "x$new_path"; then
59930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59933  fi
59934
59935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59937
59938    else
59939      # We're on a unix platform. Hooray! :)
59940      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59941      has_space=`$ECHO "$path" | $GREP " "`
59942      if test "x$has_space" != x; then
59943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59946      fi
59947
59948      # Use eval to expand a potential ~
59949      eval path="$path"
59950      if test ! -f "$path" && test ! -d "$path"; then
59951        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59952      fi
59953
59954      if test -d "$path"; then
59955        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59956      else
59957        dir="`$DIRNAME "$path"`"
59958        base="`$BASENAME "$path"`"
59959        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59960      fi
59961    fi
59962  fi
59963
59964
59965  # Only process if variable expands to non-empty
59966
59967  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59969
59970  # Input might be given as Windows format, start by converting to
59971  # unix format.
59972  path="$POTENTIAL_FREETYPE_LIB_PATH"
59973  new_path=`$CYGPATH -u "$path"`
59974
59975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59978  # "foo.exe" is OK but "foo" is an error.
59979  #
59980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59981  # It is also a way to make sure we got the proper file name for the real test later on.
59982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59983  if test "x$test_shortpath" = x; then
59984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59986    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59987  fi
59988
59989  # Call helper function which possibly converts this using DOS-style short mode.
59990  # If so, the updated path is stored in $new_path.
59991
59992  input_path="$new_path"
59993  # Check if we need to convert this using DOS-style short mode. If the path
59994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59995  # take no chances and rewrite it.
59996  # Note: m4 eats our [], so we need to use [ and ] instead.
59997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59998  if test "x$has_forbidden_chars" != x; then
59999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60003      # Going to short mode and back again did indeed matter. Since short mode is
60004      # case insensitive, let's make it lowercase to improve readability.
60005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60006      # Now convert it back to Unix-style (cygpath)
60007      input_path=`$CYGPATH -u "$shortmode_path"`
60008      new_path="$input_path"
60009    fi
60010  fi
60011
60012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60013  if test "x$test_cygdrive_prefix" = x; then
60014    # As a simple fix, exclude /usr/bin since it's not a real path.
60015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60017      # a path prefixed by /cygdrive for fixpath to work.
60018      new_path="$CYGWIN_ROOT_PATH$input_path"
60019    fi
60020  fi
60021
60022
60023  if test "x$path" != "x$new_path"; then
60024    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60027  fi
60028
60029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60030
60031  path="$POTENTIAL_FREETYPE_LIB_PATH"
60032  has_colon=`$ECHO $path | $GREP ^.:`
60033  new_path="$path"
60034  if test "x$has_colon" = x; then
60035    # Not in mixed or Windows style, start by that.
60036    new_path=`cmd //c echo $path`
60037  fi
60038
60039
60040  input_path="$new_path"
60041  # Check if we need to convert this using DOS-style short mode. If the path
60042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60043  # take no chances and rewrite it.
60044  # Note: m4 eats our [], so we need to use [ and ] instead.
60045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60046  if test "x$has_forbidden_chars" != x; then
60047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60049  fi
60050
60051
60052  windows_path="$new_path"
60053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60054    unix_path=`$CYGPATH -u "$windows_path"`
60055    new_path="$unix_path"
60056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60058    new_path="$unix_path"
60059  fi
60060
60061  if test "x$path" != "x$new_path"; then
60062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60065  fi
60066
60067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60069
60070    else
60071      # We're on a unix platform. Hooray! :)
60072      path="$POTENTIAL_FREETYPE_LIB_PATH"
60073      has_space=`$ECHO "$path" | $GREP " "`
60074      if test "x$has_space" != x; then
60075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60078      fi
60079
60080      # Use eval to expand a potential ~
60081      eval path="$path"
60082      if test ! -f "$path" && test ! -d "$path"; then
60083        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60084      fi
60085
60086      if test -d "$path"; then
60087        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60088      else
60089        dir="`$DIRNAME "$path"`"
60090        base="`$BASENAME "$path"`"
60091        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60092      fi
60093    fi
60094  fi
60095
60096
60097    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60099$as_echo_n "checking for freetype includes... " >&6; }
60100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60101$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60102    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60104$as_echo_n "checking for freetype libraries... " >&6; }
60105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60106$as_echo "$FREETYPE_LIB_PATH" >&6; }
60107  fi
60108
60109              fi
60110            fi
60111          fi
60112        else
60113          FREETYPE_BASE_DIR="$SYSROOT/usr"
60114
60115  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60116  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60117  METHOD="well-known location"
60118
60119  # Let's start with an optimistic view of the world :-)
60120  FOUND_FREETYPE=yes
60121
60122  # First look for the canonical freetype main include file ft2build.h.
60123  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60124    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60125    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60126    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60127      # Fail.
60128      FOUND_FREETYPE=no
60129    fi
60130  fi
60131
60132  if test "x$FOUND_FREETYPE" = xyes; then
60133    # Include file found, let's continue the sanity check.
60134    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60135$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60136
60137    # Reset to default value
60138    FREETYPE_BASE_NAME=freetype
60139    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60140    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60141      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60143        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60144        # for the .6 version explicitly.
60145        FREETYPE_BASE_NAME=freetype.6
60146        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60147        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60148$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60149      else
60150        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60151$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60152        FOUND_FREETYPE=no
60153      fi
60154    else
60155      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60156        # On Windows, we will need both .lib and .dll file.
60157        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60158          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60159$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60160          FOUND_FREETYPE=no
60161        fi
60162      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60163          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60164        # Found lib in isa dir, use that instead.
60165        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60166        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60167$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60168      fi
60169    fi
60170  fi
60171
60172  if test "x$FOUND_FREETYPE" = xyes; then
60173
60174  # Only process if variable expands to non-empty
60175
60176  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60178
60179  # Input might be given as Windows format, start by converting to
60180  # unix format.
60181  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60182  new_path=`$CYGPATH -u "$path"`
60183
60184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60187  # "foo.exe" is OK but "foo" is an error.
60188  #
60189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60190  # It is also a way to make sure we got the proper file name for the real test later on.
60191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60192  if test "x$test_shortpath" = x; then
60193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60196  fi
60197
60198  # Call helper function which possibly converts this using DOS-style short mode.
60199  # If so, the updated path is stored in $new_path.
60200
60201  input_path="$new_path"
60202  # Check if we need to convert this using DOS-style short mode. If the path
60203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60204  # take no chances and rewrite it.
60205  # Note: m4 eats our [], so we need to use [ and ] instead.
60206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60207  if test "x$has_forbidden_chars" != x; then
60208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60212      # Going to short mode and back again did indeed matter. Since short mode is
60213      # case insensitive, let's make it lowercase to improve readability.
60214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60215      # Now convert it back to Unix-style (cygpath)
60216      input_path=`$CYGPATH -u "$shortmode_path"`
60217      new_path="$input_path"
60218    fi
60219  fi
60220
60221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60222  if test "x$test_cygdrive_prefix" = x; then
60223    # As a simple fix, exclude /usr/bin since it's not a real path.
60224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60226      # a path prefixed by /cygdrive for fixpath to work.
60227      new_path="$CYGWIN_ROOT_PATH$input_path"
60228    fi
60229  fi
60230
60231
60232  if test "x$path" != "x$new_path"; then
60233    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60236  fi
60237
60238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60239
60240  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60241  has_colon=`$ECHO $path | $GREP ^.:`
60242  new_path="$path"
60243  if test "x$has_colon" = x; then
60244    # Not in mixed or Windows style, start by that.
60245    new_path=`cmd //c echo $path`
60246  fi
60247
60248
60249  input_path="$new_path"
60250  # Check if we need to convert this using DOS-style short mode. If the path
60251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60252  # take no chances and rewrite it.
60253  # Note: m4 eats our [], so we need to use [ and ] instead.
60254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60255  if test "x$has_forbidden_chars" != x; then
60256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60258  fi
60259
60260
60261  windows_path="$new_path"
60262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60263    unix_path=`$CYGPATH -u "$windows_path"`
60264    new_path="$unix_path"
60265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60267    new_path="$unix_path"
60268  fi
60269
60270  if test "x$path" != "x$new_path"; then
60271    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60274  fi
60275
60276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60278
60279    else
60280      # We're on a unix platform. Hooray! :)
60281      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60282      has_space=`$ECHO "$path" | $GREP " "`
60283      if test "x$has_space" != x; then
60284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60287      fi
60288
60289      # Use eval to expand a potential ~
60290      eval path="$path"
60291      if test ! -f "$path" && test ! -d "$path"; then
60292        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60293      fi
60294
60295      if test -d "$path"; then
60296        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60297      else
60298        dir="`$DIRNAME "$path"`"
60299        base="`$BASENAME "$path"`"
60300        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60301      fi
60302    fi
60303  fi
60304
60305
60306  # Only process if variable expands to non-empty
60307
60308  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60310
60311  # Input might be given as Windows format, start by converting to
60312  # unix format.
60313  path="$POTENTIAL_FREETYPE_LIB_PATH"
60314  new_path=`$CYGPATH -u "$path"`
60315
60316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60319  # "foo.exe" is OK but "foo" is an error.
60320  #
60321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60322  # It is also a way to make sure we got the proper file name for the real test later on.
60323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60324  if test "x$test_shortpath" = x; then
60325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60327    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60328  fi
60329
60330  # Call helper function which possibly converts this using DOS-style short mode.
60331  # If so, the updated path is stored in $new_path.
60332
60333  input_path="$new_path"
60334  # Check if we need to convert this using DOS-style short mode. If the path
60335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60336  # take no chances and rewrite it.
60337  # Note: m4 eats our [], so we need to use [ and ] instead.
60338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60339  if test "x$has_forbidden_chars" != x; then
60340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60344      # Going to short mode and back again did indeed matter. Since short mode is
60345      # case insensitive, let's make it lowercase to improve readability.
60346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60347      # Now convert it back to Unix-style (cygpath)
60348      input_path=`$CYGPATH -u "$shortmode_path"`
60349      new_path="$input_path"
60350    fi
60351  fi
60352
60353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60354  if test "x$test_cygdrive_prefix" = x; then
60355    # As a simple fix, exclude /usr/bin since it's not a real path.
60356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60358      # a path prefixed by /cygdrive for fixpath to work.
60359      new_path="$CYGWIN_ROOT_PATH$input_path"
60360    fi
60361  fi
60362
60363
60364  if test "x$path" != "x$new_path"; then
60365    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60368  fi
60369
60370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60371
60372  path="$POTENTIAL_FREETYPE_LIB_PATH"
60373  has_colon=`$ECHO $path | $GREP ^.:`
60374  new_path="$path"
60375  if test "x$has_colon" = x; then
60376    # Not in mixed or Windows style, start by that.
60377    new_path=`cmd //c echo $path`
60378  fi
60379
60380
60381  input_path="$new_path"
60382  # Check if we need to convert this using DOS-style short mode. If the path
60383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60384  # take no chances and rewrite it.
60385  # Note: m4 eats our [], so we need to use [ and ] instead.
60386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60387  if test "x$has_forbidden_chars" != x; then
60388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60390  fi
60391
60392
60393  windows_path="$new_path"
60394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60395    unix_path=`$CYGPATH -u "$windows_path"`
60396    new_path="$unix_path"
60397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60399    new_path="$unix_path"
60400  fi
60401
60402  if test "x$path" != "x$new_path"; then
60403    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60405$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60406  fi
60407
60408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60410
60411    else
60412      # We're on a unix platform. Hooray! :)
60413      path="$POTENTIAL_FREETYPE_LIB_PATH"
60414      has_space=`$ECHO "$path" | $GREP " "`
60415      if test "x$has_space" != x; then
60416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60417$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60419      fi
60420
60421      # Use eval to expand a potential ~
60422      eval path="$path"
60423      if test ! -f "$path" && test ! -d "$path"; then
60424        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60425      fi
60426
60427      if test -d "$path"; then
60428        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60429      else
60430        dir="`$DIRNAME "$path"`"
60431        base="`$BASENAME "$path"`"
60432        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60433      fi
60434    fi
60435  fi
60436
60437
60438    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60440$as_echo_n "checking for freetype includes... " >&6; }
60441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60442$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60443    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60445$as_echo_n "checking for freetype libraries... " >&6; }
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60447$as_echo "$FREETYPE_LIB_PATH" >&6; }
60448  fi
60449
60450
60451          if test "x$FOUND_FREETYPE" != xyes; then
60452            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60453
60454  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60455  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60456  METHOD="well-known location"
60457
60458  # Let's start with an optimistic view of the world :-)
60459  FOUND_FREETYPE=yes
60460
60461  # First look for the canonical freetype main include file ft2build.h.
60462  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60463    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60464    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60465    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60466      # Fail.
60467      FOUND_FREETYPE=no
60468    fi
60469  fi
60470
60471  if test "x$FOUND_FREETYPE" = xyes; then
60472    # Include file found, let's continue the sanity check.
60473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60474$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60475
60476    # Reset to default value
60477    FREETYPE_BASE_NAME=freetype
60478    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60479    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60480      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60481          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60482        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60483        # for the .6 version explicitly.
60484        FREETYPE_BASE_NAME=freetype.6
60485        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60486        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60487$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60488      else
60489        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60491        FOUND_FREETYPE=no
60492      fi
60493    else
60494      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60495        # On Windows, we will need both .lib and .dll file.
60496        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60497          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60499          FOUND_FREETYPE=no
60500        fi
60501      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60503        # Found lib in isa dir, use that instead.
60504        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60505        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60506$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60507      fi
60508    fi
60509  fi
60510
60511  if test "x$FOUND_FREETYPE" = xyes; then
60512
60513  # Only process if variable expands to non-empty
60514
60515  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60517
60518  # Input might be given as Windows format, start by converting to
60519  # unix format.
60520  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60521  new_path=`$CYGPATH -u "$path"`
60522
60523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60526  # "foo.exe" is OK but "foo" is an error.
60527  #
60528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60529  # It is also a way to make sure we got the proper file name for the real test later on.
60530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60531  if test "x$test_shortpath" = x; then
60532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60534    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60535  fi
60536
60537  # Call helper function which possibly converts this using DOS-style short mode.
60538  # If so, the updated path is stored in $new_path.
60539
60540  input_path="$new_path"
60541  # Check if we need to convert this using DOS-style short mode. If the path
60542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60543  # take no chances and rewrite it.
60544  # Note: m4 eats our [], so we need to use [ and ] instead.
60545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60546  if test "x$has_forbidden_chars" != x; then
60547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60551      # Going to short mode and back again did indeed matter. Since short mode is
60552      # case insensitive, let's make it lowercase to improve readability.
60553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60554      # Now convert it back to Unix-style (cygpath)
60555      input_path=`$CYGPATH -u "$shortmode_path"`
60556      new_path="$input_path"
60557    fi
60558  fi
60559
60560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60561  if test "x$test_cygdrive_prefix" = x; then
60562    # As a simple fix, exclude /usr/bin since it's not a real path.
60563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60565      # a path prefixed by /cygdrive for fixpath to work.
60566      new_path="$CYGWIN_ROOT_PATH$input_path"
60567    fi
60568  fi
60569
60570
60571  if test "x$path" != "x$new_path"; then
60572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60575  fi
60576
60577    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60578
60579  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60580  has_colon=`$ECHO $path | $GREP ^.:`
60581  new_path="$path"
60582  if test "x$has_colon" = x; then
60583    # Not in mixed or Windows style, start by that.
60584    new_path=`cmd //c echo $path`
60585  fi
60586
60587
60588  input_path="$new_path"
60589  # Check if we need to convert this using DOS-style short mode. If the path
60590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60591  # take no chances and rewrite it.
60592  # Note: m4 eats our [], so we need to use [ and ] instead.
60593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60594  if test "x$has_forbidden_chars" != x; then
60595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60597  fi
60598
60599
60600  windows_path="$new_path"
60601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60602    unix_path=`$CYGPATH -u "$windows_path"`
60603    new_path="$unix_path"
60604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60606    new_path="$unix_path"
60607  fi
60608
60609  if test "x$path" != "x$new_path"; then
60610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60613  fi
60614
60615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60617
60618    else
60619      # We're on a unix platform. Hooray! :)
60620      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60621      has_space=`$ECHO "$path" | $GREP " "`
60622      if test "x$has_space" != x; then
60623        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60625        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60626      fi
60627
60628      # Use eval to expand a potential ~
60629      eval path="$path"
60630      if test ! -f "$path" && test ! -d "$path"; then
60631        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60632      fi
60633
60634      if test -d "$path"; then
60635        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60636      else
60637        dir="`$DIRNAME "$path"`"
60638        base="`$BASENAME "$path"`"
60639        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60640      fi
60641    fi
60642  fi
60643
60644
60645  # Only process if variable expands to non-empty
60646
60647  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60649
60650  # Input might be given as Windows format, start by converting to
60651  # unix format.
60652  path="$POTENTIAL_FREETYPE_LIB_PATH"
60653  new_path=`$CYGPATH -u "$path"`
60654
60655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60658  # "foo.exe" is OK but "foo" is an error.
60659  #
60660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60661  # It is also a way to make sure we got the proper file name for the real test later on.
60662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60663  if test "x$test_shortpath" = x; then
60664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60666    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60667  fi
60668
60669  # Call helper function which possibly converts this using DOS-style short mode.
60670  # If so, the updated path is stored in $new_path.
60671
60672  input_path="$new_path"
60673  # Check if we need to convert this using DOS-style short mode. If the path
60674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60675  # take no chances and rewrite it.
60676  # Note: m4 eats our [], so we need to use [ and ] instead.
60677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60678  if test "x$has_forbidden_chars" != x; then
60679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60683      # Going to short mode and back again did indeed matter. Since short mode is
60684      # case insensitive, let's make it lowercase to improve readability.
60685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60686      # Now convert it back to Unix-style (cygpath)
60687      input_path=`$CYGPATH -u "$shortmode_path"`
60688      new_path="$input_path"
60689    fi
60690  fi
60691
60692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60693  if test "x$test_cygdrive_prefix" = x; then
60694    # As a simple fix, exclude /usr/bin since it's not a real path.
60695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60697      # a path prefixed by /cygdrive for fixpath to work.
60698      new_path="$CYGWIN_ROOT_PATH$input_path"
60699    fi
60700  fi
60701
60702
60703  if test "x$path" != "x$new_path"; then
60704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60707  fi
60708
60709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60710
60711  path="$POTENTIAL_FREETYPE_LIB_PATH"
60712  has_colon=`$ECHO $path | $GREP ^.:`
60713  new_path="$path"
60714  if test "x$has_colon" = x; then
60715    # Not in mixed or Windows style, start by that.
60716    new_path=`cmd //c echo $path`
60717  fi
60718
60719
60720  input_path="$new_path"
60721  # Check if we need to convert this using DOS-style short mode. If the path
60722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60723  # take no chances and rewrite it.
60724  # Note: m4 eats our [], so we need to use [ and ] instead.
60725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60726  if test "x$has_forbidden_chars" != x; then
60727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60729  fi
60730
60731
60732  windows_path="$new_path"
60733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60734    unix_path=`$CYGPATH -u "$windows_path"`
60735    new_path="$unix_path"
60736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60738    new_path="$unix_path"
60739  fi
60740
60741  if test "x$path" != "x$new_path"; then
60742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60745  fi
60746
60747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60749
60750    else
60751      # We're on a unix platform. Hooray! :)
60752      path="$POTENTIAL_FREETYPE_LIB_PATH"
60753      has_space=`$ECHO "$path" | $GREP " "`
60754      if test "x$has_space" != x; then
60755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60758      fi
60759
60760      # Use eval to expand a potential ~
60761      eval path="$path"
60762      if test ! -f "$path" && test ! -d "$path"; then
60763        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60764      fi
60765
60766      if test -d "$path"; then
60767        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60768      else
60769        dir="`$DIRNAME "$path"`"
60770        base="`$BASENAME "$path"`"
60771        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60772      fi
60773    fi
60774  fi
60775
60776
60777    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60779$as_echo_n "checking for freetype includes... " >&6; }
60780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60781$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60782    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60784$as_echo_n "checking for freetype libraries... " >&6; }
60785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60786$as_echo "$FREETYPE_LIB_PATH" >&6; }
60787  fi
60788
60789          fi
60790          if test "x$FOUND_FREETYPE" != xyes; then
60791            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60792
60793  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60794  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60795  METHOD="well-known location"
60796
60797  # Let's start with an optimistic view of the world :-)
60798  FOUND_FREETYPE=yes
60799
60800  # First look for the canonical freetype main include file ft2build.h.
60801  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60802    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60803    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60804    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60805      # Fail.
60806      FOUND_FREETYPE=no
60807    fi
60808  fi
60809
60810  if test "x$FOUND_FREETYPE" = xyes; then
60811    # Include file found, let's continue the sanity check.
60812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60813$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60814
60815    # Reset to default value
60816    FREETYPE_BASE_NAME=freetype
60817    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60818    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60819      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60820          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60821        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60822        # for the .6 version explicitly.
60823        FREETYPE_BASE_NAME=freetype.6
60824        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60825        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60826$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60827      else
60828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60830        FOUND_FREETYPE=no
60831      fi
60832    else
60833      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60834        # On Windows, we will need both .lib and .dll file.
60835        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60836          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60837$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60838          FOUND_FREETYPE=no
60839        fi
60840      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60841          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60842        # Found lib in isa dir, use that instead.
60843        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60844        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60845$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60846      fi
60847    fi
60848  fi
60849
60850  if test "x$FOUND_FREETYPE" = xyes; then
60851
60852  # Only process if variable expands to non-empty
60853
60854  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60856
60857  # Input might be given as Windows format, start by converting to
60858  # unix format.
60859  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60860  new_path=`$CYGPATH -u "$path"`
60861
60862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60865  # "foo.exe" is OK but "foo" is an error.
60866  #
60867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60868  # It is also a way to make sure we got the proper file name for the real test later on.
60869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60870  if test "x$test_shortpath" = x; then
60871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60873    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60874  fi
60875
60876  # Call helper function which possibly converts this using DOS-style short mode.
60877  # If so, the updated path is stored in $new_path.
60878
60879  input_path="$new_path"
60880  # Check if we need to convert this using DOS-style short mode. If the path
60881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60882  # take no chances and rewrite it.
60883  # Note: m4 eats our [], so we need to use [ and ] instead.
60884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60885  if test "x$has_forbidden_chars" != x; then
60886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60890      # Going to short mode and back again did indeed matter. Since short mode is
60891      # case insensitive, let's make it lowercase to improve readability.
60892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60893      # Now convert it back to Unix-style (cygpath)
60894      input_path=`$CYGPATH -u "$shortmode_path"`
60895      new_path="$input_path"
60896    fi
60897  fi
60898
60899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60900  if test "x$test_cygdrive_prefix" = x; then
60901    # As a simple fix, exclude /usr/bin since it's not a real path.
60902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60904      # a path prefixed by /cygdrive for fixpath to work.
60905      new_path="$CYGWIN_ROOT_PATH$input_path"
60906    fi
60907  fi
60908
60909
60910  if test "x$path" != "x$new_path"; then
60911    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60914  fi
60915
60916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60917
60918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60919  has_colon=`$ECHO $path | $GREP ^.:`
60920  new_path="$path"
60921  if test "x$has_colon" = x; then
60922    # Not in mixed or Windows style, start by that.
60923    new_path=`cmd //c echo $path`
60924  fi
60925
60926
60927  input_path="$new_path"
60928  # Check if we need to convert this using DOS-style short mode. If the path
60929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60930  # take no chances and rewrite it.
60931  # Note: m4 eats our [], so we need to use [ and ] instead.
60932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60933  if test "x$has_forbidden_chars" != x; then
60934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60936  fi
60937
60938
60939  windows_path="$new_path"
60940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60941    unix_path=`$CYGPATH -u "$windows_path"`
60942    new_path="$unix_path"
60943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60945    new_path="$unix_path"
60946  fi
60947
60948  if test "x$path" != "x$new_path"; then
60949    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60952  fi
60953
60954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60956
60957    else
60958      # We're on a unix platform. Hooray! :)
60959      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60960      has_space=`$ECHO "$path" | $GREP " "`
60961      if test "x$has_space" != x; then
60962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60965      fi
60966
60967      # Use eval to expand a potential ~
60968      eval path="$path"
60969      if test ! -f "$path" && test ! -d "$path"; then
60970        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60971      fi
60972
60973      if test -d "$path"; then
60974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60975      else
60976        dir="`$DIRNAME "$path"`"
60977        base="`$BASENAME "$path"`"
60978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60979      fi
60980    fi
60981  fi
60982
60983
60984  # Only process if variable expands to non-empty
60985
60986  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60988
60989  # Input might be given as Windows format, start by converting to
60990  # unix format.
60991  path="$POTENTIAL_FREETYPE_LIB_PATH"
60992  new_path=`$CYGPATH -u "$path"`
60993
60994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60997  # "foo.exe" is OK but "foo" is an error.
60998  #
60999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61000  # It is also a way to make sure we got the proper file name for the real test later on.
61001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61002  if test "x$test_shortpath" = x; then
61003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61005    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61006  fi
61007
61008  # Call helper function which possibly converts this using DOS-style short mode.
61009  # If so, the updated path is stored in $new_path.
61010
61011  input_path="$new_path"
61012  # Check if we need to convert this using DOS-style short mode. If the path
61013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61014  # take no chances and rewrite it.
61015  # Note: m4 eats our [], so we need to use [ and ] instead.
61016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61017  if test "x$has_forbidden_chars" != x; then
61018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61022      # Going to short mode and back again did indeed matter. Since short mode is
61023      # case insensitive, let's make it lowercase to improve readability.
61024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61025      # Now convert it back to Unix-style (cygpath)
61026      input_path=`$CYGPATH -u "$shortmode_path"`
61027      new_path="$input_path"
61028    fi
61029  fi
61030
61031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61032  if test "x$test_cygdrive_prefix" = x; then
61033    # As a simple fix, exclude /usr/bin since it's not a real path.
61034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61036      # a path prefixed by /cygdrive for fixpath to work.
61037      new_path="$CYGWIN_ROOT_PATH$input_path"
61038    fi
61039  fi
61040
61041
61042  if test "x$path" != "x$new_path"; then
61043    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61046  fi
61047
61048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61049
61050  path="$POTENTIAL_FREETYPE_LIB_PATH"
61051  has_colon=`$ECHO $path | $GREP ^.:`
61052  new_path="$path"
61053  if test "x$has_colon" = x; then
61054    # Not in mixed or Windows style, start by that.
61055    new_path=`cmd //c echo $path`
61056  fi
61057
61058
61059  input_path="$new_path"
61060  # Check if we need to convert this using DOS-style short mode. If the path
61061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61062  # take no chances and rewrite it.
61063  # Note: m4 eats our [], so we need to use [ and ] instead.
61064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61065  if test "x$has_forbidden_chars" != x; then
61066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61068  fi
61069
61070
61071  windows_path="$new_path"
61072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61073    unix_path=`$CYGPATH -u "$windows_path"`
61074    new_path="$unix_path"
61075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61077    new_path="$unix_path"
61078  fi
61079
61080  if test "x$path" != "x$new_path"; then
61081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61084  fi
61085
61086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61088
61089    else
61090      # We're on a unix platform. Hooray! :)
61091      path="$POTENTIAL_FREETYPE_LIB_PATH"
61092      has_space=`$ECHO "$path" | $GREP " "`
61093      if test "x$has_space" != x; then
61094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61097      fi
61098
61099      # Use eval to expand a potential ~
61100      eval path="$path"
61101      if test ! -f "$path" && test ! -d "$path"; then
61102        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61103      fi
61104
61105      if test -d "$path"; then
61106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61107      else
61108        dir="`$DIRNAME "$path"`"
61109        base="`$BASENAME "$path"`"
61110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61111      fi
61112    fi
61113  fi
61114
61115
61116    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61118$as_echo_n "checking for freetype includes... " >&6; }
61119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61120$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61121    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61123$as_echo_n "checking for freetype libraries... " >&6; }
61124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61125$as_echo "$FREETYPE_LIB_PATH" >&6; }
61126  fi
61127
61128          fi
61129
61130          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61131            if test "x$FOUND_FREETYPE" != xyes; then
61132              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61133              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61134
61135  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61136  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61137  METHOD="well-known location"
61138
61139  # Let's start with an optimistic view of the world :-)
61140  FOUND_FREETYPE=yes
61141
61142  # First look for the canonical freetype main include file ft2build.h.
61143  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61144    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61145    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61146    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61147      # Fail.
61148      FOUND_FREETYPE=no
61149    fi
61150  fi
61151
61152  if test "x$FOUND_FREETYPE" = xyes; then
61153    # Include file found, let's continue the sanity check.
61154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61155$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61156
61157    # Reset to default value
61158    FREETYPE_BASE_NAME=freetype
61159    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61160    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61161      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61162          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61163        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61164        # for the .6 version explicitly.
61165        FREETYPE_BASE_NAME=freetype.6
61166        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61167        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61168$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61169      else
61170        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61172        FOUND_FREETYPE=no
61173      fi
61174    else
61175      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61176        # On Windows, we will need both .lib and .dll file.
61177        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61178          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61179$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61180          FOUND_FREETYPE=no
61181        fi
61182      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61183          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61184        # Found lib in isa dir, use that instead.
61185        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61186        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61187$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61188      fi
61189    fi
61190  fi
61191
61192  if test "x$FOUND_FREETYPE" = xyes; then
61193
61194  # Only process if variable expands to non-empty
61195
61196  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61198
61199  # Input might be given as Windows format, start by converting to
61200  # unix format.
61201  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61202  new_path=`$CYGPATH -u "$path"`
61203
61204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61207  # "foo.exe" is OK but "foo" is an error.
61208  #
61209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61210  # It is also a way to make sure we got the proper file name for the real test later on.
61211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61212  if test "x$test_shortpath" = x; then
61213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61215    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61216  fi
61217
61218  # Call helper function which possibly converts this using DOS-style short mode.
61219  # If so, the updated path is stored in $new_path.
61220
61221  input_path="$new_path"
61222  # Check if we need to convert this using DOS-style short mode. If the path
61223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61224  # take no chances and rewrite it.
61225  # Note: m4 eats our [], so we need to use [ and ] instead.
61226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61227  if test "x$has_forbidden_chars" != x; then
61228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61232      # Going to short mode and back again did indeed matter. Since short mode is
61233      # case insensitive, let's make it lowercase to improve readability.
61234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61235      # Now convert it back to Unix-style (cygpath)
61236      input_path=`$CYGPATH -u "$shortmode_path"`
61237      new_path="$input_path"
61238    fi
61239  fi
61240
61241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61242  if test "x$test_cygdrive_prefix" = x; then
61243    # As a simple fix, exclude /usr/bin since it's not a real path.
61244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61246      # a path prefixed by /cygdrive for fixpath to work.
61247      new_path="$CYGWIN_ROOT_PATH$input_path"
61248    fi
61249  fi
61250
61251
61252  if test "x$path" != "x$new_path"; then
61253    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61256  fi
61257
61258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61259
61260  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61261  has_colon=`$ECHO $path | $GREP ^.:`
61262  new_path="$path"
61263  if test "x$has_colon" = x; then
61264    # Not in mixed or Windows style, start by that.
61265    new_path=`cmd //c echo $path`
61266  fi
61267
61268
61269  input_path="$new_path"
61270  # Check if we need to convert this using DOS-style short mode. If the path
61271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61272  # take no chances and rewrite it.
61273  # Note: m4 eats our [], so we need to use [ and ] instead.
61274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61275  if test "x$has_forbidden_chars" != x; then
61276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61278  fi
61279
61280
61281  windows_path="$new_path"
61282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61283    unix_path=`$CYGPATH -u "$windows_path"`
61284    new_path="$unix_path"
61285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61287    new_path="$unix_path"
61288  fi
61289
61290  if test "x$path" != "x$new_path"; then
61291    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61294  fi
61295
61296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61298
61299    else
61300      # We're on a unix platform. Hooray! :)
61301      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61302      has_space=`$ECHO "$path" | $GREP " "`
61303      if test "x$has_space" != x; then
61304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61307      fi
61308
61309      # Use eval to expand a potential ~
61310      eval path="$path"
61311      if test ! -f "$path" && test ! -d "$path"; then
61312        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61313      fi
61314
61315      if test -d "$path"; then
61316        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61317      else
61318        dir="`$DIRNAME "$path"`"
61319        base="`$BASENAME "$path"`"
61320        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61321      fi
61322    fi
61323  fi
61324
61325
61326  # Only process if variable expands to non-empty
61327
61328  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61330
61331  # Input might be given as Windows format, start by converting to
61332  # unix format.
61333  path="$POTENTIAL_FREETYPE_LIB_PATH"
61334  new_path=`$CYGPATH -u "$path"`
61335
61336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61339  # "foo.exe" is OK but "foo" is an error.
61340  #
61341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61342  # It is also a way to make sure we got the proper file name for the real test later on.
61343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61344  if test "x$test_shortpath" = x; then
61345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61346$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61347    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61348  fi
61349
61350  # Call helper function which possibly converts this using DOS-style short mode.
61351  # If so, the updated path is stored in $new_path.
61352
61353  input_path="$new_path"
61354  # Check if we need to convert this using DOS-style short mode. If the path
61355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61356  # take no chances and rewrite it.
61357  # Note: m4 eats our [], so we need to use [ and ] instead.
61358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61359  if test "x$has_forbidden_chars" != x; then
61360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61364      # Going to short mode and back again did indeed matter. Since short mode is
61365      # case insensitive, let's make it lowercase to improve readability.
61366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61367      # Now convert it back to Unix-style (cygpath)
61368      input_path=`$CYGPATH -u "$shortmode_path"`
61369      new_path="$input_path"
61370    fi
61371  fi
61372
61373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61374  if test "x$test_cygdrive_prefix" = x; then
61375    # As a simple fix, exclude /usr/bin since it's not a real path.
61376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61378      # a path prefixed by /cygdrive for fixpath to work.
61379      new_path="$CYGWIN_ROOT_PATH$input_path"
61380    fi
61381  fi
61382
61383
61384  if test "x$path" != "x$new_path"; then
61385    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61387$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61388  fi
61389
61390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61391
61392  path="$POTENTIAL_FREETYPE_LIB_PATH"
61393  has_colon=`$ECHO $path | $GREP ^.:`
61394  new_path="$path"
61395  if test "x$has_colon" = x; then
61396    # Not in mixed or Windows style, start by that.
61397    new_path=`cmd //c echo $path`
61398  fi
61399
61400
61401  input_path="$new_path"
61402  # Check if we need to convert this using DOS-style short mode. If the path
61403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61404  # take no chances and rewrite it.
61405  # Note: m4 eats our [], so we need to use [ and ] instead.
61406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61407  if test "x$has_forbidden_chars" != x; then
61408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61410  fi
61411
61412
61413  windows_path="$new_path"
61414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61415    unix_path=`$CYGPATH -u "$windows_path"`
61416    new_path="$unix_path"
61417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61419    new_path="$unix_path"
61420  fi
61421
61422  if test "x$path" != "x$new_path"; then
61423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61426  fi
61427
61428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61430
61431    else
61432      # We're on a unix platform. Hooray! :)
61433      path="$POTENTIAL_FREETYPE_LIB_PATH"
61434      has_space=`$ECHO "$path" | $GREP " "`
61435      if test "x$has_space" != x; then
61436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61438        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61439      fi
61440
61441      # Use eval to expand a potential ~
61442      eval path="$path"
61443      if test ! -f "$path" && test ! -d "$path"; then
61444        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61445      fi
61446
61447      if test -d "$path"; then
61448        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61449      else
61450        dir="`$DIRNAME "$path"`"
61451        base="`$BASENAME "$path"`"
61452        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61453      fi
61454    fi
61455  fi
61456
61457
61458    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61460$as_echo_n "checking for freetype includes... " >&6; }
61461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61462$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61463    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61465$as_echo_n "checking for freetype libraries... " >&6; }
61466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61467$as_echo "$FREETYPE_LIB_PATH" >&6; }
61468  fi
61469
61470            fi
61471          fi
61472
61473          if test "x$FOUND_FREETYPE" != xyes; then
61474            FREETYPE_BASE_DIR="$SYSROOT/usr"
61475            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61476
61477  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61478  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61479  METHOD="well-known location"
61480
61481  # Let's start with an optimistic view of the world :-)
61482  FOUND_FREETYPE=yes
61483
61484  # First look for the canonical freetype main include file ft2build.h.
61485  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61486    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61487    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61488    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61489      # Fail.
61490      FOUND_FREETYPE=no
61491    fi
61492  fi
61493
61494  if test "x$FOUND_FREETYPE" = xyes; then
61495    # Include file found, let's continue the sanity check.
61496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61497$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61498
61499    # Reset to default value
61500    FREETYPE_BASE_NAME=freetype
61501    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61502    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61503      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61505        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61506        # for the .6 version explicitly.
61507        FREETYPE_BASE_NAME=freetype.6
61508        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61509        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61510$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61511      else
61512        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61513$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61514        FOUND_FREETYPE=no
61515      fi
61516    else
61517      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61518        # On Windows, we will need both .lib and .dll file.
61519        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61520          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61521$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61522          FOUND_FREETYPE=no
61523        fi
61524      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61526        # Found lib in isa dir, use that instead.
61527        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61528        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61529$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61530      fi
61531    fi
61532  fi
61533
61534  if test "x$FOUND_FREETYPE" = xyes; then
61535
61536  # Only process if variable expands to non-empty
61537
61538  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61540
61541  # Input might be given as Windows format, start by converting to
61542  # unix format.
61543  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61544  new_path=`$CYGPATH -u "$path"`
61545
61546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61549  # "foo.exe" is OK but "foo" is an error.
61550  #
61551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61552  # It is also a way to make sure we got the proper file name for the real test later on.
61553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61554  if test "x$test_shortpath" = x; then
61555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61558  fi
61559
61560  # Call helper function which possibly converts this using DOS-style short mode.
61561  # If so, the updated path is stored in $new_path.
61562
61563  input_path="$new_path"
61564  # Check if we need to convert this using DOS-style short mode. If the path
61565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61566  # take no chances and rewrite it.
61567  # Note: m4 eats our [], so we need to use [ and ] instead.
61568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61569  if test "x$has_forbidden_chars" != x; then
61570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61574      # Going to short mode and back again did indeed matter. Since short mode is
61575      # case insensitive, let's make it lowercase to improve readability.
61576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61577      # Now convert it back to Unix-style (cygpath)
61578      input_path=`$CYGPATH -u "$shortmode_path"`
61579      new_path="$input_path"
61580    fi
61581  fi
61582
61583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61584  if test "x$test_cygdrive_prefix" = x; then
61585    # As a simple fix, exclude /usr/bin since it's not a real path.
61586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61588      # a path prefixed by /cygdrive for fixpath to work.
61589      new_path="$CYGWIN_ROOT_PATH$input_path"
61590    fi
61591  fi
61592
61593
61594  if test "x$path" != "x$new_path"; then
61595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61598  fi
61599
61600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61601
61602  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61603  has_colon=`$ECHO $path | $GREP ^.:`
61604  new_path="$path"
61605  if test "x$has_colon" = x; then
61606    # Not in mixed or Windows style, start by that.
61607    new_path=`cmd //c echo $path`
61608  fi
61609
61610
61611  input_path="$new_path"
61612  # Check if we need to convert this using DOS-style short mode. If the path
61613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61614  # take no chances and rewrite it.
61615  # Note: m4 eats our [], so we need to use [ and ] instead.
61616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61617  if test "x$has_forbidden_chars" != x; then
61618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61620  fi
61621
61622
61623  windows_path="$new_path"
61624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61625    unix_path=`$CYGPATH -u "$windows_path"`
61626    new_path="$unix_path"
61627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61629    new_path="$unix_path"
61630  fi
61631
61632  if test "x$path" != "x$new_path"; then
61633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61636  fi
61637
61638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61640
61641    else
61642      # We're on a unix platform. Hooray! :)
61643      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61644      has_space=`$ECHO "$path" | $GREP " "`
61645      if test "x$has_space" != x; then
61646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61649      fi
61650
61651      # Use eval to expand a potential ~
61652      eval path="$path"
61653      if test ! -f "$path" && test ! -d "$path"; then
61654        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61655      fi
61656
61657      if test -d "$path"; then
61658        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61659      else
61660        dir="`$DIRNAME "$path"`"
61661        base="`$BASENAME "$path"`"
61662        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61663      fi
61664    fi
61665  fi
61666
61667
61668  # Only process if variable expands to non-empty
61669
61670  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61672
61673  # Input might be given as Windows format, start by converting to
61674  # unix format.
61675  path="$POTENTIAL_FREETYPE_LIB_PATH"
61676  new_path=`$CYGPATH -u "$path"`
61677
61678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61681  # "foo.exe" is OK but "foo" is an error.
61682  #
61683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61684  # It is also a way to make sure we got the proper file name for the real test later on.
61685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61686  if test "x$test_shortpath" = x; then
61687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61690  fi
61691
61692  # Call helper function which possibly converts this using DOS-style short mode.
61693  # If so, the updated path is stored in $new_path.
61694
61695  input_path="$new_path"
61696  # Check if we need to convert this using DOS-style short mode. If the path
61697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61698  # take no chances and rewrite it.
61699  # Note: m4 eats our [], so we need to use [ and ] instead.
61700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61701  if test "x$has_forbidden_chars" != x; then
61702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61706      # Going to short mode and back again did indeed matter. Since short mode is
61707      # case insensitive, let's make it lowercase to improve readability.
61708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61709      # Now convert it back to Unix-style (cygpath)
61710      input_path=`$CYGPATH -u "$shortmode_path"`
61711      new_path="$input_path"
61712    fi
61713  fi
61714
61715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61716  if test "x$test_cygdrive_prefix" = x; then
61717    # As a simple fix, exclude /usr/bin since it's not a real path.
61718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61720      # a path prefixed by /cygdrive for fixpath to work.
61721      new_path="$CYGWIN_ROOT_PATH$input_path"
61722    fi
61723  fi
61724
61725
61726  if test "x$path" != "x$new_path"; then
61727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61730  fi
61731
61732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61733
61734  path="$POTENTIAL_FREETYPE_LIB_PATH"
61735  has_colon=`$ECHO $path | $GREP ^.:`
61736  new_path="$path"
61737  if test "x$has_colon" = x; then
61738    # Not in mixed or Windows style, start by that.
61739    new_path=`cmd //c echo $path`
61740  fi
61741
61742
61743  input_path="$new_path"
61744  # Check if we need to convert this using DOS-style short mode. If the path
61745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61746  # take no chances and rewrite it.
61747  # Note: m4 eats our [], so we need to use [ and ] instead.
61748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61749  if test "x$has_forbidden_chars" != x; then
61750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61752  fi
61753
61754
61755  windows_path="$new_path"
61756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61757    unix_path=`$CYGPATH -u "$windows_path"`
61758    new_path="$unix_path"
61759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61761    new_path="$unix_path"
61762  fi
61763
61764  if test "x$path" != "x$new_path"; then
61765    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61768  fi
61769
61770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61772
61773    else
61774      # We're on a unix platform. Hooray! :)
61775      path="$POTENTIAL_FREETYPE_LIB_PATH"
61776      has_space=`$ECHO "$path" | $GREP " "`
61777      if test "x$has_space" != x; then
61778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61781      fi
61782
61783      # Use eval to expand a potential ~
61784      eval path="$path"
61785      if test ! -f "$path" && test ! -d "$path"; then
61786        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61787      fi
61788
61789      if test -d "$path"; then
61790        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61791      else
61792        dir="`$DIRNAME "$path"`"
61793        base="`$BASENAME "$path"`"
61794        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61795      fi
61796    fi
61797  fi
61798
61799
61800    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61802$as_echo_n "checking for freetype includes... " >&6; }
61803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61804$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61805    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61807$as_echo_n "checking for freetype libraries... " >&6; }
61808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61809$as_echo "$FREETYPE_LIB_PATH" >&6; }
61810  fi
61811
61812            else
61813
61814  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61815  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61816  METHOD="well-known location"
61817
61818  # Let's start with an optimistic view of the world :-)
61819  FOUND_FREETYPE=yes
61820
61821  # First look for the canonical freetype main include file ft2build.h.
61822  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61823    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61824    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61825    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61826      # Fail.
61827      FOUND_FREETYPE=no
61828    fi
61829  fi
61830
61831  if test "x$FOUND_FREETYPE" = xyes; then
61832    # Include file found, let's continue the sanity check.
61833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61834$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61835
61836    # Reset to default value
61837    FREETYPE_BASE_NAME=freetype
61838    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61839    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61840      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61841          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61842        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61843        # for the .6 version explicitly.
61844        FREETYPE_BASE_NAME=freetype.6
61845        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61846        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61847$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61848      else
61849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61850$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61851        FOUND_FREETYPE=no
61852      fi
61853    else
61854      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61855        # On Windows, we will need both .lib and .dll file.
61856        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61857          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61859          FOUND_FREETYPE=no
61860        fi
61861      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61862          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61863        # Found lib in isa dir, use that instead.
61864        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61865        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61866$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61867      fi
61868    fi
61869  fi
61870
61871  if test "x$FOUND_FREETYPE" = xyes; then
61872
61873  # Only process if variable expands to non-empty
61874
61875  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61877
61878  # Input might be given as Windows format, start by converting to
61879  # unix format.
61880  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61881  new_path=`$CYGPATH -u "$path"`
61882
61883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61886  # "foo.exe" is OK but "foo" is an error.
61887  #
61888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61889  # It is also a way to make sure we got the proper file name for the real test later on.
61890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61891  if test "x$test_shortpath" = x; then
61892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61894    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61895  fi
61896
61897  # Call helper function which possibly converts this using DOS-style short mode.
61898  # If so, the updated path is stored in $new_path.
61899
61900  input_path="$new_path"
61901  # Check if we need to convert this using DOS-style short mode. If the path
61902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61903  # take no chances and rewrite it.
61904  # Note: m4 eats our [], so we need to use [ and ] instead.
61905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61906  if test "x$has_forbidden_chars" != x; then
61907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61911      # Going to short mode and back again did indeed matter. Since short mode is
61912      # case insensitive, let's make it lowercase to improve readability.
61913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61914      # Now convert it back to Unix-style (cygpath)
61915      input_path=`$CYGPATH -u "$shortmode_path"`
61916      new_path="$input_path"
61917    fi
61918  fi
61919
61920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61921  if test "x$test_cygdrive_prefix" = x; then
61922    # As a simple fix, exclude /usr/bin since it's not a real path.
61923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61925      # a path prefixed by /cygdrive for fixpath to work.
61926      new_path="$CYGWIN_ROOT_PATH$input_path"
61927    fi
61928  fi
61929
61930
61931  if test "x$path" != "x$new_path"; then
61932    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61935  fi
61936
61937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61938
61939  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61940  has_colon=`$ECHO $path | $GREP ^.:`
61941  new_path="$path"
61942  if test "x$has_colon" = x; then
61943    # Not in mixed or Windows style, start by that.
61944    new_path=`cmd //c echo $path`
61945  fi
61946
61947
61948  input_path="$new_path"
61949  # Check if we need to convert this using DOS-style short mode. If the path
61950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61951  # take no chances and rewrite it.
61952  # Note: m4 eats our [], so we need to use [ and ] instead.
61953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61954  if test "x$has_forbidden_chars" != x; then
61955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61957  fi
61958
61959
61960  windows_path="$new_path"
61961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61962    unix_path=`$CYGPATH -u "$windows_path"`
61963    new_path="$unix_path"
61964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61966    new_path="$unix_path"
61967  fi
61968
61969  if test "x$path" != "x$new_path"; then
61970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61973  fi
61974
61975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61977
61978    else
61979      # We're on a unix platform. Hooray! :)
61980      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61981      has_space=`$ECHO "$path" | $GREP " "`
61982      if test "x$has_space" != x; then
61983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61986      fi
61987
61988      # Use eval to expand a potential ~
61989      eval path="$path"
61990      if test ! -f "$path" && test ! -d "$path"; then
61991        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61992      fi
61993
61994      if test -d "$path"; then
61995        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61996      else
61997        dir="`$DIRNAME "$path"`"
61998        base="`$BASENAME "$path"`"
61999        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62000      fi
62001    fi
62002  fi
62003
62004
62005  # Only process if variable expands to non-empty
62006
62007  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62009
62010  # Input might be given as Windows format, start by converting to
62011  # unix format.
62012  path="$POTENTIAL_FREETYPE_LIB_PATH"
62013  new_path=`$CYGPATH -u "$path"`
62014
62015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62018  # "foo.exe" is OK but "foo" is an error.
62019  #
62020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62021  # It is also a way to make sure we got the proper file name for the real test later on.
62022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62023  if test "x$test_shortpath" = x; then
62024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62026    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62027  fi
62028
62029  # Call helper function which possibly converts this using DOS-style short mode.
62030  # If so, the updated path is stored in $new_path.
62031
62032  input_path="$new_path"
62033  # Check if we need to convert this using DOS-style short mode. If the path
62034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62035  # take no chances and rewrite it.
62036  # Note: m4 eats our [], so we need to use [ and ] instead.
62037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62038  if test "x$has_forbidden_chars" != x; then
62039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62043      # Going to short mode and back again did indeed matter. Since short mode is
62044      # case insensitive, let's make it lowercase to improve readability.
62045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62046      # Now convert it back to Unix-style (cygpath)
62047      input_path=`$CYGPATH -u "$shortmode_path"`
62048      new_path="$input_path"
62049    fi
62050  fi
62051
62052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62053  if test "x$test_cygdrive_prefix" = x; then
62054    # As a simple fix, exclude /usr/bin since it's not a real path.
62055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62057      # a path prefixed by /cygdrive for fixpath to work.
62058      new_path="$CYGWIN_ROOT_PATH$input_path"
62059    fi
62060  fi
62061
62062
62063  if test "x$path" != "x$new_path"; then
62064    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62067  fi
62068
62069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62070
62071  path="$POTENTIAL_FREETYPE_LIB_PATH"
62072  has_colon=`$ECHO $path | $GREP ^.:`
62073  new_path="$path"
62074  if test "x$has_colon" = x; then
62075    # Not in mixed or Windows style, start by that.
62076    new_path=`cmd //c echo $path`
62077  fi
62078
62079
62080  input_path="$new_path"
62081  # Check if we need to convert this using DOS-style short mode. If the path
62082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62083  # take no chances and rewrite it.
62084  # Note: m4 eats our [], so we need to use [ and ] instead.
62085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62086  if test "x$has_forbidden_chars" != x; then
62087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62089  fi
62090
62091
62092  windows_path="$new_path"
62093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62094    unix_path=`$CYGPATH -u "$windows_path"`
62095    new_path="$unix_path"
62096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62098    new_path="$unix_path"
62099  fi
62100
62101  if test "x$path" != "x$new_path"; then
62102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62105  fi
62106
62107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62109
62110    else
62111      # We're on a unix platform. Hooray! :)
62112      path="$POTENTIAL_FREETYPE_LIB_PATH"
62113      has_space=`$ECHO "$path" | $GREP " "`
62114      if test "x$has_space" != x; then
62115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62118      fi
62119
62120      # Use eval to expand a potential ~
62121      eval path="$path"
62122      if test ! -f "$path" && test ! -d "$path"; then
62123        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62124      fi
62125
62126      if test -d "$path"; then
62127        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62128      else
62129        dir="`$DIRNAME "$path"`"
62130        base="`$BASENAME "$path"`"
62131        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62132      fi
62133    fi
62134  fi
62135
62136
62137    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62139$as_echo_n "checking for freetype includes... " >&6; }
62140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62141$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62142    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62144$as_echo_n "checking for freetype libraries... " >&6; }
62145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62146$as_echo "$FREETYPE_LIB_PATH" >&6; }
62147  fi
62148
62149              if test "x$FOUND_FREETYPE" != xyes; then
62150
62151  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62152  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62153  METHOD="well-known location"
62154
62155  # Let's start with an optimistic view of the world :-)
62156  FOUND_FREETYPE=yes
62157
62158  # First look for the canonical freetype main include file ft2build.h.
62159  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62160    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62161    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62162    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62163      # Fail.
62164      FOUND_FREETYPE=no
62165    fi
62166  fi
62167
62168  if test "x$FOUND_FREETYPE" = xyes; then
62169    # Include file found, let's continue the sanity check.
62170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62171$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62172
62173    # Reset to default value
62174    FREETYPE_BASE_NAME=freetype
62175    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62176    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62177      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62178          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62179        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62180        # for the .6 version explicitly.
62181        FREETYPE_BASE_NAME=freetype.6
62182        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62183        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62184$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62185      else
62186        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62187$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62188        FOUND_FREETYPE=no
62189      fi
62190    else
62191      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62192        # On Windows, we will need both .lib and .dll file.
62193        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62194          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62196          FOUND_FREETYPE=no
62197        fi
62198      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62199          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62200        # Found lib in isa dir, use that instead.
62201        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62202        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62203$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62204      fi
62205    fi
62206  fi
62207
62208  if test "x$FOUND_FREETYPE" = xyes; then
62209
62210  # Only process if variable expands to non-empty
62211
62212  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62214
62215  # Input might be given as Windows format, start by converting to
62216  # unix format.
62217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62218  new_path=`$CYGPATH -u "$path"`
62219
62220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62223  # "foo.exe" is OK but "foo" is an error.
62224  #
62225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62226  # It is also a way to make sure we got the proper file name for the real test later on.
62227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62228  if test "x$test_shortpath" = x; then
62229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62231    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62232  fi
62233
62234  # Call helper function which possibly converts this using DOS-style short mode.
62235  # If so, the updated path is stored in $new_path.
62236
62237  input_path="$new_path"
62238  # Check if we need to convert this using DOS-style short mode. If the path
62239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62240  # take no chances and rewrite it.
62241  # Note: m4 eats our [], so we need to use [ and ] instead.
62242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62243  if test "x$has_forbidden_chars" != x; then
62244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62248      # Going to short mode and back again did indeed matter. Since short mode is
62249      # case insensitive, let's make it lowercase to improve readability.
62250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62251      # Now convert it back to Unix-style (cygpath)
62252      input_path=`$CYGPATH -u "$shortmode_path"`
62253      new_path="$input_path"
62254    fi
62255  fi
62256
62257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62258  if test "x$test_cygdrive_prefix" = x; then
62259    # As a simple fix, exclude /usr/bin since it's not a real path.
62260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62262      # a path prefixed by /cygdrive for fixpath to work.
62263      new_path="$CYGWIN_ROOT_PATH$input_path"
62264    fi
62265  fi
62266
62267
62268  if test "x$path" != "x$new_path"; then
62269    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62272  fi
62273
62274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62275
62276  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62277  has_colon=`$ECHO $path | $GREP ^.:`
62278  new_path="$path"
62279  if test "x$has_colon" = x; then
62280    # Not in mixed or Windows style, start by that.
62281    new_path=`cmd //c echo $path`
62282  fi
62283
62284
62285  input_path="$new_path"
62286  # Check if we need to convert this using DOS-style short mode. If the path
62287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62288  # take no chances and rewrite it.
62289  # Note: m4 eats our [], so we need to use [ and ] instead.
62290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62291  if test "x$has_forbidden_chars" != x; then
62292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62294  fi
62295
62296
62297  windows_path="$new_path"
62298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62299    unix_path=`$CYGPATH -u "$windows_path"`
62300    new_path="$unix_path"
62301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62303    new_path="$unix_path"
62304  fi
62305
62306  if test "x$path" != "x$new_path"; then
62307    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62309$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62310  fi
62311
62312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62314
62315    else
62316      # We're on a unix platform. Hooray! :)
62317      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62318      has_space=`$ECHO "$path" | $GREP " "`
62319      if test "x$has_space" != x; then
62320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62321$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62323      fi
62324
62325      # Use eval to expand a potential ~
62326      eval path="$path"
62327      if test ! -f "$path" && test ! -d "$path"; then
62328        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62329      fi
62330
62331      if test -d "$path"; then
62332        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62333      else
62334        dir="`$DIRNAME "$path"`"
62335        base="`$BASENAME "$path"`"
62336        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62337      fi
62338    fi
62339  fi
62340
62341
62342  # Only process if variable expands to non-empty
62343
62344  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62346
62347  # Input might be given as Windows format, start by converting to
62348  # unix format.
62349  path="$POTENTIAL_FREETYPE_LIB_PATH"
62350  new_path=`$CYGPATH -u "$path"`
62351
62352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62355  # "foo.exe" is OK but "foo" is an error.
62356  #
62357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62358  # It is also a way to make sure we got the proper file name for the real test later on.
62359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62360  if test "x$test_shortpath" = x; then
62361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62363    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62364  fi
62365
62366  # Call helper function which possibly converts this using DOS-style short mode.
62367  # If so, the updated path is stored in $new_path.
62368
62369  input_path="$new_path"
62370  # Check if we need to convert this using DOS-style short mode. If the path
62371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62372  # take no chances and rewrite it.
62373  # Note: m4 eats our [], so we need to use [ and ] instead.
62374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62375  if test "x$has_forbidden_chars" != x; then
62376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62380      # Going to short mode and back again did indeed matter. Since short mode is
62381      # case insensitive, let's make it lowercase to improve readability.
62382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62383      # Now convert it back to Unix-style (cygpath)
62384      input_path=`$CYGPATH -u "$shortmode_path"`
62385      new_path="$input_path"
62386    fi
62387  fi
62388
62389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62390  if test "x$test_cygdrive_prefix" = x; then
62391    # As a simple fix, exclude /usr/bin since it's not a real path.
62392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62394      # a path prefixed by /cygdrive for fixpath to work.
62395      new_path="$CYGWIN_ROOT_PATH$input_path"
62396    fi
62397  fi
62398
62399
62400  if test "x$path" != "x$new_path"; then
62401    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62404  fi
62405
62406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62407
62408  path="$POTENTIAL_FREETYPE_LIB_PATH"
62409  has_colon=`$ECHO $path | $GREP ^.:`
62410  new_path="$path"
62411  if test "x$has_colon" = x; then
62412    # Not in mixed or Windows style, start by that.
62413    new_path=`cmd //c echo $path`
62414  fi
62415
62416
62417  input_path="$new_path"
62418  # Check if we need to convert this using DOS-style short mode. If the path
62419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62420  # take no chances and rewrite it.
62421  # Note: m4 eats our [], so we need to use [ and ] instead.
62422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62423  if test "x$has_forbidden_chars" != x; then
62424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62426  fi
62427
62428
62429  windows_path="$new_path"
62430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62431    unix_path=`$CYGPATH -u "$windows_path"`
62432    new_path="$unix_path"
62433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62435    new_path="$unix_path"
62436  fi
62437
62438  if test "x$path" != "x$new_path"; then
62439    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62442  fi
62443
62444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62446
62447    else
62448      # We're on a unix platform. Hooray! :)
62449      path="$POTENTIAL_FREETYPE_LIB_PATH"
62450      has_space=`$ECHO "$path" | $GREP " "`
62451      if test "x$has_space" != x; then
62452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62455      fi
62456
62457      # Use eval to expand a potential ~
62458      eval path="$path"
62459      if test ! -f "$path" && test ! -d "$path"; then
62460        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62461      fi
62462
62463      if test -d "$path"; then
62464        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62465      else
62466        dir="`$DIRNAME "$path"`"
62467        base="`$BASENAME "$path"`"
62468        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62469      fi
62470    fi
62471  fi
62472
62473
62474    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62476$as_echo_n "checking for freetype includes... " >&6; }
62477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62478$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62479    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62481$as_echo_n "checking for freetype libraries... " >&6; }
62482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62483$as_echo "$FREETYPE_LIB_PATH" >&6; }
62484  fi
62485
62486              fi
62487            fi
62488          fi
62489        fi
62490      fi # end check in well-known locations
62491
62492      if test "x$FOUND_FREETYPE" != xyes; then
62493
62494  # Print a helpful message on how to acquire the necessary build dependency.
62495  # freetype is the help tag: freetype, cups, alsa etc
62496  MISSING_DEPENDENCY=freetype
62497
62498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62499    cygwin_help $MISSING_DEPENDENCY
62500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62501    msys_help $MISSING_DEPENDENCY
62502  else
62503    PKGHANDLER_COMMAND=
62504
62505    case $PKGHANDLER in
62506      apt-get)
62507        apt_help     $MISSING_DEPENDENCY ;;
62508      yum)
62509        yum_help     $MISSING_DEPENDENCY ;;
62510      brew)
62511        brew_help    $MISSING_DEPENDENCY ;;
62512      port)
62513        port_help    $MISSING_DEPENDENCY ;;
62514      pkgutil)
62515        pkgutil_help $MISSING_DEPENDENCY ;;
62516      pkgadd)
62517        pkgadd_help  $MISSING_DEPENDENCY ;;
62518    esac
62519
62520    if test "x$PKGHANDLER_COMMAND" != x; then
62521      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62522    fi
62523  fi
62524
62525        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62526      fi
62527    fi # end user specified settings
62528
62529    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62530    if test "x$FREETYPE_CFLAGS" = x; then
62531
62532  # Only process if variable expands to non-empty
62533
62534  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62536
62537  # Input might be given as Windows format, start by converting to
62538  # unix format.
62539  path="$FREETYPE_INCLUDE_PATH"
62540  new_path=`$CYGPATH -u "$path"`
62541
62542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62545  # "foo.exe" is OK but "foo" is an error.
62546  #
62547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62548  # It is also a way to make sure we got the proper file name for the real test later on.
62549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62550  if test "x$test_shortpath" = x; then
62551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62552$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62553    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62554  fi
62555
62556  # Call helper function which possibly converts this using DOS-style short mode.
62557  # If so, the updated path is stored in $new_path.
62558
62559  input_path="$new_path"
62560  # Check if we need to convert this using DOS-style short mode. If the path
62561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62562  # take no chances and rewrite it.
62563  # Note: m4 eats our [], so we need to use [ and ] instead.
62564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62565  if test "x$has_forbidden_chars" != x; then
62566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62570      # Going to short mode and back again did indeed matter. Since short mode is
62571      # case insensitive, let's make it lowercase to improve readability.
62572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62573      # Now convert it back to Unix-style (cygpath)
62574      input_path=`$CYGPATH -u "$shortmode_path"`
62575      new_path="$input_path"
62576    fi
62577  fi
62578
62579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62580  if test "x$test_cygdrive_prefix" = x; then
62581    # As a simple fix, exclude /usr/bin since it's not a real path.
62582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62584      # a path prefixed by /cygdrive for fixpath to work.
62585      new_path="$CYGWIN_ROOT_PATH$input_path"
62586    fi
62587  fi
62588
62589
62590  if test "x$path" != "x$new_path"; then
62591    FREETYPE_INCLUDE_PATH="$new_path"
62592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62593$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62594  fi
62595
62596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62597
62598  path="$FREETYPE_INCLUDE_PATH"
62599  has_colon=`$ECHO $path | $GREP ^.:`
62600  new_path="$path"
62601  if test "x$has_colon" = x; then
62602    # Not in mixed or Windows style, start by that.
62603    new_path=`cmd //c echo $path`
62604  fi
62605
62606
62607  input_path="$new_path"
62608  # Check if we need to convert this using DOS-style short mode. If the path
62609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62610  # take no chances and rewrite it.
62611  # Note: m4 eats our [], so we need to use [ and ] instead.
62612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62613  if test "x$has_forbidden_chars" != x; then
62614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62616  fi
62617
62618
62619  windows_path="$new_path"
62620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62621    unix_path=`$CYGPATH -u "$windows_path"`
62622    new_path="$unix_path"
62623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62625    new_path="$unix_path"
62626  fi
62627
62628  if test "x$path" != "x$new_path"; then
62629    FREETYPE_INCLUDE_PATH="$new_path"
62630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62631$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62632  fi
62633
62634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62636
62637    else
62638      # We're on a unix platform. Hooray! :)
62639      path="$FREETYPE_INCLUDE_PATH"
62640      has_space=`$ECHO "$path" | $GREP " "`
62641      if test "x$has_space" != x; then
62642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62643$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62645      fi
62646
62647      # Use eval to expand a potential ~
62648      eval path="$path"
62649      if test ! -f "$path" && test ! -d "$path"; then
62650        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62651      fi
62652
62653      if test -d "$path"; then
62654        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62655      else
62656        dir="`$DIRNAME "$path"`"
62657        base="`$BASENAME "$path"`"
62658        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62659      fi
62660    fi
62661  fi
62662
62663      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62664        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62665      else
62666        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62667      fi
62668    fi
62669
62670    if test "x$FREETYPE_LIBS" = x; then
62671
62672  # Only process if variable expands to non-empty
62673
62674  if test "x$FREETYPE_LIB_PATH" != x; then
62675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62676
62677  # Input might be given as Windows format, start by converting to
62678  # unix format.
62679  path="$FREETYPE_LIB_PATH"
62680  new_path=`$CYGPATH -u "$path"`
62681
62682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62685  # "foo.exe" is OK but "foo" is an error.
62686  #
62687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62688  # It is also a way to make sure we got the proper file name for the real test later on.
62689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62690  if test "x$test_shortpath" = x; then
62691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62692$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62693    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62694  fi
62695
62696  # Call helper function which possibly converts this using DOS-style short mode.
62697  # If so, the updated path is stored in $new_path.
62698
62699  input_path="$new_path"
62700  # Check if we need to convert this using DOS-style short mode. If the path
62701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62702  # take no chances and rewrite it.
62703  # Note: m4 eats our [], so we need to use [ and ] instead.
62704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62705  if test "x$has_forbidden_chars" != x; then
62706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62710      # Going to short mode and back again did indeed matter. Since short mode is
62711      # case insensitive, let's make it lowercase to improve readability.
62712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62713      # Now convert it back to Unix-style (cygpath)
62714      input_path=`$CYGPATH -u "$shortmode_path"`
62715      new_path="$input_path"
62716    fi
62717  fi
62718
62719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62720  if test "x$test_cygdrive_prefix" = x; then
62721    # As a simple fix, exclude /usr/bin since it's not a real path.
62722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62724      # a path prefixed by /cygdrive for fixpath to work.
62725      new_path="$CYGWIN_ROOT_PATH$input_path"
62726    fi
62727  fi
62728
62729
62730  if test "x$path" != "x$new_path"; then
62731    FREETYPE_LIB_PATH="$new_path"
62732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62733$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62734  fi
62735
62736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62737
62738  path="$FREETYPE_LIB_PATH"
62739  has_colon=`$ECHO $path | $GREP ^.:`
62740  new_path="$path"
62741  if test "x$has_colon" = x; then
62742    # Not in mixed or Windows style, start by that.
62743    new_path=`cmd //c echo $path`
62744  fi
62745
62746
62747  input_path="$new_path"
62748  # Check if we need to convert this using DOS-style short mode. If the path
62749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62750  # take no chances and rewrite it.
62751  # Note: m4 eats our [], so we need to use [ and ] instead.
62752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62753  if test "x$has_forbidden_chars" != x; then
62754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62756  fi
62757
62758
62759  windows_path="$new_path"
62760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62761    unix_path=`$CYGPATH -u "$windows_path"`
62762    new_path="$unix_path"
62763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62765    new_path="$unix_path"
62766  fi
62767
62768  if test "x$path" != "x$new_path"; then
62769    FREETYPE_LIB_PATH="$new_path"
62770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62771$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62772  fi
62773
62774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62776
62777    else
62778      # We're on a unix platform. Hooray! :)
62779      path="$FREETYPE_LIB_PATH"
62780      has_space=`$ECHO "$path" | $GREP " "`
62781      if test "x$has_space" != x; then
62782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62783$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62785      fi
62786
62787      # Use eval to expand a potential ~
62788      eval path="$path"
62789      if test ! -f "$path" && test ! -d "$path"; then
62790        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62791      fi
62792
62793      if test -d "$path"; then
62794        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62795      else
62796        dir="`$DIRNAME "$path"`"
62797        base="`$BASENAME "$path"`"
62798        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62799      fi
62800    fi
62801  fi
62802
62803      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62804        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62805      else
62806        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62807      fi
62808    fi
62809
62810    # Try to compile it
62811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62812$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62813    ac_ext=cpp
62814ac_cpp='$CXXCPP $CPPFLAGS'
62815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62818
62819    PREV_CXXCFLAGS="$CXXFLAGS"
62820    PREV_LIBS="$LIBS"
62821    PREV_CXX="$CXX"
62822    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62823    LIBS="$LIBS $FREETYPE_LIBS"
62824    CXX="$FIXPATH $CXX"
62825    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62826/* end confdefs.h.  */
62827
62828          #include<ft2build.h>
62829          #include FT_FREETYPE_H
62830          int main () {
62831            FT_Init_FreeType(NULL);
62832            return 0;
62833          }
62834
62835_ACEOF
62836if ac_fn_cxx_try_link "$LINENO"; then :
62837
62838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62839$as_echo "yes" >&6; }
62840
62841else
62842
62843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62844$as_echo "no" >&6; }
62845          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62846$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62847          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62848$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62849
62850
62851  # Print a helpful message on how to acquire the necessary build dependency.
62852  # freetype is the help tag: freetype, cups, alsa etc
62853  MISSING_DEPENDENCY=freetype
62854
62855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62856    cygwin_help $MISSING_DEPENDENCY
62857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62858    msys_help $MISSING_DEPENDENCY
62859  else
62860    PKGHANDLER_COMMAND=
62861
62862    case $PKGHANDLER in
62863      apt-get)
62864        apt_help     $MISSING_DEPENDENCY ;;
62865      yum)
62866        yum_help     $MISSING_DEPENDENCY ;;
62867      brew)
62868        brew_help    $MISSING_DEPENDENCY ;;
62869      port)
62870        port_help    $MISSING_DEPENDENCY ;;
62871      pkgutil)
62872        pkgutil_help $MISSING_DEPENDENCY ;;
62873      pkgadd)
62874        pkgadd_help  $MISSING_DEPENDENCY ;;
62875    esac
62876
62877    if test "x$PKGHANDLER_COMMAND" != x; then
62878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62879    fi
62880  fi
62881
62882
62883          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62884
62885
62886fi
62887rm -f core conftest.err conftest.$ac_objext \
62888    conftest$ac_exeext conftest.$ac_ext
62889    CXXCFLAGS="$PREV_CXXFLAGS"
62890    LIBS="$PREV_LIBS"
62891    CXX="$PREV_CXX"
62892    ac_ext=cpp
62893ac_cpp='$CXXCPP $CPPFLAGS'
62894ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62895ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62896ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62897
62898
62899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62900$as_echo_n "checking if we should bundle freetype... " >&6; }
62901    if test "x$BUNDLE_FREETYPE" = xyes; then
62902      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62903    fi
62904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62905$as_echo "$BUNDLE_FREETYPE" >&6; }
62906
62907  fi # end freetype needed
62908
62909
62910
62911
62912
62913
62914
62915# Check whether --with-alsa was given.
62916if test "${with_alsa+set}" = set; then :
62917  withval=$with_alsa;
62918fi
62919
62920
62921# Check whether --with-alsa-include was given.
62922if test "${with_alsa_include+set}" = set; then :
62923  withval=$with_alsa_include;
62924fi
62925
62926
62927# Check whether --with-alsa-lib was given.
62928if test "${with_alsa_lib+set}" = set; then :
62929  withval=$with_alsa_lib;
62930fi
62931
62932
62933  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62934    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62935        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62936        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62937      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62938$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62939    fi
62940    ALSA_CFLAGS=
62941    ALSA_LIBS=
62942  else
62943    ALSA_FOUND=no
62944
62945    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62946      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62947    fi
62948
62949    if test "x${with_alsa}" != x; then
62950      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62951      ALSA_CFLAGS="-I${with_alsa}/include"
62952      ALSA_FOUND=yes
62953    fi
62954    if test "x${with_alsa_include}" != x; then
62955      ALSA_CFLAGS="-I${with_alsa_include}"
62956      ALSA_FOUND=yes
62957    fi
62958    if test "x${with_alsa_lib}" != x; then
62959      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62960      ALSA_FOUND=yes
62961    fi
62962    # Do not try pkg-config if we have a sysroot set.
62963    if test "x$SYSROOT" = x; then
62964      if test "x$ALSA_FOUND" = xno; then
62965
62966pkg_failed=no
62967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62968$as_echo_n "checking for ALSA... " >&6; }
62969
62970if test -n "$ALSA_CFLAGS"; then
62971    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62972 elif test -n "$PKG_CONFIG"; then
62973    if test -n "$PKG_CONFIG" && \
62974    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62975  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62976  ac_status=$?
62977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62978  test $ac_status = 0; }; then
62979  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62980else
62981  pkg_failed=yes
62982fi
62983 else
62984    pkg_failed=untried
62985fi
62986if test -n "$ALSA_LIBS"; then
62987    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62988 elif test -n "$PKG_CONFIG"; then
62989    if test -n "$PKG_CONFIG" && \
62990    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62991  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62992  ac_status=$?
62993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62994  test $ac_status = 0; }; then
62995  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62996else
62997  pkg_failed=yes
62998fi
62999 else
63000    pkg_failed=untried
63001fi
63002
63003
63004
63005if test $pkg_failed = yes; then
63006
63007if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63008        _pkg_short_errors_supported=yes
63009else
63010        _pkg_short_errors_supported=no
63011fi
63012        if test $_pkg_short_errors_supported = yes; then
63013	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63014        else
63015	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63016        fi
63017	# Put the nasty error message in config.log where it belongs
63018	echo "$ALSA_PKG_ERRORS" >&5
63019
63020	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63021$as_echo "no" >&6; }
63022                ALSA_FOUND=no
63023elif test $pkg_failed = untried; then
63024	ALSA_FOUND=no
63025else
63026	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63027	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63029$as_echo "yes" >&6; }
63030	ALSA_FOUND=yes
63031fi
63032      fi
63033    fi
63034    if test "x$ALSA_FOUND" = xno; then
63035      for ac_header in alsa/asoundlib.h
63036do :
63037  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63038if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63039  cat >>confdefs.h <<_ACEOF
63040#define HAVE_ALSA_ASOUNDLIB_H 1
63041_ACEOF
63042
63043            ALSA_FOUND=yes
63044            ALSA_CFLAGS=-Iignoreme
63045            ALSA_LIBS=-lasound
63046            DEFAULT_ALSA=yes
63047
63048else
63049  ALSA_FOUND=no
63050
63051fi
63052
63053done
63054
63055    fi
63056    if test "x$ALSA_FOUND" = xno; then
63057
63058  # Print a helpful message on how to acquire the necessary build dependency.
63059  # alsa is the help tag: freetype, cups, alsa etc
63060  MISSING_DEPENDENCY=alsa
63061
63062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63063    cygwin_help $MISSING_DEPENDENCY
63064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63065    msys_help $MISSING_DEPENDENCY
63066  else
63067    PKGHANDLER_COMMAND=
63068
63069    case $PKGHANDLER in
63070      apt-get)
63071        apt_help     $MISSING_DEPENDENCY ;;
63072      yum)
63073        yum_help     $MISSING_DEPENDENCY ;;
63074      brew)
63075        brew_help    $MISSING_DEPENDENCY ;;
63076      port)
63077        port_help    $MISSING_DEPENDENCY ;;
63078      pkgutil)
63079        pkgutil_help $MISSING_DEPENDENCY ;;
63080      pkgadd)
63081        pkgadd_help  $MISSING_DEPENDENCY ;;
63082    esac
63083
63084    if test "x$PKGHANDLER_COMMAND" != x; then
63085      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63086    fi
63087  fi
63088
63089      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63090    fi
63091  fi
63092
63093
63094
63095
63096
63097
63098# Check whether --with-libffi was given.
63099if test "${with_libffi+set}" = set; then :
63100  withval=$with_libffi;
63101fi
63102
63103
63104# Check whether --with-libffi-include was given.
63105if test "${with_libffi_include+set}" = set; then :
63106  withval=$with_libffi_include;
63107fi
63108
63109
63110# Check whether --with-libffi-lib was given.
63111if test "${with_libffi_lib+set}" = set; then :
63112  withval=$with_libffi_lib;
63113fi
63114
63115  # Check whether --enable-libffi-bundling was given.
63116if test "${enable_libffi_bundling+set}" = set; then :
63117  enableval=$enable_libffi_bundling;
63118fi
63119
63120
63121  if test "x$NEEDS_LIB_FFI" = xfalse; then
63122    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63123        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63124        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63125      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63126$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63127    fi
63128    LIBFFI_CFLAGS=
63129    LIBFFI_LIBS=
63130  else
63131    LIBFFI_FOUND=no
63132
63133    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63134      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63135    fi
63136
63137    if test "x${with_libffi}" != x; then
63138      LIBFFI_LIB_PATH="${with_libffi}/lib"
63139      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63140      LIBFFI_CFLAGS="-I${with_libffi}/include"
63141      LIBFFI_FOUND=yes
63142    fi
63143    if test "x${with_libffi_include}" != x; then
63144      LIBFFI_CFLAGS="-I${with_libffi_include}"
63145      LIBFFI_FOUND=yes
63146    fi
63147    if test "x${with_libffi_lib}" != x; then
63148      LIBFFI_LIB_PATH="${with_libffi_lib}"
63149      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63150      LIBFFI_FOUND=yes
63151    fi
63152    # Do not try pkg-config if we have a sysroot set.
63153    if test "x$SYSROOT" = x; then
63154      if test "x$LIBFFI_FOUND" = xno; then
63155        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63156
63157pkg_failed=no
63158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63159$as_echo_n "checking for LIBFFI... " >&6; }
63160
63161if test -n "$LIBFFI_CFLAGS"; then
63162    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63163 elif test -n "$PKG_CONFIG"; then
63164    if test -n "$PKG_CONFIG" && \
63165    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63166  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63167  ac_status=$?
63168  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63169  test $ac_status = 0; }; then
63170  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63171else
63172  pkg_failed=yes
63173fi
63174 else
63175    pkg_failed=untried
63176fi
63177if test -n "$LIBFFI_LIBS"; then
63178    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63179 elif test -n "$PKG_CONFIG"; then
63180    if test -n "$PKG_CONFIG" && \
63181    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63182  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63183  ac_status=$?
63184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63185  test $ac_status = 0; }; then
63186  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63187else
63188  pkg_failed=yes
63189fi
63190 else
63191    pkg_failed=untried
63192fi
63193
63194
63195
63196if test $pkg_failed = yes; then
63197
63198if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63199        _pkg_short_errors_supported=yes
63200else
63201        _pkg_short_errors_supported=no
63202fi
63203        if test $_pkg_short_errors_supported = yes; then
63204	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63205        else
63206	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63207        fi
63208	# Put the nasty error message in config.log where it belongs
63209	echo "$LIBFFI_PKG_ERRORS" >&5
63210
63211	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63212$as_echo "no" >&6; }
63213                LIBFFI_FOUND=no
63214elif test $pkg_failed = untried; then
63215	LIBFFI_FOUND=no
63216else
63217	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63218	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63220$as_echo "yes" >&6; }
63221	LIBFFI_FOUND=yes
63222fi
63223      fi
63224    fi
63225    if test "x$LIBFFI_FOUND" = xno; then
63226      for ac_header in ffi.h
63227do :
63228  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63229if test "x$ac_cv_header_ffi_h" = xyes; then :
63230  cat >>confdefs.h <<_ACEOF
63231#define HAVE_FFI_H 1
63232_ACEOF
63233
63234            LIBFFI_FOUND=yes
63235            LIBFFI_CFLAGS=
63236            LIBFFI_LIBS=-lffi
63237
63238else
63239  LIBFFI_FOUND=no
63240
63241fi
63242
63243done
63244
63245    fi
63246    if test "x$LIBFFI_FOUND" = xno; then
63247
63248  # Print a helpful message on how to acquire the necessary build dependency.
63249  # ffi is the help tag: freetype, cups, alsa etc
63250  MISSING_DEPENDENCY=ffi
63251
63252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63253    cygwin_help $MISSING_DEPENDENCY
63254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63255    msys_help $MISSING_DEPENDENCY
63256  else
63257    PKGHANDLER_COMMAND=
63258
63259    case $PKGHANDLER in
63260      apt-get)
63261        apt_help     $MISSING_DEPENDENCY ;;
63262      yum)
63263        yum_help     $MISSING_DEPENDENCY ;;
63264      brew)
63265        brew_help    $MISSING_DEPENDENCY ;;
63266      port)
63267        port_help    $MISSING_DEPENDENCY ;;
63268      pkgutil)
63269        pkgutil_help $MISSING_DEPENDENCY ;;
63270      pkgadd)
63271        pkgadd_help  $MISSING_DEPENDENCY ;;
63272    esac
63273
63274    if test "x$PKGHANDLER_COMMAND" != x; then
63275      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63276    fi
63277  fi
63278
63279      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63280    fi
63281
63282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63283$as_echo_n "checking if libffi works... " >&6; }
63284    ac_ext=c
63285ac_cpp='$CPP $CPPFLAGS'
63286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63288ac_compiler_gnu=$ac_cv_c_compiler_gnu
63289
63290    OLD_CFLAGS="$CFLAGS"
63291    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63292    OLD_LIBS="$LIBS"
63293    LIBS="$LIBS $LIBFFI_LIBS"
63294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63295/* end confdefs.h.  */
63296#include <ffi.h>
63297int
63298main ()
63299{
63300
63301          ffi_call(NULL, NULL, NULL, NULL);
63302          return 0;
63303
63304  ;
63305  return 0;
63306}
63307_ACEOF
63308if ac_fn_c_try_link "$LINENO"; then :
63309  LIBFFI_WORKS=yes
63310else
63311  LIBFFI_WORKS=no
63312
63313fi
63314rm -f core conftest.err conftest.$ac_objext \
63315    conftest$ac_exeext conftest.$ac_ext
63316    CFLAGS="$OLD_CFLAGS"
63317    LIBS="$OLD_LIBS"
63318    ac_ext=cpp
63319ac_cpp='$CXXCPP $CPPFLAGS'
63320ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63321ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63322ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63323
63324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63325$as_echo "$LIBFFI_WORKS" >&6; }
63326
63327    if test "x$LIBFFI_WORKS" = xno; then
63328
63329  # Print a helpful message on how to acquire the necessary build dependency.
63330  # ffi is the help tag: freetype, cups, alsa etc
63331  MISSING_DEPENDENCY=ffi
63332
63333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63334    cygwin_help $MISSING_DEPENDENCY
63335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63336    msys_help $MISSING_DEPENDENCY
63337  else
63338    PKGHANDLER_COMMAND=
63339
63340    case $PKGHANDLER in
63341      apt-get)
63342        apt_help     $MISSING_DEPENDENCY ;;
63343      yum)
63344        yum_help     $MISSING_DEPENDENCY ;;
63345      brew)
63346        brew_help    $MISSING_DEPENDENCY ;;
63347      port)
63348        port_help    $MISSING_DEPENDENCY ;;
63349      pkgutil)
63350        pkgutil_help $MISSING_DEPENDENCY ;;
63351      pkgadd)
63352        pkgadd_help  $MISSING_DEPENDENCY ;;
63353    esac
63354
63355    if test "x$PKGHANDLER_COMMAND" != x; then
63356      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63357    fi
63358  fi
63359
63360      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63361    fi
63362
63363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63364$as_echo_n "checking if libffi should be bundled... " >&6; }
63365    if test "x$enable_libffi_bundling" = "x"; then
63366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63367$as_echo "no" >&6; }
63368      ENABLE_LIBFFI_BUNDLING=false
63369    elif  test "x$enable_libffi_bundling" = "xno"; then
63370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63371$as_echo "no, forced" >&6; }
63372      ENABLE_LIBFFI_BUNDLING=false
63373    elif  test "x$enable_libffi_bundling" = "xyes"; then
63374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63375$as_echo "yes, forced" >&6; }
63376      ENABLE_LIBFFI_BUNDLING=true
63377    else
63378      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63379    fi
63380
63381    # Find the libffi.so.X to bundle
63382    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63384$as_echo_n "checking for libffi lib file location... " >&6; }
63385      if test "x${LIBFFI_LIB_PATH}" != x; then
63386        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63387          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63388        else
63389          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63390        fi
63391      else
63392        # If we don't have an explicit path, look in a few obvious places
63393        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63394          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63395            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63396          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63397            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63398          else
63399            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63400          fi
63401        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63402          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63403            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63404          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63405            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63406          else
63407            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63408          fi
63409        else
63410          # Fallback on the default /usr/lib dir
63411          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63412            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63413          else
63414            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63415          fi
63416        fi
63417      fi
63418      # Make sure the wildcard is evaluated
63419      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63421$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63422    fi
63423  fi
63424
63425
63426
63427
63428
63429
63430
63431  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63432    # Extract the first word of "llvm-config", so it can be a program name with args.
63433set dummy llvm-config; ac_word=$2
63434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63435$as_echo_n "checking for $ac_word... " >&6; }
63436if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63437  $as_echo_n "(cached) " >&6
63438else
63439  if test -n "$LLVM_CONFIG"; then
63440  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63441else
63442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63443for as_dir in $PATH
63444do
63445  IFS=$as_save_IFS
63446  test -z "$as_dir" && as_dir=.
63447    for ac_exec_ext in '' $ac_executable_extensions; do
63448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63449    ac_cv_prog_LLVM_CONFIG="llvm-config"
63450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63451    break 2
63452  fi
63453done
63454  done
63455IFS=$as_save_IFS
63456
63457fi
63458fi
63459LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63460if test -n "$LLVM_CONFIG"; then
63461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63462$as_echo "$LLVM_CONFIG" >&6; }
63463else
63464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63465$as_echo "no" >&6; }
63466fi
63467
63468
63469
63470    if test "x$LLVM_CONFIG" != xllvm-config; then
63471      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63472    fi
63473
63474    llvm_components="jit mcjit engine nativecodegen native"
63475    unset LLVM_CFLAGS
63476    for flag in $("$LLVM_CONFIG" --cxxflags); do
63477      if echo "${flag}" | grep -q '^-[ID]'; then
63478        if test "${flag}" != "-D_DEBUG" ; then
63479          if test "${LLVM_CFLAGS}" != "" ; then
63480            LLVM_CFLAGS="${LLVM_CFLAGS} "
63481          fi
63482          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63483        fi
63484      fi
63485    done
63486    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63487    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63488
63489    unset LLVM_LDFLAGS
63490    for flag in $("${LLVM_CONFIG}" --ldflags); do
63491      if echo "${flag}" | grep -q '^-L'; then
63492        if test "${LLVM_LDFLAGS}" != ""; then
63493          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63494        fi
63495        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63496      fi
63497    done
63498
63499    unset LLVM_LIBS
63500    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63501      if echo "${flag}" | grep -q '^-l'; then
63502        if test "${LLVM_LIBS}" != ""; then
63503          LLVM_LIBS="${LLVM_LIBS} "
63504        fi
63505        LLVM_LIBS="${LLVM_LIBS}${flag}"
63506      fi
63507    done
63508
63509    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63510    # always properly detect -ltinfo
63511    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63512
63513
63514
63515
63516  fi
63517
63518
63519
63520# Check whether --with-libjpeg was given.
63521if test "${with_libjpeg+set}" = set; then :
63522  withval=$with_libjpeg;
63523fi
63524
63525
63526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63527$as_echo_n "checking for which libjpeg to use... " >&6; }
63528  # default is bundled
63529  DEFAULT_LIBJPEG=bundled
63530  # if user didn't specify, use DEFAULT_LIBJPEG
63531  if test "x${with_libjpeg}" = "x"; then
63532    with_libjpeg=${DEFAULT_LIBJPEG}
63533  fi
63534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63535$as_echo "${with_libjpeg}" >&6; }
63536
63537  if test "x${with_libjpeg}" = "xbundled"; then
63538    USE_EXTERNAL_LIBJPEG=false
63539  elif test "x${with_libjpeg}" = "xsystem"; then
63540    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63541if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63542
63543else
63544   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63545fi
63546
63547
63548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63549$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63550if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63551  $as_echo_n "(cached) " >&6
63552else
63553  ac_check_lib_save_LIBS=$LIBS
63554LIBS="-ljpeg  $LIBS"
63555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63556/* end confdefs.h.  */
63557
63558/* Override any GCC internal prototype to avoid an error.
63559   Use char because int might match the return type of a GCC
63560   builtin and then its argument prototype would still apply.  */
63561#ifdef __cplusplus
63562extern "C"
63563#endif
63564char jpeg_CreateDecompress ();
63565int
63566main ()
63567{
63568return jpeg_CreateDecompress ();
63569  ;
63570  return 0;
63571}
63572_ACEOF
63573if ac_fn_cxx_try_link "$LINENO"; then :
63574  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63575else
63576  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63577fi
63578rm -f core conftest.err conftest.$ac_objext \
63579    conftest$ac_exeext conftest.$ac_ext
63580LIBS=$ac_check_lib_save_LIBS
63581fi
63582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63583$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63584if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63585  cat >>confdefs.h <<_ACEOF
63586#define HAVE_LIBJPEG 1
63587_ACEOF
63588
63589  LIBS="-ljpeg $LIBS"
63590
63591else
63592   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63593fi
63594
63595
63596    USE_EXTERNAL_LIBJPEG=true
63597  else
63598    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63599  fi
63600
63601
63602
63603
63604
63605# Check whether --with-giflib was given.
63606if test "${with_giflib+set}" = set; then :
63607  withval=$with_giflib;
63608fi
63609
63610
63611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63612$as_echo_n "checking for which giflib to use... " >&6; }
63613  # default is bundled
63614  DEFAULT_GIFLIB=bundled
63615  # if user didn't specify, use DEFAULT_GIFLIB
63616  if test "x${with_giflib}" = "x"; then
63617    with_giflib=${DEFAULT_GIFLIB}
63618  fi
63619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63620$as_echo "${with_giflib}" >&6; }
63621
63622  if test "x${with_giflib}" = "xbundled"; then
63623    USE_EXTERNAL_LIBGIF=false
63624  elif test "x${with_giflib}" = "xsystem"; then
63625    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63626if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63627
63628else
63629   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63630fi
63631
63632
63633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63634$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63635if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63636  $as_echo_n "(cached) " >&6
63637else
63638  ac_check_lib_save_LIBS=$LIBS
63639LIBS="-lgif  $LIBS"
63640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63641/* end confdefs.h.  */
63642
63643/* Override any GCC internal prototype to avoid an error.
63644   Use char because int might match the return type of a GCC
63645   builtin and then its argument prototype would still apply.  */
63646#ifdef __cplusplus
63647extern "C"
63648#endif
63649char DGifGetCode ();
63650int
63651main ()
63652{
63653return DGifGetCode ();
63654  ;
63655  return 0;
63656}
63657_ACEOF
63658if ac_fn_cxx_try_link "$LINENO"; then :
63659  ac_cv_lib_gif_DGifGetCode=yes
63660else
63661  ac_cv_lib_gif_DGifGetCode=no
63662fi
63663rm -f core conftest.err conftest.$ac_objext \
63664    conftest$ac_exeext conftest.$ac_ext
63665LIBS=$ac_check_lib_save_LIBS
63666fi
63667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63668$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63669if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63670  cat >>confdefs.h <<_ACEOF
63671#define HAVE_LIBGIF 1
63672_ACEOF
63673
63674  LIBS="-lgif $LIBS"
63675
63676else
63677   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63678fi
63679
63680
63681    USE_EXTERNAL_LIBGIF=true
63682  else
63683    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63684  fi
63685
63686
63687
63688
63689
63690# Check whether --with-libpng was given.
63691if test "${with_libpng+set}" = set; then :
63692  withval=$with_libpng;
63693fi
63694
63695
63696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63697$as_echo_n "checking for which libpng to use... " >&6; }
63698
63699  # default is bundled
63700  DEFAULT_LIBPNG=bundled
63701  # if user didn't specify, use DEFAULT_LIBPNG
63702  if test "x${with_libpng}" = "x"; then
63703      with_libpng=${DEFAULT_LIBPNG}
63704  fi
63705
63706  if test "x${with_libpng}" = "xbundled"; then
63707      USE_EXTERNAL_LIBPNG=false
63708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63709$as_echo "bundled" >&6; }
63710  elif test "x${with_libpng}" = "xsystem"; then
63711
63712pkg_failed=no
63713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63714$as_echo_n "checking for PNG... " >&6; }
63715
63716if test -n "$PNG_CFLAGS"; then
63717    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63718 elif test -n "$PKG_CONFIG"; then
63719    if test -n "$PKG_CONFIG" && \
63720    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63721  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63722  ac_status=$?
63723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63724  test $ac_status = 0; }; then
63725  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63726else
63727  pkg_failed=yes
63728fi
63729 else
63730    pkg_failed=untried
63731fi
63732if test -n "$PNG_LIBS"; then
63733    pkg_cv_PNG_LIBS="$PNG_LIBS"
63734 elif test -n "$PKG_CONFIG"; then
63735    if test -n "$PKG_CONFIG" && \
63736    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63737  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63738  ac_status=$?
63739  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63740  test $ac_status = 0; }; then
63741  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63742else
63743  pkg_failed=yes
63744fi
63745 else
63746    pkg_failed=untried
63747fi
63748
63749
63750
63751if test $pkg_failed = yes; then
63752
63753if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63754        _pkg_short_errors_supported=yes
63755else
63756        _pkg_short_errors_supported=no
63757fi
63758        if test $_pkg_short_errors_supported = yes; then
63759	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63760        else
63761	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63762        fi
63763	# Put the nasty error message in config.log where it belongs
63764	echo "$PNG_PKG_ERRORS" >&5
63765
63766	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63767$as_echo "no" >&6; }
63768                 LIBPNG_FOUND=no
63769elif test $pkg_failed = untried; then
63770	 LIBPNG_FOUND=no
63771else
63772	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63773	PNG_LIBS=$pkg_cv_PNG_LIBS
63774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63775$as_echo "yes" >&6; }
63776	 LIBPNG_FOUND=yes
63777fi
63778      if test "x${LIBPNG_FOUND}" = "xyes"; then
63779          USE_EXTERNAL_LIBPNG=true
63780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63781$as_echo "system" >&6; }
63782      else
63783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63784$as_echo "system not found" >&6; }
63785          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63786      fi
63787  else
63788      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63789  fi
63790
63791
63792
63793
63794
63795# Check whether --with-zlib was given.
63796if test "${with_zlib+set}" = set; then :
63797  withval=$with_zlib;
63798fi
63799
63800
63801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63802$as_echo_n "checking for compress in -lz... " >&6; }
63803if ${ac_cv_lib_z_compress+:} false; then :
63804  $as_echo_n "(cached) " >&6
63805else
63806  ac_check_lib_save_LIBS=$LIBS
63807LIBS="-lz  $LIBS"
63808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63809/* end confdefs.h.  */
63810
63811/* Override any GCC internal prototype to avoid an error.
63812   Use char because int might match the return type of a GCC
63813   builtin and then its argument prototype would still apply.  */
63814#ifdef __cplusplus
63815extern "C"
63816#endif
63817char compress ();
63818int
63819main ()
63820{
63821return compress ();
63822  ;
63823  return 0;
63824}
63825_ACEOF
63826if ac_fn_cxx_try_link "$LINENO"; then :
63827  ac_cv_lib_z_compress=yes
63828else
63829  ac_cv_lib_z_compress=no
63830fi
63831rm -f core conftest.err conftest.$ac_objext \
63832    conftest$ac_exeext conftest.$ac_ext
63833LIBS=$ac_check_lib_save_LIBS
63834fi
63835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63836$as_echo "$ac_cv_lib_z_compress" >&6; }
63837if test "x$ac_cv_lib_z_compress" = xyes; then :
63838   ZLIB_FOUND=yes
63839else
63840   ZLIB_FOUND=no
63841fi
63842
63843
63844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63845$as_echo_n "checking for which zlib to use... " >&6; }
63846
63847  DEFAULT_ZLIB=system
63848  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63849    # On windows default is bundled...on others default is system
63850    DEFAULT_ZLIB=bundled
63851  fi
63852
63853  if test "x${ZLIB_FOUND}" != "xyes"; then
63854    # If we don't find any system...set default to bundled
63855    DEFAULT_ZLIB=bundled
63856  fi
63857
63858  # If user didn't specify, use DEFAULT_ZLIB
63859  if test "x${with_zlib}" = "x"; then
63860    with_zlib=${DEFAULT_ZLIB}
63861  fi
63862
63863  if test "x${with_zlib}" = "xbundled"; then
63864    USE_EXTERNAL_LIBZ=false
63865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63866$as_echo "bundled" >&6; }
63867  elif test "x${with_zlib}" = "xsystem"; then
63868    if test "x${ZLIB_FOUND}" = "xyes"; then
63869      USE_EXTERNAL_LIBZ=true
63870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63871$as_echo "system" >&6; }
63872    else
63873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63874$as_echo "system not found" >&6; }
63875      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63876    fi
63877  else
63878    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63879  fi
63880
63881
63882
63883
63884
63885# Check whether --with-lcms was given.
63886if test "${with_lcms+set}" = set; then :
63887  withval=$with_lcms;
63888fi
63889
63890
63891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63892$as_echo_n "checking for which lcms to use... " >&6; }
63893
63894  DEFAULT_LCMS=bundled
63895  # If user didn't specify, use DEFAULT_LCMS
63896  if test "x${with_lcms}" = "x"; then
63897      with_lcms=${DEFAULT_LCMS}
63898  fi
63899
63900  if test "x${with_lcms}" = "xbundled"; then
63901    USE_EXTERNAL_LCMS=false
63902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63903$as_echo "bundled" >&6; }
63904  elif test "x${with_lcms}" = "xsystem"; then
63905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63906$as_echo "system" >&6; }
63907
63908pkg_failed=no
63909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63910$as_echo_n "checking for LCMS... " >&6; }
63911
63912if test -n "$LCMS_CFLAGS"; then
63913    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63914 elif test -n "$PKG_CONFIG"; then
63915    if test -n "$PKG_CONFIG" && \
63916    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63917  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63918  ac_status=$?
63919  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63920  test $ac_status = 0; }; then
63921  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63922else
63923  pkg_failed=yes
63924fi
63925 else
63926    pkg_failed=untried
63927fi
63928if test -n "$LCMS_LIBS"; then
63929    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63930 elif test -n "$PKG_CONFIG"; then
63931    if test -n "$PKG_CONFIG" && \
63932    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63933  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63934  ac_status=$?
63935  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63936  test $ac_status = 0; }; then
63937  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63938else
63939  pkg_failed=yes
63940fi
63941 else
63942    pkg_failed=untried
63943fi
63944
63945
63946
63947if test $pkg_failed = yes; then
63948
63949if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63950        _pkg_short_errors_supported=yes
63951else
63952        _pkg_short_errors_supported=no
63953fi
63954        if test $_pkg_short_errors_supported = yes; then
63955	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63956        else
63957	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63958        fi
63959	# Put the nasty error message in config.log where it belongs
63960	echo "$LCMS_PKG_ERRORS" >&5
63961
63962	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63963$as_echo "no" >&6; }
63964                LCMS_FOUND=no
63965elif test $pkg_failed = untried; then
63966	LCMS_FOUND=no
63967else
63968	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63969	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63971$as_echo "yes" >&6; }
63972	LCMS_FOUND=yes
63973fi
63974    if test "x${LCMS_FOUND}" = "xyes"; then
63975      USE_EXTERNAL_LCMS=true
63976    else
63977      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63978    fi
63979  else
63980    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63981  fi
63982
63983
63984
63985
63986
63987
63988
63989
63990
63991
63992
63993  # Setup libm (the maths library)
63994  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63996$as_echo_n "checking for cos in -lm... " >&6; }
63997if ${ac_cv_lib_m_cos+:} false; then :
63998  $as_echo_n "(cached) " >&6
63999else
64000  ac_check_lib_save_LIBS=$LIBS
64001LIBS="-lm  $LIBS"
64002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64003/* end confdefs.h.  */
64004
64005/* Override any GCC internal prototype to avoid an error.
64006   Use char because int might match the return type of a GCC
64007   builtin and then its argument prototype would still apply.  */
64008#ifdef __cplusplus
64009extern "C"
64010#endif
64011char cos ();
64012int
64013main ()
64014{
64015return cos ();
64016  ;
64017  return 0;
64018}
64019_ACEOF
64020if ac_fn_cxx_try_link "$LINENO"; then :
64021  ac_cv_lib_m_cos=yes
64022else
64023  ac_cv_lib_m_cos=no
64024fi
64025rm -f core conftest.err conftest.$ac_objext \
64026    conftest$ac_exeext conftest.$ac_ext
64027LIBS=$ac_check_lib_save_LIBS
64028fi
64029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64030$as_echo "$ac_cv_lib_m_cos" >&6; }
64031if test "x$ac_cv_lib_m_cos" = xyes; then :
64032  cat >>confdefs.h <<_ACEOF
64033#define HAVE_LIBM 1
64034_ACEOF
64035
64036  LIBS="-lm $LIBS"
64037
64038else
64039
64040        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64041$as_echo "$as_me: Maths library was not found" >&6;}
64042
64043fi
64044
64045    LIBM="-lm"
64046  else
64047    LIBM=""
64048  fi
64049
64050
64051  # Setup libdl (for dynamic library loading)
64052  save_LIBS="$LIBS"
64053  LIBS=""
64054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64055$as_echo_n "checking for dlopen in -ldl... " >&6; }
64056if ${ac_cv_lib_dl_dlopen+:} false; then :
64057  $as_echo_n "(cached) " >&6
64058else
64059  ac_check_lib_save_LIBS=$LIBS
64060LIBS="-ldl  $LIBS"
64061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64062/* end confdefs.h.  */
64063
64064/* Override any GCC internal prototype to avoid an error.
64065   Use char because int might match the return type of a GCC
64066   builtin and then its argument prototype would still apply.  */
64067#ifdef __cplusplus
64068extern "C"
64069#endif
64070char dlopen ();
64071int
64072main ()
64073{
64074return dlopen ();
64075  ;
64076  return 0;
64077}
64078_ACEOF
64079if ac_fn_cxx_try_link "$LINENO"; then :
64080  ac_cv_lib_dl_dlopen=yes
64081else
64082  ac_cv_lib_dl_dlopen=no
64083fi
64084rm -f core conftest.err conftest.$ac_objext \
64085    conftest$ac_exeext conftest.$ac_ext
64086LIBS=$ac_check_lib_save_LIBS
64087fi
64088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64089$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64090if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64091  cat >>confdefs.h <<_ACEOF
64092#define HAVE_LIBDL 1
64093_ACEOF
64094
64095  LIBS="-ldl $LIBS"
64096
64097fi
64098
64099  LIBDL="$LIBS"
64100
64101  LIBS="$save_LIBS"
64102
64103  # Deprecated libraries, keep the flags for backwards compatibility
64104  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64105
64106
64107# Check whether --with-dxsdk was given.
64108if test "${with_dxsdk+set}" = set; then :
64109  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64110$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64111fi
64112
64113
64114
64115
64116# Check whether --with-dxsdk-lib was given.
64117if test "${with_dxsdk_lib+set}" = set; then :
64118  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64119$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64120fi
64121
64122
64123
64124
64125# Check whether --with-dxsdk-include was given.
64126if test "${with_dxsdk_include+set}" = set; then :
64127  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64128$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64129fi
64130
64131
64132  fi
64133
64134  # Control if libzip can use mmap. Available for purposes of overriding.
64135  LIBZIP_CAN_USE_MMAP=true
64136
64137
64138
64139  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64140    # Find the root of the Solaris Studio installation from the compiler path
64141    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64142    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64144$as_echo_n "checking for libstlport.so.1... " >&6; }
64145    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64146      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64147      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64148    fi
64149    if test -f "$STLPORT_LIB"; then
64150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64151$as_echo "yes, $STLPORT_LIB" >&6; }
64152
64153  # Only process if variable expands to non-empty
64154
64155  if test "x$STLPORT_LIB" != x; then
64156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64157
64158  # Input might be given as Windows format, start by converting to
64159  # unix format.
64160  path="$STLPORT_LIB"
64161  new_path=`$CYGPATH -u "$path"`
64162
64163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64166  # "foo.exe" is OK but "foo" is an error.
64167  #
64168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64169  # It is also a way to make sure we got the proper file name for the real test later on.
64170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64171  if test "x$test_shortpath" = x; then
64172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64173$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64174    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64175  fi
64176
64177  # Call helper function which possibly converts this using DOS-style short mode.
64178  # If so, the updated path is stored in $new_path.
64179
64180  input_path="$new_path"
64181  # Check if we need to convert this using DOS-style short mode. If the path
64182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64183  # take no chances and rewrite it.
64184  # Note: m4 eats our [], so we need to use [ and ] instead.
64185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64186  if test "x$has_forbidden_chars" != x; then
64187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64191      # Going to short mode and back again did indeed matter. Since short mode is
64192      # case insensitive, let's make it lowercase to improve readability.
64193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64194      # Now convert it back to Unix-style (cygpath)
64195      input_path=`$CYGPATH -u "$shortmode_path"`
64196      new_path="$input_path"
64197    fi
64198  fi
64199
64200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64201  if test "x$test_cygdrive_prefix" = x; then
64202    # As a simple fix, exclude /usr/bin since it's not a real path.
64203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64205      # a path prefixed by /cygdrive for fixpath to work.
64206      new_path="$CYGWIN_ROOT_PATH$input_path"
64207    fi
64208  fi
64209
64210
64211  if test "x$path" != "x$new_path"; then
64212    STLPORT_LIB="$new_path"
64213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64214$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64215  fi
64216
64217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64218
64219  path="$STLPORT_LIB"
64220  has_colon=`$ECHO $path | $GREP ^.:`
64221  new_path="$path"
64222  if test "x$has_colon" = x; then
64223    # Not in mixed or Windows style, start by that.
64224    new_path=`cmd //c echo $path`
64225  fi
64226
64227
64228  input_path="$new_path"
64229  # Check if we need to convert this using DOS-style short mode. If the path
64230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64231  # take no chances and rewrite it.
64232  # Note: m4 eats our [], so we need to use [ and ] instead.
64233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64234  if test "x$has_forbidden_chars" != x; then
64235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64237  fi
64238
64239
64240  windows_path="$new_path"
64241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64242    unix_path=`$CYGPATH -u "$windows_path"`
64243    new_path="$unix_path"
64244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64246    new_path="$unix_path"
64247  fi
64248
64249  if test "x$path" != "x$new_path"; then
64250    STLPORT_LIB="$new_path"
64251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64252$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64253  fi
64254
64255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64257
64258    else
64259      # We're on a unix platform. Hooray! :)
64260      path="$STLPORT_LIB"
64261      has_space=`$ECHO "$path" | $GREP " "`
64262      if test "x$has_space" != x; then
64263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64264$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64266      fi
64267
64268      # Use eval to expand a potential ~
64269      eval path="$path"
64270      if test ! -f "$path" && test ! -d "$path"; then
64271        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64272      fi
64273
64274      if test -d "$path"; then
64275        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64276      else
64277        dir="`$DIRNAME "$path"`"
64278        base="`$BASENAME "$path"`"
64279        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64280      fi
64281    fi
64282  fi
64283
64284    else
64285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64286$as_echo "no, not found at $STLPORT_LIB" >&6; }
64287      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64288    fi
64289
64290  fi
64291
64292
64293
64294# Check whether --with-libelf was given.
64295if test "${with_libelf+set}" = set; then :
64296  withval=$with_libelf;
64297fi
64298
64299
64300# Check whether --with-libelf-include was given.
64301if test "${with_libelf_include+set}" = set; then :
64302  withval=$with_libelf_include;
64303fi
64304
64305
64306# Check whether --with-libelf-lib was given.
64307if test "${with_libelf_lib+set}" = set; then :
64308  withval=$with_libelf_lib;
64309fi
64310
64311
64312  if test "x$ENABLE_AOT" = xfalse; then
64313    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64314        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64315        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64316      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64317$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64318    fi
64319    LIBELF_CFLAGS=
64320    LIBELF_LIBS=
64321  else
64322    LIBELF_FOUND=no
64323
64324    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64325      ENABLE_AOT="false"
64326      if test "x${enable_aot}" = xyes; then
64327        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64328      fi
64329    else
64330      if test "x${with_libelf}" != x; then
64331        ELF_LIBS="-L${with_libelf}/lib -lelf"
64332        ELF_CFLAGS="-I${with_libelf}/include"
64333        LIBELF_FOUND=yes
64334      fi
64335      if test "x${with_libelf_include}" != x; then
64336        ELF_CFLAGS="-I${with_libelf_include}"
64337        LIBELF_FOUND=yes
64338      fi
64339      if test "x${with_libelf_lib}" != x; then
64340        ELF_LIBS="-L${with_libelf_lib} -lelf"
64341        LIBELF_FOUND=yes
64342      fi
64343      # Do not try pkg-config if we have a sysroot set.
64344      if test "x$SYSROOT" = x; then
64345        if test "x$LIBELF_FOUND" = xno; then
64346          # Figure out ELF_CFLAGS and ELF_LIBS
64347
64348pkg_failed=no
64349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64350$as_echo_n "checking for ELF... " >&6; }
64351
64352if test -n "$ELF_CFLAGS"; then
64353    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64354 elif test -n "$PKG_CONFIG"; then
64355    if test -n "$PKG_CONFIG" && \
64356    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64357  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64358  ac_status=$?
64359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64360  test $ac_status = 0; }; then
64361  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64362else
64363  pkg_failed=yes
64364fi
64365 else
64366    pkg_failed=untried
64367fi
64368if test -n "$ELF_LIBS"; then
64369    pkg_cv_ELF_LIBS="$ELF_LIBS"
64370 elif test -n "$PKG_CONFIG"; then
64371    if test -n "$PKG_CONFIG" && \
64372    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64373  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64374  ac_status=$?
64375  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64376  test $ac_status = 0; }; then
64377  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64378else
64379  pkg_failed=yes
64380fi
64381 else
64382    pkg_failed=untried
64383fi
64384
64385
64386
64387if test $pkg_failed = yes; then
64388
64389if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64390        _pkg_short_errors_supported=yes
64391else
64392        _pkg_short_errors_supported=no
64393fi
64394        if test $_pkg_short_errors_supported = yes; then
64395	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64396        else
64397	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64398        fi
64399	# Put the nasty error message in config.log where it belongs
64400	echo "$ELF_PKG_ERRORS" >&5
64401
64402	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64403$as_echo "no" >&6; }
64404                LIBELF_FOUND=no
64405elif test $pkg_failed = untried; then
64406	LIBELF_FOUND=no
64407else
64408	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64409	ELF_LIBS=$pkg_cv_ELF_LIBS
64410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64411$as_echo "yes" >&6; }
64412	LIBELF_FOUND=yes
64413fi
64414        fi
64415      fi
64416      if test "x$LIBELF_FOUND" = xno; then
64417        for ac_header in libelf.h
64418do :
64419  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64420if test "x$ac_cv_header_libelf_h" = xyes; then :
64421  cat >>confdefs.h <<_ACEOF
64422#define HAVE_LIBELF_H 1
64423_ACEOF
64424
64425              LIBELF_FOUND=yes
64426              ELF_CFLAGS=
64427              ELF_LIBS=-lelf
64428
64429else
64430  LIBELF_FOUND=no
64431
64432fi
64433
64434done
64435
64436      fi
64437      if test "x$LIBELF_FOUND" = xno; then
64438        ENABLE_AOT="false"
64439
64440  # Print a helpful message on how to acquire the necessary build dependency.
64441  # elf is the help tag: freetype, cups, alsa etc
64442  MISSING_DEPENDENCY=elf
64443
64444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64445    cygwin_help $MISSING_DEPENDENCY
64446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64447    msys_help $MISSING_DEPENDENCY
64448  else
64449    PKGHANDLER_COMMAND=
64450
64451    case $PKGHANDLER in
64452      apt-get)
64453        apt_help     $MISSING_DEPENDENCY ;;
64454      yum)
64455        yum_help     $MISSING_DEPENDENCY ;;
64456      brew)
64457        brew_help    $MISSING_DEPENDENCY ;;
64458      port)
64459        port_help    $MISSING_DEPENDENCY ;;
64460      pkgutil)
64461        pkgutil_help $MISSING_DEPENDENCY ;;
64462      pkgadd)
64463        pkgadd_help  $MISSING_DEPENDENCY ;;
64464    esac
64465
64466    if test "x$PKGHANDLER_COMMAND" != x; then
64467      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64468    fi
64469  fi
64470
64471        if test "x${enable_aot}" = xyes; then
64472          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64473        else
64474          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64475$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64476        fi
64477      else
64478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64479$as_echo_n "checking if libelf works... " >&6; }
64480        ac_ext=c
64481ac_cpp='$CPP $CPPFLAGS'
64482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64484ac_compiler_gnu=$ac_cv_c_compiler_gnu
64485
64486        OLD_CFLAGS="$CFLAGS"
64487        CFLAGS="$CFLAGS $ELF_CFLAGS"
64488        OLD_LIBS="$LIBS"
64489        LIBS="$LIBS $ELF_LIBS"
64490        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64491/* end confdefs.h.  */
64492#include <libelf.h>
64493int
64494main ()
64495{
64496
64497              elf_version(0);
64498              return 0;
64499
64500  ;
64501  return 0;
64502}
64503_ACEOF
64504if ac_fn_c_try_link "$LINENO"; then :
64505  LIBELF_WORKS=yes
64506else
64507  LIBELF_WORKS=no
64508
64509fi
64510rm -f core conftest.err conftest.$ac_objext \
64511    conftest$ac_exeext conftest.$ac_ext
64512        CFLAGS="$OLD_CFLAGS"
64513        LIBS="$OLD_LIBS"
64514        ac_ext=cpp
64515ac_cpp='$CXXCPP $CPPFLAGS'
64516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64519
64520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64521$as_echo "$LIBELF_WORKS" >&6; }
64522
64523        if test "x$LIBELF_WORKS" = xno; then
64524          ENABLE_AOT="false"
64525
64526  # Print a helpful message on how to acquire the necessary build dependency.
64527  # elf is the help tag: freetype, cups, alsa etc
64528  MISSING_DEPENDENCY=elf
64529
64530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64531    cygwin_help $MISSING_DEPENDENCY
64532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64533    msys_help $MISSING_DEPENDENCY
64534  else
64535    PKGHANDLER_COMMAND=
64536
64537    case $PKGHANDLER in
64538      apt-get)
64539        apt_help     $MISSING_DEPENDENCY ;;
64540      yum)
64541        yum_help     $MISSING_DEPENDENCY ;;
64542      brew)
64543        brew_help    $MISSING_DEPENDENCY ;;
64544      port)
64545        port_help    $MISSING_DEPENDENCY ;;
64546      pkgutil)
64547        pkgutil_help $MISSING_DEPENDENCY ;;
64548      pkgadd)
64549        pkgadd_help  $MISSING_DEPENDENCY ;;
64550    esac
64551
64552    if test "x$PKGHANDLER_COMMAND" != x; then
64553      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64554    fi
64555  fi
64556
64557          if test "x$enable_aot" = "xyes"; then
64558            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64559          else
64560            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64561$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64562          fi
64563        fi
64564      fi
64565    fi
64566  fi
64567
64568
64569
64570
64571
64572
64573
64574
64575
64576
64577
64578
64579
64580
64581
64582
64583
64584
64585# Hotspot setup depends on lib checks (AOT needs libelf).
64586
64587
64588  # The user can in some cases supply additional jvm features. For the custom
64589  # variant, this defines the entire variant.
64590
64591# Check whether --with-jvm-features was given.
64592if test "${with_jvm_features+set}" = set; then :
64593  withval=$with_jvm_features;
64594fi
64595
64596  if test "x$with_jvm_features" != x; then
64597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64598$as_echo_n "checking additional JVM features... " >&6; }
64599    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64601$as_echo "$JVM_FEATURES" >&6; }
64602  fi
64603
64604  # Override hotspot cpu definitions for ARM platforms
64605  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64606    HOTSPOT_TARGET_CPU=arm_32
64607    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64608    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64609    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64610  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64611    HOTSPOT_TARGET_CPU=arm_64
64612    HOTSPOT_TARGET_CPU_ARCH=arm
64613    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64614    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64615  fi
64616
64617  # Verify that dependencies are met for explicitly set features.
64618  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64619    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64620  fi
64621
64622  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64623    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64624  fi
64625
64626  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64627    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64628  fi
64629
64630  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64631    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64632  fi
64633
64634  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64635    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64636  fi
64637
64638  # Turn on additional features based on other parts of configure
64639  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64640    JVM_FEATURES="$JVM_FEATURES dtrace"
64641  else
64642    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64643      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64644    fi
64645  fi
64646
64647  if test "x$STATIC_BUILD" = "xtrue"; then
64648    JVM_FEATURES="$JVM_FEATURES static-build"
64649  else
64650    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64651      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64652    fi
64653  fi
64654
64655  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64656    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64657      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64658    fi
64659  fi
64660
64661  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64662    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64663      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64664    fi
64665  fi
64666
64667  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64668  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64669     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64670     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64671    JVM_FEATURES_jvmci="jvmci"
64672  else
64673    JVM_FEATURES_jvmci=""
64674  fi
64675
64676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64677$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64678  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64680$as_echo "yes, forced" >&6; }
64681    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64682      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64683    fi
64684    INCLUDE_GRAAL="true"
64685  else
64686    # By default enable graal build where AOT is available
64687    if test "x$ENABLE_AOT" = "xtrue"; then
64688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64689$as_echo "yes" >&6; }
64690      JVM_FEATURES_graal="graal"
64691      INCLUDE_GRAAL="true"
64692    else
64693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64694$as_echo "no" >&6; }
64695      JVM_FEATURES_graal=""
64696      INCLUDE_GRAAL="false"
64697    fi
64698  fi
64699
64700
64701
64702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64703$as_echo_n "checking if aot should be enabled... " >&6; }
64704  if test "x$ENABLE_AOT" = "xtrue"; then
64705    if test "x$enable_aot" = "xyes"; then
64706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64707$as_echo "yes, forced" >&6; }
64708    else
64709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64710$as_echo "yes" >&6; }
64711    fi
64712    JVM_FEATURES_aot="aot"
64713  else
64714    if test "x$enable_aot" = "xno"; then
64715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64716$as_echo "no, forced" >&6; }
64717    else
64718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64719$as_echo "no" >&6; }
64720    fi
64721    JVM_FEATURES_aot=""
64722  fi
64723
64724  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64725    # Default to use link time optimizations on minimal on arm
64726    JVM_FEATURES_link_time_opt="link-time-opt"
64727  else
64728    JVM_FEATURES_link_time_opt=""
64729  fi
64730
64731  # All variants but minimal (and custom) get these features
64732  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64733
64734  # Enable features depending on variant.
64735  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64736  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64737  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64738  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64739  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64740  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64741  JVM_FEATURES_custom="$JVM_FEATURES"
64742
64743
64744
64745
64746
64747
64748
64749
64750
64751  # Used for verification of Makefiles by check-jvm-feature
64752
64753
64754  # We don't support --with-jvm-interpreter anymore, use zero instead.
64755
64756
64757# Check whether --with-jvm-interpreter was given.
64758if test "${with_jvm_interpreter+set}" = set; then :
64759  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64760$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64761fi
64762
64763
64764
64765
64766###############################################################################
64767#
64768# We need to do some final tweaking, when everything else is done.
64769#
64770###############################################################################
64771
64772
64773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64774$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64775
64776  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64777    ENABLE_INTREE_EC=yes
64778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64779$as_echo "yes" >&6; }
64780  else
64781    ENABLE_INTREE_EC=no
64782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64783$as_echo "no" >&6; }
64784  fi
64785
64786
64787
64788
64789  # Check whether --enable-jtreg-failure-handler was given.
64790if test "${enable_jtreg_failure_handler+set}" = set; then :
64791  enableval=$enable_jtreg_failure_handler;
64792fi
64793
64794
64795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64796$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64797
64798  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64799    if test "x$JT_HOME" = "x"; then
64800      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64801    else
64802      BUILD_FAILURE_HANDLER=true
64803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64804$as_echo "yes, forced" >&6; }
64805    fi
64806  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64807    BUILD_FAILURE_HANDLER=false
64808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64809$as_echo "no, forced" >&6; }
64810  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64811      || test "x$enable_jtreg_failure_handler" = "x"; then
64812    if test "x$JT_HOME" = "x"; then
64813      BUILD_FAILURE_HANDLER=false
64814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64815$as_echo "no, missing jtreg" >&6; }
64816    else
64817      BUILD_FAILURE_HANDLER=true
64818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64819$as_echo "yes, jtreg present" >&6; }
64820    fi
64821  else
64822    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64823  fi
64824
64825
64826
64827
64828  # Check whether --enable-generate-classlist was given.
64829if test "${enable_generate_classlist+set}" = set; then :
64830  enableval=$enable_generate_classlist;
64831fi
64832
64833
64834  # Check if it's likely that it's possible to generate the classlist. Depending
64835  # on exact jvm configuration it could be possible anyway.
64836  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64837    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64838  else
64839    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64840  fi
64841
64842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64843$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64844  if test "x$enable_generate_classlist" = "xyes"; then
64845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64846$as_echo "yes, forced" >&6; }
64847    ENABLE_GENERATE_CLASSLIST="true"
64848    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64849      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64850$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64851    fi
64852  elif test "x$enable_generate_classlist" = "xno"; then
64853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64854$as_echo "no, forced" >&6; }
64855    ENABLE_GENERATE_CLASSLIST="false"
64856  elif test "x$enable_generate_classlist" = "x"; then
64857    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64859$as_echo "yes" >&6; }
64860      ENABLE_GENERATE_CLASSLIST="true"
64861    else
64862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64863$as_echo "no" >&6; }
64864      ENABLE_GENERATE_CLASSLIST="false"
64865    fi
64866  else
64867    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64868  fi
64869
64870
64871
64872
64873###############################################################################
64874#
64875# Configure parts of the build that only affect the build performance,
64876# not the result.
64877#
64878###############################################################################
64879
64880
64881  # How many cores do we have on this build system?
64882
64883# Check whether --with-num-cores was given.
64884if test "${with_num_cores+set}" = set; then :
64885  withval=$with_num_cores;
64886fi
64887
64888  if test "x$with_num_cores" = x; then
64889    # The number of cores were not specified, try to probe them.
64890
64891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64892$as_echo_n "checking for number of cores... " >&6; }
64893  NUM_CORES=1
64894  FOUND_CORES=no
64895
64896  if test -f /proc/cpuinfo; then
64897    # Looks like a Linux (or cygwin) system
64898    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64899    FOUND_CORES=yes
64900  elif test -x /usr/sbin/psrinfo; then
64901    # Looks like a Solaris system
64902    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64903    FOUND_CORES=yes
64904  elif test -x /usr/sbin/sysctl; then
64905    # Looks like a MacOSX system
64906    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64907    FOUND_CORES=yes
64908  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64909    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64910    FOUND_CORES=yes
64911  elif test -n "$NUMBER_OF_PROCESSORS"; then
64912    # On windows, look in the env
64913    NUM_CORES=$NUMBER_OF_PROCESSORS
64914    FOUND_CORES=yes
64915  fi
64916
64917  if test "x$FOUND_CORES" = xyes; then
64918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64919$as_echo "$NUM_CORES" >&6; }
64920  else
64921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64922$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64924$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64925  fi
64926
64927  else
64928    NUM_CORES=$with_num_cores
64929  fi
64930
64931
64932
64933  # How much memory do we have on this build system?
64934
64935# Check whether --with-memory-size was given.
64936if test "${with_memory_size+set}" = set; then :
64937  withval=$with_memory_size;
64938fi
64939
64940  if test "x$with_memory_size" = x; then
64941    # The memory size was not specified, try to probe it.
64942
64943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64944$as_echo_n "checking for memory size... " >&6; }
64945  # Default to 1024 MB
64946  MEMORY_SIZE=1024
64947  FOUND_MEM=no
64948
64949  if test -f /proc/meminfo; then
64950    # Looks like a Linux (or cygwin) system
64951    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64952    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64953    FOUND_MEM=yes
64954  elif test -x /usr/sbin/prtconf; then
64955    # Looks like a Solaris or AIX system
64956    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64957    FOUND_MEM=yes
64958  elif test -x /usr/sbin/sysctl; then
64959    # Looks like a MacOSX system
64960    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64961    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64962    FOUND_MEM=yes
64963  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64964    # Windows, but without cygwin
64965    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64966    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64967    FOUND_MEM=yes
64968  fi
64969
64970  if test "x$FOUND_MEM" = xyes; then
64971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64972$as_echo "$MEMORY_SIZE MB" >&6; }
64973  else
64974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64975$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64977$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64978  fi
64979
64980  else
64981    MEMORY_SIZE=$with_memory_size
64982  fi
64983
64984
64985
64986  # Provide a decent default number of parallel jobs for make depending on
64987  # number of cores, amount of memory and machine architecture.
64988
64989# Check whether --with-jobs was given.
64990if test "${with_jobs+set}" = set; then :
64991  withval=$with_jobs;
64992fi
64993
64994  if test "x$with_jobs" = x; then
64995    # Number of jobs was not specified, calculate.
64996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64997$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64998    # Approximate memory in GB.
64999    memory_gb=`expr $MEMORY_SIZE / 1024`
65000    # Pick the lowest of memory in gb and number of cores.
65001    if test "$memory_gb" -lt "$NUM_CORES"; then
65002      JOBS="$memory_gb"
65003    else
65004      JOBS="$NUM_CORES"
65005    fi
65006    if test "$JOBS" -eq "0"; then
65007      JOBS=1
65008    fi
65009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65010$as_echo "$JOBS" >&6; }
65011  else
65012    JOBS=$with_jobs
65013  fi
65014
65015
65016
65017  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65018
65019# Check whether --with-test-jobs was given.
65020if test "${with_test_jobs+set}" = set; then :
65021  withval=$with_test_jobs;
65022fi
65023
65024  if test "x$with_test_jobs" = x; then
65025      TEST_JOBS=0
65026  else
65027      TEST_JOBS=$with_test_jobs
65028  fi
65029
65030
65031
65032# Setup arguments for the boot jdk (after cores and memory have been setup)
65033
65034  ##############################################################################
65035  #
65036  # Specify jvm options for anything that is run with the Boot JDK.
65037  # Not all JVM:s accept the same arguments on the command line.
65038  #
65039
65040# Check whether --with-boot-jdk-jvmargs was given.
65041if test "${with_boot_jdk_jvmargs+set}" = set; then :
65042  withval=$with_boot_jdk_jvmargs;
65043fi
65044
65045
65046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65047$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65048
65049  # Disable special log output when a debug build is used as Boot JDK...
65050
65051  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65052  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65053  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65054  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65055  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65056  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65057    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65058    JVM_ARG_OK=true
65059  else
65060    $ECHO "Arg failed:" >&5
65061    $ECHO "$OUTPUT" >&5
65062    JVM_ARG_OK=false
65063  fi
65064
65065
65066  # Force en-US environment
65067
65068  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65069  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65070  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65071  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65072  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65073  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65074    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65075    JVM_ARG_OK=true
65076  else
65077    $ECHO "Arg failed:" >&5
65078    $ECHO "$OUTPUT" >&5
65079    JVM_ARG_OK=false
65080  fi
65081
65082
65083  # Apply user provided options.
65084
65085  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65086  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65087  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65088  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65089  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65091    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65092    JVM_ARG_OK=true
65093  else
65094    $ECHO "Arg failed:" >&5
65095    $ECHO "$OUTPUT" >&5
65096    JVM_ARG_OK=false
65097  fi
65098
65099
65100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65101$as_echo "$boot_jdk_jvmargs" >&6; }
65102
65103  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65104  JAVA_FLAGS=$boot_jdk_jvmargs
65105
65106
65107
65108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65109$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65110
65111  # Starting amount of heap memory.
65112
65113  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65114  $ECHO "Command: $JAVA -Xms64M -version" >&5
65115  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65116  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65117  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65118  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65119    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65120    JVM_ARG_OK=true
65121  else
65122    $ECHO "Arg failed:" >&5
65123    $ECHO "$OUTPUT" >&5
65124    JVM_ARG_OK=false
65125  fi
65126
65127  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65128
65129  # Maximum amount of heap memory and stack size.
65130  JVM_HEAP_LIMIT_32="1024"
65131  # Running a 64 bit JVM allows for and requires a bigger heap
65132  JVM_HEAP_LIMIT_64="1600"
65133  STACK_SIZE_32=768
65134  STACK_SIZE_64=1536
65135  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65136  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65137    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65138  fi
65139  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65140    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65141  fi
65142  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65143    JVM_HEAP_LIMIT_32=512
65144    JVM_HEAP_LIMIT_64=512
65145  fi
65146
65147  if test "x$BOOT_JDK_BITS" = "x32"; then
65148    STACK_SIZE=$STACK_SIZE_32
65149    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65150  else
65151    STACK_SIZE=$STACK_SIZE_64
65152    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65153  fi
65154
65155  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65156  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65157  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65158  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65159  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65160  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65161    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65162    JVM_ARG_OK=true
65163  else
65164    $ECHO "Arg failed:" >&5
65165    $ECHO "$OUTPUT" >&5
65166    JVM_ARG_OK=false
65167  fi
65168
65169
65170  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65171  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65172  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65173  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65174  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65175  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65176    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65177    JVM_ARG_OK=true
65178  else
65179    $ECHO "Arg failed:" >&5
65180    $ECHO "$OUTPUT" >&5
65181    JVM_ARG_OK=false
65182  fi
65183
65184
65185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65186$as_echo "$boot_jdk_jvmargs_big" >&6; }
65187
65188  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65189
65190
65191  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65192    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65193    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65194  else
65195    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65196    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65197  fi
65198  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65199  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65201$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65203$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65204
65205
65206  # By default, the main javac compilations use big
65207  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65208
65209
65210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65211$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65212
65213  # Use serial gc for small short lived tools if possible
65214
65215  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65216  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65217  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65218  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65219  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65220  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65221    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65222    JVM_ARG_OK=true
65223  else
65224    $ECHO "Arg failed:" >&5
65225    $ECHO "$OUTPUT" >&5
65226    JVM_ARG_OK=false
65227  fi
65228
65229
65230  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65231  $ECHO "Command: $JAVA -Xms32M -version" >&5
65232  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65233  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65234  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65235  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65236    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65237    JVM_ARG_OK=true
65238  else
65239    $ECHO "Arg failed:" >&5
65240    $ECHO "$OUTPUT" >&5
65241    JVM_ARG_OK=false
65242  fi
65243
65244
65245  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65246  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65247  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65248  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65249  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65250  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65251    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65252    JVM_ARG_OK=true
65253  else
65254    $ECHO "Arg failed:" >&5
65255    $ECHO "$OUTPUT" >&5
65256    JVM_ARG_OK=false
65257  fi
65258
65259
65260  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65261  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65262  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65263  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65264  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65265  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65266    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65267    JVM_ARG_OK=true
65268  else
65269    $ECHO "Arg failed:" >&5
65270    $ECHO "$OUTPUT" >&5
65271    JVM_ARG_OK=false
65272  fi
65273
65274
65275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65276$as_echo "$boot_jdk_jvmargs_small" >&6; }
65277
65278  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65279
65280
65281  JAVA_TOOL_FLAGS_SMALL=""
65282  for f in $JAVA_FLAGS_SMALL; do
65283    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65284  done
65285
65286
65287
65288# Setup smart javac (after cores and memory have been setup)
65289
65290
65291# Check whether --with-sjavac-server-java was given.
65292if test "${with_sjavac_server_java+set}" = set; then :
65293  withval=$with_sjavac_server_java;
65294fi
65295
65296
65297  if test "x$with_sjavac_server_java" != x; then
65298    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65299    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65300    if test "x$FOUND_VERSION" = x; then
65301      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65302    fi
65303  else
65304    SJAVAC_SERVER_JAVA="$JAVA"
65305  fi
65306
65307
65308  if test "$MEMORY_SIZE" -gt "3000"; then
65309
65310  $ECHO "Check if jvm arg is ok: -d64" >&5
65311  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65312  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65313  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65314  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65315  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65316    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65317    JVM_ARG_OK=true
65318  else
65319    $ECHO "Arg failed:" >&5
65320    $ECHO "$OUTPUT" >&5
65321    JVM_ARG_OK=false
65322  fi
65323
65324    if test "$JVM_ARG_OK" = true; then
65325      JVM_64BIT=true
65326      JVM_ARG_OK=false
65327    fi
65328  fi
65329
65330  MX_VALUE=`expr $MEMORY_SIZE / 2`
65331  if test "$JVM_64BIT" = true; then
65332    # Set ms lower than mx since more than one instance of the server might
65333    # get launched at the same time before they figure out which instance won.
65334    MS_VALUE=512
65335    if test "$MX_VALUE" -gt "2048"; then
65336      MX_VALUE=2048
65337    fi
65338  else
65339    MS_VALUE=256
65340    if test "$MX_VALUE" -gt "1500"; then
65341      MX_VALUE=1500
65342    fi
65343  fi
65344  if test "$MX_VALUE" -lt "512"; then
65345    MX_VALUE=512
65346  fi
65347
65348  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65349  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65350  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65351  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65352  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65353  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65354    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65355    JVM_ARG_OK=true
65356  else
65357    $ECHO "Arg failed:" >&5
65358    $ECHO "$OUTPUT" >&5
65359    JVM_ARG_OK=false
65360  fi
65361
65362
65363
65364  # Check whether --enable-sjavac was given.
65365if test "${enable_sjavac+set}" = set; then :
65366  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65367else
65368  ENABLE_SJAVAC="no"
65369fi
65370
65371  if test "x$JVM_ARG_OK" = "xfalse"; then
65372    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65373$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65374    ENABLE_SJAVAC="no"
65375  fi
65376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65377$as_echo_n "checking whether to use sjavac... " >&6; }
65378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65379$as_echo "$ENABLE_SJAVAC" >&6; }
65380
65381
65382  # Check whether --enable-javac-server was given.
65383if test "${enable_javac_server+set}" = set; then :
65384  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65385else
65386  ENABLE_JAVAC_SERVER="yes"
65387fi
65388
65389  if test "x$JVM_ARG_OK" = "xfalse"; then
65390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65391$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65392    ENABLE_JAVAC_SERVER="no"
65393  fi
65394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65395$as_echo_n "checking whether to use javac server... " >&6; }
65396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65397$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65398
65399
65400  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65401    # When using a server javac, the small client instances do not need much
65402    # resources.
65403    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65404  fi
65405
65406
65407# Setup use of icecc if requested
65408
65409  # Check whether --enable-icecc was given.
65410if test "${enable_icecc+set}" = set; then :
65411  enableval=$enable_icecc;
65412fi
65413
65414
65415  if test "x${enable_icecc}" = "xyes"; then
65416
65417
65418
65419  # Publish this variable in the help.
65420
65421
65422  if [ -z "${ICECC_CMD+x}" ]; then
65423    # The variable is not set by user, try to locate tool using the code snippet
65424    for ac_prog in icecc
65425do
65426  # Extract the first word of "$ac_prog", so it can be a program name with args.
65427set dummy $ac_prog; ac_word=$2
65428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65429$as_echo_n "checking for $ac_word... " >&6; }
65430if ${ac_cv_path_ICECC_CMD+:} false; then :
65431  $as_echo_n "(cached) " >&6
65432else
65433  case $ICECC_CMD in
65434  [\\/]* | ?:[\\/]*)
65435  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65436  ;;
65437  *)
65438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65439for as_dir in $PATH
65440do
65441  IFS=$as_save_IFS
65442  test -z "$as_dir" && as_dir=.
65443    for ac_exec_ext in '' $ac_executable_extensions; do
65444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65445    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65447    break 2
65448  fi
65449done
65450  done
65451IFS=$as_save_IFS
65452
65453  ;;
65454esac
65455fi
65456ICECC_CMD=$ac_cv_path_ICECC_CMD
65457if test -n "$ICECC_CMD"; then
65458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65459$as_echo "$ICECC_CMD" >&6; }
65460else
65461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65462$as_echo "no" >&6; }
65463fi
65464
65465
65466  test -n "$ICECC_CMD" && break
65467done
65468
65469  else
65470    # The variable is set, but is it from the command line or the environment?
65471
65472    # Try to remove the string !ICECC_CMD! from our list.
65473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65475      # If it failed, the variable was not from the command line. Ignore it,
65476      # but warn the user (except for BASH, which is always set by the calling BASH).
65477      if test "xICECC_CMD" != xBASH; then
65478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65479$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65480      fi
65481      # Try to locate tool using the code snippet
65482      for ac_prog in icecc
65483do
65484  # Extract the first word of "$ac_prog", so it can be a program name with args.
65485set dummy $ac_prog; ac_word=$2
65486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65487$as_echo_n "checking for $ac_word... " >&6; }
65488if ${ac_cv_path_ICECC_CMD+:} false; then :
65489  $as_echo_n "(cached) " >&6
65490else
65491  case $ICECC_CMD in
65492  [\\/]* | ?:[\\/]*)
65493  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65494  ;;
65495  *)
65496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65497for as_dir in $PATH
65498do
65499  IFS=$as_save_IFS
65500  test -z "$as_dir" && as_dir=.
65501    for ac_exec_ext in '' $ac_executable_extensions; do
65502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65503    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65505    break 2
65506  fi
65507done
65508  done
65509IFS=$as_save_IFS
65510
65511  ;;
65512esac
65513fi
65514ICECC_CMD=$ac_cv_path_ICECC_CMD
65515if test -n "$ICECC_CMD"; then
65516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65517$as_echo "$ICECC_CMD" >&6; }
65518else
65519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65520$as_echo "no" >&6; }
65521fi
65522
65523
65524  test -n "$ICECC_CMD" && break
65525done
65526
65527    else
65528      # If it succeeded, then it was overridden by the user. We will use it
65529      # for the tool.
65530
65531      # First remove it from the list of overridden variables, so we can test
65532      # for unknown variables in the end.
65533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65534
65535      # Check if we try to supply an empty value
65536      if test "x$ICECC_CMD" = x; then
65537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65538$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65540$as_echo_n "checking for ICECC_CMD... " >&6; }
65541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65542$as_echo "disabled" >&6; }
65543      else
65544        # Check if the provided tool contains a complete path.
65545        tool_specified="$ICECC_CMD"
65546        tool_basename="${tool_specified##*/}"
65547        if test "x$tool_basename" = "x$tool_specified"; then
65548          # A command without a complete path is provided, search $PATH.
65549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65550$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65551          # Extract the first word of "$tool_basename", so it can be a program name with args.
65552set dummy $tool_basename; ac_word=$2
65553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65554$as_echo_n "checking for $ac_word... " >&6; }
65555if ${ac_cv_path_ICECC_CMD+:} false; then :
65556  $as_echo_n "(cached) " >&6
65557else
65558  case $ICECC_CMD in
65559  [\\/]* | ?:[\\/]*)
65560  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65561  ;;
65562  *)
65563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65564for as_dir in $PATH
65565do
65566  IFS=$as_save_IFS
65567  test -z "$as_dir" && as_dir=.
65568    for ac_exec_ext in '' $ac_executable_extensions; do
65569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65570    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65572    break 2
65573  fi
65574done
65575  done
65576IFS=$as_save_IFS
65577
65578  ;;
65579esac
65580fi
65581ICECC_CMD=$ac_cv_path_ICECC_CMD
65582if test -n "$ICECC_CMD"; then
65583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65584$as_echo "$ICECC_CMD" >&6; }
65585else
65586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65587$as_echo "no" >&6; }
65588fi
65589
65590
65591          if test "x$ICECC_CMD" = x; then
65592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65593          fi
65594        else
65595          # Otherwise we believe it is a complete path. Use it as it is.
65596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65597$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65599$as_echo_n "checking for ICECC_CMD... " >&6; }
65600          if test ! -x "$tool_specified"; then
65601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65602$as_echo "not found" >&6; }
65603            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65604          fi
65605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65606$as_echo "$tool_specified" >&6; }
65607        fi
65608      fi
65609    fi
65610
65611  fi
65612
65613
65614
65615  if test "x$ICECC_CMD" = x; then
65616    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65617  fi
65618
65619
65620    old_path="$PATH"
65621
65622    # Look for icecc-create-env in some known places
65623    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65624
65625
65626
65627  # Publish this variable in the help.
65628
65629
65630  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65631    # The variable is not set by user, try to locate tool using the code snippet
65632    for ac_prog in icecc-create-env
65633do
65634  # Extract the first word of "$ac_prog", so it can be a program name with args.
65635set dummy $ac_prog; ac_word=$2
65636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65637$as_echo_n "checking for $ac_word... " >&6; }
65638if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65639  $as_echo_n "(cached) " >&6
65640else
65641  case $ICECC_CREATE_ENV in
65642  [\\/]* | ?:[\\/]*)
65643  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65644  ;;
65645  *)
65646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65647for as_dir in $PATH
65648do
65649  IFS=$as_save_IFS
65650  test -z "$as_dir" && as_dir=.
65651    for ac_exec_ext in '' $ac_executable_extensions; do
65652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65653    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65655    break 2
65656  fi
65657done
65658  done
65659IFS=$as_save_IFS
65660
65661  ;;
65662esac
65663fi
65664ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65665if test -n "$ICECC_CREATE_ENV"; then
65666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65667$as_echo "$ICECC_CREATE_ENV" >&6; }
65668else
65669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65670$as_echo "no" >&6; }
65671fi
65672
65673
65674  test -n "$ICECC_CREATE_ENV" && break
65675done
65676
65677  else
65678    # The variable is set, but is it from the command line or the environment?
65679
65680    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65683      # If it failed, the variable was not from the command line. Ignore it,
65684      # but warn the user (except for BASH, which is always set by the calling BASH).
65685      if test "xICECC_CREATE_ENV" != xBASH; then
65686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65687$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65688      fi
65689      # Try to locate tool using the code snippet
65690      for ac_prog in icecc-create-env
65691do
65692  # Extract the first word of "$ac_prog", so it can be a program name with args.
65693set dummy $ac_prog; ac_word=$2
65694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65695$as_echo_n "checking for $ac_word... " >&6; }
65696if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65697  $as_echo_n "(cached) " >&6
65698else
65699  case $ICECC_CREATE_ENV in
65700  [\\/]* | ?:[\\/]*)
65701  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65702  ;;
65703  *)
65704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65705for as_dir in $PATH
65706do
65707  IFS=$as_save_IFS
65708  test -z "$as_dir" && as_dir=.
65709    for ac_exec_ext in '' $ac_executable_extensions; do
65710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65711    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65713    break 2
65714  fi
65715done
65716  done
65717IFS=$as_save_IFS
65718
65719  ;;
65720esac
65721fi
65722ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65723if test -n "$ICECC_CREATE_ENV"; then
65724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65725$as_echo "$ICECC_CREATE_ENV" >&6; }
65726else
65727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65728$as_echo "no" >&6; }
65729fi
65730
65731
65732  test -n "$ICECC_CREATE_ENV" && break
65733done
65734
65735    else
65736      # If it succeeded, then it was overridden by the user. We will use it
65737      # for the tool.
65738
65739      # First remove it from the list of overridden variables, so we can test
65740      # for unknown variables in the end.
65741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65742
65743      # Check if we try to supply an empty value
65744      if test "x$ICECC_CREATE_ENV" = x; then
65745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65746$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65748$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65750$as_echo "disabled" >&6; }
65751      else
65752        # Check if the provided tool contains a complete path.
65753        tool_specified="$ICECC_CREATE_ENV"
65754        tool_basename="${tool_specified##*/}"
65755        if test "x$tool_basename" = "x$tool_specified"; then
65756          # A command without a complete path is provided, search $PATH.
65757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65758$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65759          # Extract the first word of "$tool_basename", so it can be a program name with args.
65760set dummy $tool_basename; ac_word=$2
65761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65762$as_echo_n "checking for $ac_word... " >&6; }
65763if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65764  $as_echo_n "(cached) " >&6
65765else
65766  case $ICECC_CREATE_ENV in
65767  [\\/]* | ?:[\\/]*)
65768  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65769  ;;
65770  *)
65771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65772for as_dir in $PATH
65773do
65774  IFS=$as_save_IFS
65775  test -z "$as_dir" && as_dir=.
65776    for ac_exec_ext in '' $ac_executable_extensions; do
65777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65778    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65780    break 2
65781  fi
65782done
65783  done
65784IFS=$as_save_IFS
65785
65786  ;;
65787esac
65788fi
65789ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65790if test -n "$ICECC_CREATE_ENV"; then
65791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65792$as_echo "$ICECC_CREATE_ENV" >&6; }
65793else
65794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65795$as_echo "no" >&6; }
65796fi
65797
65798
65799          if test "x$ICECC_CREATE_ENV" = x; then
65800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65801          fi
65802        else
65803          # Otherwise we believe it is a complete path. Use it as it is.
65804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65805$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65807$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65808          if test ! -x "$tool_specified"; then
65809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65810$as_echo "not found" >&6; }
65811            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65812          fi
65813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65814$as_echo "$tool_specified" >&6; }
65815        fi
65816      fi
65817    fi
65818
65819  fi
65820
65821
65822
65823  if test "x$ICECC_CREATE_ENV" = x; then
65824    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65825  fi
65826
65827
65828    # Use icecc-create-env to create a minimal compilation environment that can
65829    # be sent to the other hosts in the icecream cluster.
65830    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65831    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65832    # Older versions of icecc does not have the --gcc parameter
65833    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65834      icecc_gcc_arg="--gcc"
65835    fi
65836    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65837
65838  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65839      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65840          ${icecc_create_env_log} 2>&1 )
65841  if test "$?" != "0"; then
65842    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65843$as_echo "$as_me: icecc-create-env output:" >&6;}
65844    cat \
65845          ${icecc_create_env_log}
65846    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65847  fi
65848
65849    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65850      # For clang, the icecc compilerwrapper is needed. It usually resides next
65851      # to icecc-create-env.
65852
65853
65854
65855  # Publish this variable in the help.
65856
65857
65858  if [ -z "${ICECC_WRAPPER+x}" ]; then
65859    # The variable is not set by user, try to locate tool using the code snippet
65860    for ac_prog in compilerwrapper
65861do
65862  # Extract the first word of "$ac_prog", so it can be a program name with args.
65863set dummy $ac_prog; ac_word=$2
65864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65865$as_echo_n "checking for $ac_word... " >&6; }
65866if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65867  $as_echo_n "(cached) " >&6
65868else
65869  case $ICECC_WRAPPER in
65870  [\\/]* | ?:[\\/]*)
65871  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65872  ;;
65873  *)
65874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65875for as_dir in $PATH
65876do
65877  IFS=$as_save_IFS
65878  test -z "$as_dir" && as_dir=.
65879    for ac_exec_ext in '' $ac_executable_extensions; do
65880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65881    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65883    break 2
65884  fi
65885done
65886  done
65887IFS=$as_save_IFS
65888
65889  ;;
65890esac
65891fi
65892ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65893if test -n "$ICECC_WRAPPER"; then
65894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65895$as_echo "$ICECC_WRAPPER" >&6; }
65896else
65897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65898$as_echo "no" >&6; }
65899fi
65900
65901
65902  test -n "$ICECC_WRAPPER" && break
65903done
65904
65905  else
65906    # The variable is set, but is it from the command line or the environment?
65907
65908    # Try to remove the string !ICECC_WRAPPER! from our list.
65909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65911      # If it failed, the variable was not from the command line. Ignore it,
65912      # but warn the user (except for BASH, which is always set by the calling BASH).
65913      if test "xICECC_WRAPPER" != xBASH; then
65914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65915$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65916      fi
65917      # Try to locate tool using the code snippet
65918      for ac_prog in compilerwrapper
65919do
65920  # Extract the first word of "$ac_prog", so it can be a program name with args.
65921set dummy $ac_prog; ac_word=$2
65922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65923$as_echo_n "checking for $ac_word... " >&6; }
65924if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65925  $as_echo_n "(cached) " >&6
65926else
65927  case $ICECC_WRAPPER in
65928  [\\/]* | ?:[\\/]*)
65929  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65930  ;;
65931  *)
65932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65933for as_dir in $PATH
65934do
65935  IFS=$as_save_IFS
65936  test -z "$as_dir" && as_dir=.
65937    for ac_exec_ext in '' $ac_executable_extensions; do
65938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65939    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65941    break 2
65942  fi
65943done
65944  done
65945IFS=$as_save_IFS
65946
65947  ;;
65948esac
65949fi
65950ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65951if test -n "$ICECC_WRAPPER"; then
65952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65953$as_echo "$ICECC_WRAPPER" >&6; }
65954else
65955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65956$as_echo "no" >&6; }
65957fi
65958
65959
65960  test -n "$ICECC_WRAPPER" && break
65961done
65962
65963    else
65964      # If it succeeded, then it was overridden by the user. We will use it
65965      # for the tool.
65966
65967      # First remove it from the list of overridden variables, so we can test
65968      # for unknown variables in the end.
65969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65970
65971      # Check if we try to supply an empty value
65972      if test "x$ICECC_WRAPPER" = x; then
65973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65974$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65976$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65978$as_echo "disabled" >&6; }
65979      else
65980        # Check if the provided tool contains a complete path.
65981        tool_specified="$ICECC_WRAPPER"
65982        tool_basename="${tool_specified##*/}"
65983        if test "x$tool_basename" = "x$tool_specified"; then
65984          # A command without a complete path is provided, search $PATH.
65985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65986$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65987          # Extract the first word of "$tool_basename", so it can be a program name with args.
65988set dummy $tool_basename; ac_word=$2
65989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65990$as_echo_n "checking for $ac_word... " >&6; }
65991if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65992  $as_echo_n "(cached) " >&6
65993else
65994  case $ICECC_WRAPPER in
65995  [\\/]* | ?:[\\/]*)
65996  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65997  ;;
65998  *)
65999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66000for as_dir in $PATH
66001do
66002  IFS=$as_save_IFS
66003  test -z "$as_dir" && as_dir=.
66004    for ac_exec_ext in '' $ac_executable_extensions; do
66005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66006    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66008    break 2
66009  fi
66010done
66011  done
66012IFS=$as_save_IFS
66013
66014  ;;
66015esac
66016fi
66017ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66018if test -n "$ICECC_WRAPPER"; then
66019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66020$as_echo "$ICECC_WRAPPER" >&6; }
66021else
66022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66023$as_echo "no" >&6; }
66024fi
66025
66026
66027          if test "x$ICECC_WRAPPER" = x; then
66028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66029          fi
66030        else
66031          # Otherwise we believe it is a complete path. Use it as it is.
66032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66033$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66035$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66036          if test ! -x "$tool_specified"; then
66037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66038$as_echo "not found" >&6; }
66039            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66040          fi
66041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66042$as_echo "$tool_specified" >&6; }
66043        fi
66044      fi
66045    fi
66046
66047  fi
66048
66049
66050
66051  if test "x$ICECC_WRAPPER" = x; then
66052    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66053  fi
66054
66055
66056
66057  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66058      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66059  if test "$?" != "0"; then
66060    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66061$as_echo "$as_me: icecc-create-env output:" >&6;}
66062    cat ${icecc_create_env_log}
66063    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66064  fi
66065
66066    else
66067      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66068    fi
66069    PATH="$old_path"
66070    # The bundle with the compiler gets a name based on checksums. Parse log file
66071    # to find it.
66072    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66073    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66074    if test ! -f ${ICECC_ENV_BUNDLE}; then
66075      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66076    fi
66077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66078$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66080$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66081    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66082
66083    if test "x${COMPILE_TYPE}" = "xcross"; then
66084      # If cross compiling, create a separate env package for the build compiler
66085      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66086      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66087      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66088
66089  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66090      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66091            ${icecc_create_env_log_build} 2>&1 )
66092  if test "$?" != "0"; then
66093    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66094$as_echo "$as_me: icecc-create-env output:" >&6;}
66095    cat \
66096            ${icecc_create_env_log_build}
66097    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66098  fi
66099
66100      elif test "x${BUILD_CC##*/}" = "xclang"; then
66101
66102  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66103      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66104  if test "$?" != "0"; then
66105    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66106$as_echo "$as_me: icecc-create-env output:" >&6;}
66107    cat ${icecc_create_env_log_build}
66108    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66109  fi
66110
66111      else
66112        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66113      fi
66114      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66115      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66116      if test ! -f ${ICECC_ENV_BUNDLE}; then
66117        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66118      fi
66119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66120$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66122$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66123      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66124          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66125    else
66126      BUILD_ICECC="${ICECC}"
66127    fi
66128
66129
66130  fi
66131
66132
66133# Can the C/C++ compiler use precompiled headers?
66134
66135
66136  ###############################################################################
66137  #
66138  # Can the C/C++ compiler use precompiled headers?
66139  #
66140  # Check whether --enable-precompiled-headers was given.
66141if test "${enable_precompiled_headers+set}" = set; then :
66142  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66143else
66144  ENABLE_PRECOMPH=yes
66145fi
66146
66147
66148  USE_PRECOMPILED_HEADER=1
66149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66150$as_echo_n "checking If precompiled header is enabled... " >&6; }
66151  if test "x$ENABLE_PRECOMPH" = xno; then
66152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66153$as_echo "no, forced" >&6; }
66154    USE_PRECOMPILED_HEADER=0
66155  elif test "x$ICECC" != "x"; then
66156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66157$as_echo "no, does not work effectively with icecc" >&6; }
66158    USE_PRECOMPILED_HEADER=0
66159  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66161$as_echo "no, does not work with Solaris Studio" >&6; }
66162    USE_PRECOMPILED_HEADER=0
66163  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66165$as_echo "no, does not work with xlc" >&6; }
66166    USE_PRECOMPILED_HEADER=0
66167  else
66168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66169$as_echo "yes" >&6; }
66170  fi
66171
66172  if test "x$ENABLE_PRECOMPH" = xyes; then
66173    # Check that the compiler actually supports precomp headers.
66174    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66176$as_echo_n "checking that precompiled headers work... " >&6; }
66177      echo "int alfa();" > conftest.h
66178      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66179      if test ! -f conftest.hpp.gch; then
66180        USE_PRECOMPILED_HEADER=0
66181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66182$as_echo "no" >&6; }
66183      else
66184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66185$as_echo "yes" >&6; }
66186      fi
66187      $RM conftest.h conftest.hpp.gch
66188    fi
66189  fi
66190
66191
66192
66193
66194# Setup use of ccache, if available
66195
66196  # Check whether --enable-ccache was given.
66197if test "${enable_ccache+set}" = set; then :
66198  enableval=$enable_ccache;
66199fi
66200
66201
66202  CCACHE_STATUS=
66203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66204$as_echo_n "checking is ccache enabled... " >&6; }
66205  if test "x$enable_ccache" = xyes; then
66206    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66208$as_echo "yes" >&6; }
66209      OLD_PATH="$PATH"
66210      if test "x$TOOLCHAIN_PATH" != x; then
66211        PATH=$TOOLCHAIN_PATH:$PATH
66212      fi
66213
66214
66215
66216  # Publish this variable in the help.
66217
66218
66219  if [ -z "${CCACHE+x}" ]; then
66220    # The variable is not set by user, try to locate tool using the code snippet
66221    for ac_prog in ccache
66222do
66223  # Extract the first word of "$ac_prog", so it can be a program name with args.
66224set dummy $ac_prog; ac_word=$2
66225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66226$as_echo_n "checking for $ac_word... " >&6; }
66227if ${ac_cv_path_CCACHE+:} false; then :
66228  $as_echo_n "(cached) " >&6
66229else
66230  case $CCACHE in
66231  [\\/]* | ?:[\\/]*)
66232  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66233  ;;
66234  *)
66235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66236for as_dir in $PATH
66237do
66238  IFS=$as_save_IFS
66239  test -z "$as_dir" && as_dir=.
66240    for ac_exec_ext in '' $ac_executable_extensions; do
66241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66242    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66244    break 2
66245  fi
66246done
66247  done
66248IFS=$as_save_IFS
66249
66250  ;;
66251esac
66252fi
66253CCACHE=$ac_cv_path_CCACHE
66254if test -n "$CCACHE"; then
66255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66256$as_echo "$CCACHE" >&6; }
66257else
66258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66259$as_echo "no" >&6; }
66260fi
66261
66262
66263  test -n "$CCACHE" && break
66264done
66265
66266  else
66267    # The variable is set, but is it from the command line or the environment?
66268
66269    # Try to remove the string !CCACHE! from our list.
66270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66272      # If it failed, the variable was not from the command line. Ignore it,
66273      # but warn the user (except for BASH, which is always set by the calling BASH).
66274      if test "xCCACHE" != xBASH; then
66275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66276$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66277      fi
66278      # Try to locate tool using the code snippet
66279      for ac_prog in ccache
66280do
66281  # Extract the first word of "$ac_prog", so it can be a program name with args.
66282set dummy $ac_prog; ac_word=$2
66283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66284$as_echo_n "checking for $ac_word... " >&6; }
66285if ${ac_cv_path_CCACHE+:} false; then :
66286  $as_echo_n "(cached) " >&6
66287else
66288  case $CCACHE in
66289  [\\/]* | ?:[\\/]*)
66290  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66291  ;;
66292  *)
66293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66294for as_dir in $PATH
66295do
66296  IFS=$as_save_IFS
66297  test -z "$as_dir" && as_dir=.
66298    for ac_exec_ext in '' $ac_executable_extensions; do
66299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66300    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66302    break 2
66303  fi
66304done
66305  done
66306IFS=$as_save_IFS
66307
66308  ;;
66309esac
66310fi
66311CCACHE=$ac_cv_path_CCACHE
66312if test -n "$CCACHE"; then
66313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66314$as_echo "$CCACHE" >&6; }
66315else
66316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66317$as_echo "no" >&6; }
66318fi
66319
66320
66321  test -n "$CCACHE" && break
66322done
66323
66324    else
66325      # If it succeeded, then it was overridden by the user. We will use it
66326      # for the tool.
66327
66328      # First remove it from the list of overridden variables, so we can test
66329      # for unknown variables in the end.
66330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66331
66332      # Check if we try to supply an empty value
66333      if test "x$CCACHE" = x; then
66334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66335$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66337$as_echo_n "checking for CCACHE... " >&6; }
66338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66339$as_echo "disabled" >&6; }
66340      else
66341        # Check if the provided tool contains a complete path.
66342        tool_specified="$CCACHE"
66343        tool_basename="${tool_specified##*/}"
66344        if test "x$tool_basename" = "x$tool_specified"; then
66345          # A command without a complete path is provided, search $PATH.
66346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66347$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66348          # Extract the first word of "$tool_basename", so it can be a program name with args.
66349set dummy $tool_basename; ac_word=$2
66350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66351$as_echo_n "checking for $ac_word... " >&6; }
66352if ${ac_cv_path_CCACHE+:} false; then :
66353  $as_echo_n "(cached) " >&6
66354else
66355  case $CCACHE in
66356  [\\/]* | ?:[\\/]*)
66357  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66358  ;;
66359  *)
66360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66361for as_dir in $PATH
66362do
66363  IFS=$as_save_IFS
66364  test -z "$as_dir" && as_dir=.
66365    for ac_exec_ext in '' $ac_executable_extensions; do
66366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66367    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66369    break 2
66370  fi
66371done
66372  done
66373IFS=$as_save_IFS
66374
66375  ;;
66376esac
66377fi
66378CCACHE=$ac_cv_path_CCACHE
66379if test -n "$CCACHE"; then
66380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66381$as_echo "$CCACHE" >&6; }
66382else
66383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66384$as_echo "no" >&6; }
66385fi
66386
66387
66388          if test "x$CCACHE" = x; then
66389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66390          fi
66391        else
66392          # Otherwise we believe it is a complete path. Use it as it is.
66393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66394$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66396$as_echo_n "checking for CCACHE... " >&6; }
66397          if test ! -x "$tool_specified"; then
66398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66399$as_echo "not found" >&6; }
66400            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66401          fi
66402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66403$as_echo "$tool_specified" >&6; }
66404        fi
66405      fi
66406    fi
66407
66408  fi
66409
66410
66411
66412  if test "x$CCACHE" = x; then
66413    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66414  fi
66415
66416
66417      PATH="$OLD_PATH"
66418      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66419      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66420    else
66421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66422$as_echo "no" >&6; }
66423      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66424$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66425    fi
66426  elif test "x$enable_ccache" = xno; then
66427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66428$as_echo "no, explicitly disabled" >&6; }
66429    CCACHE_STATUS="Disabled"
66430  elif test "x$enable_ccache" = x; then
66431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66432$as_echo "no" >&6; }
66433  else
66434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66435$as_echo "unknown" >&6; }
66436    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66437  fi
66438
66439
66440
66441# Check whether --with-ccache-dir was given.
66442if test "${with_ccache_dir+set}" = set; then :
66443  withval=$with_ccache_dir;
66444fi
66445
66446
66447  if test "x$with_ccache_dir" != x; then
66448    # When using a non home ccache directory, assume the use is to share ccache files
66449    # with other users. Thus change the umask.
66450    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66451    if test "x$CCACHE" = x; then
66452      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66453$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66454    fi
66455  fi
66456
66457  if test "x$CCACHE" != x; then
66458
66459  if test "x$CCACHE" != x; then
66460    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66461      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66462          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66463      if test "x$HAS_BAD_CCACHE" != "x"; then
66464        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66465      fi
66466    fi
66467    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66468      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66469          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66470      if test "x$HAS_BAD_CCACHE" != "x"; then
66471        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66472      fi
66473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66474$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66475      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66476      PUSHED_FLAGS="$CXXFLAGS"
66477      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66478      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66479/* end confdefs.h.  */
66480
66481int
66482main ()
66483{
66484
66485  ;
66486  return 0;
66487}
66488_ACEOF
66489if ac_fn_cxx_try_compile "$LINENO"; then :
66490  CC_KNOWS_CCACHE_TRICK=yes
66491else
66492  CC_KNOWS_CCACHE_TRICK=no
66493fi
66494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66495      CXXFLAGS="$PUSHED_FLAGS"
66496      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66498$as_echo "yes" >&6; }
66499        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66500
66501        CCACHE_SLOPPINESS=pch_defines,time_macros
66502      else
66503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66504$as_echo "no" >&6; }
66505        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66506      fi
66507    fi
66508
66509    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66510        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66511
66512    if test "x$SET_CCACHE_DIR" != x; then
66513      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66514      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66515    fi
66516  fi
66517
66518  fi
66519
66520
66521###############################################################################
66522#
66523# And now the finish...
66524#
66525###############################################################################
66526
66527# Check for some common pitfalls
66528
66529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66530    file_to_test="$SRC_ROOT/LICENSE"
66531    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66532      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
66533    fi
66534  fi
66535
66536
66537  # Did user specify any unknown variables?
66538
66539  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66540    # Replace the separating ! with spaces before presenting for end user.
66541    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66542    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66543$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66544  fi
66545
66546
66547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66548$as_echo_n "checking if build directory is on local disk... " >&6; }
66549
66550  # df -l lists only local disks; if the given directory is not found then
66551  # a non-zero exit code is given
66552  if test "x$DF" = x; then
66553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66554      # msys does not have df; use Windows "net use" instead.
66555      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66556      if test "x$IS_NETWORK_DISK" = x; then
66557        OUTPUT_DIR_IS_LOCAL="yes"
66558      else
66559        OUTPUT_DIR_IS_LOCAL="no"
66560      fi
66561    else
66562      # No df here, say it's local
66563      OUTPUT_DIR_IS_LOCAL="yes"
66564    fi
66565  else
66566    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66567      OUTPUT_DIR_IS_LOCAL="yes"
66568    else
66569      OUTPUT_DIR_IS_LOCAL="no"
66570    fi
66571  fi
66572
66573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66574$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66575
66576
66577
66578  # Check if the user has any old-style ALT_ variables set.
66579  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66580
66581  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66582  # Since we can't properly handle the dependencies for this, warn the user about the situation
66583  if test -e $OUTPUT_ROOT/spec.gmk; then
66584    IS_RECONFIGURE=yes
66585  else
66586    IS_RECONFIGURE=no
66587  fi
66588
66589
66590# At the end, call the custom hook. (Dummy macro if no custom sources available)
66591
66592
66593# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66594
66595  # Keep feature lists sorted and free of duplicates
66596  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66597  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66598  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66599  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66600  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66601  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66602  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66603
66604  # Validate features
66605  for variant in $JVM_VARIANTS; do
66606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66607$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66608    features_var_name=JVM_FEATURES_$variant
66609    JVM_FEATURES_TO_TEST=${!features_var_name}
66610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66611$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66612    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66613    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66614    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66615    if test "x$INVALID_FEATURES" != x; then
66616      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66617    fi
66618  done
66619
66620
66621# We're messing a bit with internal autoconf variables to put the config.status
66622# in the output directory instead of the current directory.
66623CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66624
66625# Create the actual output files. Now the main work of configure is done.
66626cat >confcache <<\_ACEOF
66627# This file is a shell script that caches the results of configure
66628# tests run on this system so they can be shared between configure
66629# scripts and configure runs, see configure's option --config-cache.
66630# It is not useful on other systems.  If it contains results you don't
66631# want to keep, you may remove or edit it.
66632#
66633# config.status only pays attention to the cache file if you give it
66634# the --recheck option to rerun configure.
66635#
66636# `ac_cv_env_foo' variables (set or unset) will be overridden when
66637# loading this file, other *unset* `ac_cv_foo' will be assigned the
66638# following values.
66639
66640_ACEOF
66641
66642# The following way of writing the cache mishandles newlines in values,
66643# but we know of no workaround that is simple, portable, and efficient.
66644# So, we kill variables containing newlines.
66645# Ultrix sh set writes to stderr and can't be redirected directly,
66646# and sets the high bit in the cache file unless we assign to the vars.
66647(
66648  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66649    eval ac_val=\$$ac_var
66650    case $ac_val in #(
66651    *${as_nl}*)
66652      case $ac_var in #(
66653      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66654$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66655      esac
66656      case $ac_var in #(
66657      _ | IFS | as_nl) ;; #(
66658      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66659      *) { eval $ac_var=; unset $ac_var;} ;;
66660      esac ;;
66661    esac
66662  done
66663
66664  (set) 2>&1 |
66665    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66666    *${as_nl}ac_space=\ *)
66667      # `set' does not quote correctly, so add quotes: double-quote
66668      # substitution turns \\\\ into \\, and sed turns \\ into \.
66669      sed -n \
66670	"s/'/'\\\\''/g;
66671	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66672      ;; #(
66673    *)
66674      # `set' quotes correctly as required by POSIX, so do not add quotes.
66675      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66676      ;;
66677    esac |
66678    sort
66679) |
66680  sed '
66681     /^ac_cv_env_/b end
66682     t clear
66683     :clear
66684     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66685     t end
66686     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66687     :end' >>confcache
66688if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66689  if test -w "$cache_file"; then
66690    if test "x$cache_file" != "x/dev/null"; then
66691      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66692$as_echo "$as_me: updating cache $cache_file" >&6;}
66693      if test ! -f "$cache_file" || test -h "$cache_file"; then
66694	cat confcache >"$cache_file"
66695      else
66696        case $cache_file in #(
66697        */* | ?:*)
66698	  mv -f confcache "$cache_file"$$ &&
66699	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66700        *)
66701	  mv -f confcache "$cache_file" ;;
66702	esac
66703      fi
66704    fi
66705  else
66706    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66707$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66708  fi
66709fi
66710rm -f confcache
66711
66712test "x$prefix" = xNONE && prefix=$ac_default_prefix
66713# Let make expand exec_prefix.
66714test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66715
66716# Transform confdefs.h into DEFS.
66717# Protect against shell expansion while executing Makefile rules.
66718# Protect against Makefile macro expansion.
66719#
66720# If the first sed substitution is executed (which looks for macros that
66721# take arguments), then branch to the quote section.  Otherwise,
66722# look for a macro that doesn't take arguments.
66723ac_script='
66724:mline
66725/\\$/{
66726 N
66727 s,\\\n,,
66728 b mline
66729}
66730t clear
66731:clear
66732s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66733t quote
66734s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66735t quote
66736b any
66737:quote
66738s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66739s/\[/\\&/g
66740s/\]/\\&/g
66741s/\$/$$/g
66742H
66743:any
66744${
66745	g
66746	s/^\n//
66747	s/\n/ /g
66748	p
66749}
66750'
66751DEFS=`sed -n "$ac_script" confdefs.h`
66752
66753
66754ac_libobjs=
66755ac_ltlibobjs=
66756U=
66757for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66758  # 1. Remove the extension, and $U if already installed.
66759  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66760  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66761  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66762  #    will be set to the directory where LIBOBJS objects are built.
66763  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66764  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66765done
66766LIBOBJS=$ac_libobjs
66767
66768LTLIBOBJS=$ac_ltlibobjs
66769
66770
66771
66772: "${CONFIG_STATUS=./config.status}"
66773ac_write_fail=0
66774ac_clean_files_save=$ac_clean_files
66775ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66776{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66777$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66778as_write_fail=0
66779cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66780#! $SHELL
66781# Generated by $as_me.
66782# Run this file to recreate the current configuration.
66783# Compiler output produced by configure, useful for debugging
66784# configure, is in config.log if it exists.
66785
66786debug=false
66787ac_cs_recheck=false
66788ac_cs_silent=false
66789
66790SHELL=\${CONFIG_SHELL-$SHELL}
66791export SHELL
66792_ASEOF
66793cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66794## -------------------- ##
66795## M4sh Initialization. ##
66796## -------------------- ##
66797
66798# Be more Bourne compatible
66799DUALCASE=1; export DUALCASE # for MKS sh
66800if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66801  emulate sh
66802  NULLCMD=:
66803  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66804  # is contrary to our usage.  Disable this feature.
66805  alias -g '${1+"$@"}'='"$@"'
66806  setopt NO_GLOB_SUBST
66807else
66808  case `(set -o) 2>/dev/null` in #(
66809  *posix*) :
66810    set -o posix ;; #(
66811  *) :
66812     ;;
66813esac
66814fi
66815
66816
66817as_nl='
66818'
66819export as_nl
66820# Printing a long string crashes Solaris 7 /usr/bin/printf.
66821as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66822as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66823as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66824# Prefer a ksh shell builtin over an external printf program on Solaris,
66825# but without wasting forks for bash or zsh.
66826if test -z "$BASH_VERSION$ZSH_VERSION" \
66827    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66828  as_echo='print -r --'
66829  as_echo_n='print -rn --'
66830elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66831  as_echo='printf %s\n'
66832  as_echo_n='printf %s'
66833else
66834  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66835    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66836    as_echo_n='/usr/ucb/echo -n'
66837  else
66838    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66839    as_echo_n_body='eval
66840      arg=$1;
66841      case $arg in #(
66842      *"$as_nl"*)
66843	expr "X$arg" : "X\\(.*\\)$as_nl";
66844	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66845      esac;
66846      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66847    '
66848    export as_echo_n_body
66849    as_echo_n='sh -c $as_echo_n_body as_echo'
66850  fi
66851  export as_echo_body
66852  as_echo='sh -c $as_echo_body as_echo'
66853fi
66854
66855# The user is always right.
66856if test "${PATH_SEPARATOR+set}" != set; then
66857  PATH_SEPARATOR=:
66858  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66859    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66860      PATH_SEPARATOR=';'
66861  }
66862fi
66863
66864
66865# IFS
66866# We need space, tab and new line, in precisely that order.  Quoting is
66867# there to prevent editors from complaining about space-tab.
66868# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66869# splitting by setting IFS to empty value.)
66870IFS=" ""	$as_nl"
66871
66872# Find who we are.  Look in the path if we contain no directory separator.
66873as_myself=
66874case $0 in #((
66875  *[\\/]* ) as_myself=$0 ;;
66876  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66877for as_dir in $PATH
66878do
66879  IFS=$as_save_IFS
66880  test -z "$as_dir" && as_dir=.
66881    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66882  done
66883IFS=$as_save_IFS
66884
66885     ;;
66886esac
66887# We did not find ourselves, most probably we were run as `sh COMMAND'
66888# in which case we are not to be found in the path.
66889if test "x$as_myself" = x; then
66890  as_myself=$0
66891fi
66892if test ! -f "$as_myself"; then
66893  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66894  exit 1
66895fi
66896
66897# Unset variables that we do not need and which cause bugs (e.g. in
66898# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66899# suppresses any "Segmentation fault" message there.  '((' could
66900# trigger a bug in pdksh 5.2.14.
66901for as_var in BASH_ENV ENV MAIL MAILPATH
66902do eval test x\${$as_var+set} = xset \
66903  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66904done
66905PS1='$ '
66906PS2='> '
66907PS4='+ '
66908
66909# NLS nuisances.
66910LC_ALL=C
66911export LC_ALL
66912LANGUAGE=C
66913export LANGUAGE
66914
66915# CDPATH.
66916(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66917
66918
66919# as_fn_error STATUS ERROR [LINENO LOG_FD]
66920# ----------------------------------------
66921# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66922# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66923# script with STATUS, using 1 if that was 0.
66924as_fn_error ()
66925{
66926  as_status=$1; test $as_status -eq 0 && as_status=1
66927  if test "$4"; then
66928    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66929    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66930  fi
66931  $as_echo "$as_me: error: $2" >&2
66932  as_fn_exit $as_status
66933} # as_fn_error
66934
66935
66936# as_fn_set_status STATUS
66937# -----------------------
66938# Set $? to STATUS, without forking.
66939as_fn_set_status ()
66940{
66941  return $1
66942} # as_fn_set_status
66943
66944# as_fn_exit STATUS
66945# -----------------
66946# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66947as_fn_exit ()
66948{
66949  set +e
66950  as_fn_set_status $1
66951  exit $1
66952} # as_fn_exit
66953
66954# as_fn_unset VAR
66955# ---------------
66956# Portably unset VAR.
66957as_fn_unset ()
66958{
66959  { eval $1=; unset $1;}
66960}
66961as_unset=as_fn_unset
66962# as_fn_append VAR VALUE
66963# ----------------------
66964# Append the text in VALUE to the end of the definition contained in VAR. Take
66965# advantage of any shell optimizations that allow amortized linear growth over
66966# repeated appends, instead of the typical quadratic growth present in naive
66967# implementations.
66968if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66969  eval 'as_fn_append ()
66970  {
66971    eval $1+=\$2
66972  }'
66973else
66974  as_fn_append ()
66975  {
66976    eval $1=\$$1\$2
66977  }
66978fi # as_fn_append
66979
66980# as_fn_arith ARG...
66981# ------------------
66982# Perform arithmetic evaluation on the ARGs, and store the result in the
66983# global $as_val. Take advantage of shells that can avoid forks. The arguments
66984# must be portable across $(()) and expr.
66985if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66986  eval 'as_fn_arith ()
66987  {
66988    as_val=$(( $* ))
66989  }'
66990else
66991  as_fn_arith ()
66992  {
66993    as_val=`expr "$@" || test $? -eq 1`
66994  }
66995fi # as_fn_arith
66996
66997
66998if expr a : '\(a\)' >/dev/null 2>&1 &&
66999   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67000  as_expr=expr
67001else
67002  as_expr=false
67003fi
67004
67005if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67006  as_basename=basename
67007else
67008  as_basename=false
67009fi
67010
67011if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67012  as_dirname=dirname
67013else
67014  as_dirname=false
67015fi
67016
67017as_me=`$as_basename -- "$0" ||
67018$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67019	 X"$0" : 'X\(//\)$' \| \
67020	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67021$as_echo X/"$0" |
67022    sed '/^.*\/\([^/][^/]*\)\/*$/{
67023	    s//\1/
67024	    q
67025	  }
67026	  /^X\/\(\/\/\)$/{
67027	    s//\1/
67028	    q
67029	  }
67030	  /^X\/\(\/\).*/{
67031	    s//\1/
67032	    q
67033	  }
67034	  s/.*/./; q'`
67035
67036# Avoid depending upon Character Ranges.
67037as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67038as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67039as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67040as_cr_digits='0123456789'
67041as_cr_alnum=$as_cr_Letters$as_cr_digits
67042
67043ECHO_C= ECHO_N= ECHO_T=
67044case `echo -n x` in #(((((
67045-n*)
67046  case `echo 'xy\c'` in
67047  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67048  xy)  ECHO_C='\c';;
67049  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67050       ECHO_T='	';;
67051  esac;;
67052*)
67053  ECHO_N='-n';;
67054esac
67055
67056rm -f conf$$ conf$$.exe conf$$.file
67057if test -d conf$$.dir; then
67058  rm -f conf$$.dir/conf$$.file
67059else
67060  rm -f conf$$.dir
67061  mkdir conf$$.dir 2>/dev/null
67062fi
67063if (echo >conf$$.file) 2>/dev/null; then
67064  if ln -s conf$$.file conf$$ 2>/dev/null; then
67065    as_ln_s='ln -s'
67066    # ... but there are two gotchas:
67067    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67068    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67069    # In both cases, we have to default to `cp -pR'.
67070    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67071      as_ln_s='cp -pR'
67072  elif ln conf$$.file conf$$ 2>/dev/null; then
67073    as_ln_s=ln
67074  else
67075    as_ln_s='cp -pR'
67076  fi
67077else
67078  as_ln_s='cp -pR'
67079fi
67080rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67081rmdir conf$$.dir 2>/dev/null
67082
67083
67084# as_fn_mkdir_p
67085# -------------
67086# Create "$as_dir" as a directory, including parents if necessary.
67087as_fn_mkdir_p ()
67088{
67089
67090  case $as_dir in #(
67091  -*) as_dir=./$as_dir;;
67092  esac
67093  test -d "$as_dir" || eval $as_mkdir_p || {
67094    as_dirs=
67095    while :; do
67096      case $as_dir in #(
67097      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67098      *) as_qdir=$as_dir;;
67099      esac
67100      as_dirs="'$as_qdir' $as_dirs"
67101      as_dir=`$as_dirname -- "$as_dir" ||
67102$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67103	 X"$as_dir" : 'X\(//\)[^/]' \| \
67104	 X"$as_dir" : 'X\(//\)$' \| \
67105	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67106$as_echo X"$as_dir" |
67107    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67108	    s//\1/
67109	    q
67110	  }
67111	  /^X\(\/\/\)[^/].*/{
67112	    s//\1/
67113	    q
67114	  }
67115	  /^X\(\/\/\)$/{
67116	    s//\1/
67117	    q
67118	  }
67119	  /^X\(\/\).*/{
67120	    s//\1/
67121	    q
67122	  }
67123	  s/.*/./; q'`
67124      test -d "$as_dir" && break
67125    done
67126    test -z "$as_dirs" || eval "mkdir $as_dirs"
67127  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67128
67129
67130} # as_fn_mkdir_p
67131if mkdir -p . 2>/dev/null; then
67132  as_mkdir_p='mkdir -p "$as_dir"'
67133else
67134  test -d ./-p && rmdir ./-p
67135  as_mkdir_p=false
67136fi
67137
67138
67139# as_fn_executable_p FILE
67140# -----------------------
67141# Test if FILE is an executable regular file.
67142as_fn_executable_p ()
67143{
67144  test -f "$1" && test -x "$1"
67145} # as_fn_executable_p
67146as_test_x='test -x'
67147as_executable_p=as_fn_executable_p
67148
67149# Sed expression to map a string onto a valid CPP name.
67150as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67151
67152# Sed expression to map a string onto a valid variable name.
67153as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67154
67155
67156exec 6>&1
67157## ----------------------------------- ##
67158## Main body of $CONFIG_STATUS script. ##
67159## ----------------------------------- ##
67160_ASEOF
67161test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67162
67163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67164# Save the log message, to keep $0 and so on meaningful, and to
67165# report actual input values of CONFIG_FILES etc. instead of their
67166# values after options handling.
67167ac_log="
67168This file was extended by OpenJDK $as_me jdk9, which was
67169generated by GNU Autoconf 2.69.  Invocation command line was
67170
67171  CONFIG_FILES    = $CONFIG_FILES
67172  CONFIG_HEADERS  = $CONFIG_HEADERS
67173  CONFIG_LINKS    = $CONFIG_LINKS
67174  CONFIG_COMMANDS = $CONFIG_COMMANDS
67175  $ $0 $@
67176
67177on `(hostname || uname -n) 2>/dev/null | sed 1q`
67178"
67179
67180_ACEOF
67181
67182case $ac_config_files in *"
67183"*) set x $ac_config_files; shift; ac_config_files=$*;;
67184esac
67185
67186
67187
67188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67189# Files that config.status was made for.
67190config_files="$ac_config_files"
67191
67192_ACEOF
67193
67194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67195ac_cs_usage="\
67196\`$as_me' instantiates files and other configuration actions
67197from templates according to the current configuration.  Unless the files
67198and actions are specified as TAGs, all are instantiated by default.
67199
67200Usage: $0 [OPTION]... [TAG]...
67201
67202  -h, --help       print this help, then exit
67203  -V, --version    print version number and configuration settings, then exit
67204      --config     print configuration, then exit
67205  -q, --quiet, --silent
67206                   do not print progress messages
67207  -d, --debug      don't remove temporary files
67208      --recheck    update $as_me by reconfiguring in the same conditions
67209      --file=FILE[:TEMPLATE]
67210                   instantiate the configuration file FILE
67211
67212Configuration files:
67213$config_files
67214
67215Report bugs to <build-dev@openjdk.java.net>.
67216OpenJDK home page: <http://openjdk.java.net>."
67217
67218_ACEOF
67219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67220ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67221ac_cs_version="\\
67222OpenJDK config.status jdk9
67223configured by $0, generated by GNU Autoconf 2.69,
67224  with options \\"\$ac_cs_config\\"
67225
67226Copyright (C) 2012 Free Software Foundation, Inc.
67227This config.status script is free software; the Free Software Foundation
67228gives unlimited permission to copy, distribute and modify it."
67229
67230ac_pwd='$ac_pwd'
67231srcdir='$srcdir'
67232AWK='$AWK'
67233test -n "\$AWK" || AWK=awk
67234_ACEOF
67235
67236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67237# The default lists apply if the user does not specify any file.
67238ac_need_defaults=:
67239while test $# != 0
67240do
67241  case $1 in
67242  --*=?*)
67243    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67244    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67245    ac_shift=:
67246    ;;
67247  --*=)
67248    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67249    ac_optarg=
67250    ac_shift=:
67251    ;;
67252  *)
67253    ac_option=$1
67254    ac_optarg=$2
67255    ac_shift=shift
67256    ;;
67257  esac
67258
67259  case $ac_option in
67260  # Handling of the options.
67261  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67262    ac_cs_recheck=: ;;
67263  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67264    $as_echo "$ac_cs_version"; exit ;;
67265  --config | --confi | --conf | --con | --co | --c )
67266    $as_echo "$ac_cs_config"; exit ;;
67267  --debug | --debu | --deb | --de | --d | -d )
67268    debug=: ;;
67269  --file | --fil | --fi | --f )
67270    $ac_shift
67271    case $ac_optarg in
67272    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67273    '') as_fn_error $? "missing file argument" ;;
67274    esac
67275    as_fn_append CONFIG_FILES " '$ac_optarg'"
67276    ac_need_defaults=false;;
67277  --he | --h |  --help | --hel | -h )
67278    $as_echo "$ac_cs_usage"; exit ;;
67279  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67280  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67281    ac_cs_silent=: ;;
67282
67283  # This is an error.
67284  -*) as_fn_error $? "unrecognized option: \`$1'
67285Try \`$0 --help' for more information." ;;
67286
67287  *) as_fn_append ac_config_targets " $1"
67288     ac_need_defaults=false ;;
67289
67290  esac
67291  shift
67292done
67293
67294ac_configure_extra_args=
67295
67296if $ac_cs_silent; then
67297  exec 6>/dev/null
67298  ac_configure_extra_args="$ac_configure_extra_args --silent"
67299fi
67300
67301_ACEOF
67302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67303if \$ac_cs_recheck; then
67304  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67305  shift
67306  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67307  CONFIG_SHELL='$SHELL'
67308  export CONFIG_SHELL
67309  exec "\$@"
67310fi
67311
67312_ACEOF
67313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67314exec 5>>config.log
67315{
67316  echo
67317  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67318## Running $as_me. ##
67319_ASBOX
67320  $as_echo "$ac_log"
67321} >&5
67322
67323_ACEOF
67324cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67325_ACEOF
67326
67327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67328
67329# Handling of arguments.
67330for ac_config_target in $ac_config_targets
67331do
67332  case $ac_config_target in
67333    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67334    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67335    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67336    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67337    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67338
67339  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67340  esac
67341done
67342
67343
67344# If the user did not use the arguments to specify the items to instantiate,
67345# then the envvar interface is used.  Set only those that are not.
67346# We use the long form for the default assignment because of an extremely
67347# bizarre bug on SunOS 4.1.3.
67348if $ac_need_defaults; then
67349  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67350fi
67351
67352# Have a temporary directory for convenience.  Make it in the build tree
67353# simply because there is no reason against having it here, and in addition,
67354# creating and moving files from /tmp can sometimes cause problems.
67355# Hook for its removal unless debugging.
67356# Note that there is a small window in which the directory will not be cleaned:
67357# after its creation but before its name has been assigned to `$tmp'.
67358$debug ||
67359{
67360  tmp= ac_tmp=
67361  trap 'exit_status=$?
67362  : "${ac_tmp:=$tmp}"
67363  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67364' 0
67365  trap 'as_fn_exit 1' 1 2 13 15
67366}
67367# Create a (secure) tmp directory for tmp files.
67368
67369{
67370  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67371  test -d "$tmp"
67372}  ||
67373{
67374  tmp=./conf$$-$RANDOM
67375  (umask 077 && mkdir "$tmp")
67376} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67377ac_tmp=$tmp
67378
67379# Set up the scripts for CONFIG_FILES section.
67380# No need to generate them if there are no CONFIG_FILES.
67381# This happens for instance with `./config.status config.h'.
67382if test -n "$CONFIG_FILES"; then
67383
67384
67385ac_cr=`echo X | tr X '\015'`
67386# On cygwin, bash can eat \r inside `` if the user requested igncr.
67387# But we know of no other shell where ac_cr would be empty at this
67388# point, so we can use a bashism as a fallback.
67389if test "x$ac_cr" = x; then
67390  eval ac_cr=\$\'\\r\'
67391fi
67392ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67393if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67394  ac_cs_awk_cr='\\r'
67395else
67396  ac_cs_awk_cr=$ac_cr
67397fi
67398
67399echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67400_ACEOF
67401
67402
67403{
67404  echo "cat >conf$$subs.awk <<_ACEOF" &&
67405  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67406  echo "_ACEOF"
67407} >conf$$subs.sh ||
67408  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67409ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67410ac_delim='%!_!# '
67411for ac_last_try in false false false false false :; do
67412  . ./conf$$subs.sh ||
67413    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67414
67415  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67416  if test $ac_delim_n = $ac_delim_num; then
67417    break
67418  elif $ac_last_try; then
67419    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67420  else
67421    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67422  fi
67423done
67424rm -f conf$$subs.sh
67425
67426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67427cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67428_ACEOF
67429sed -n '
67430h
67431s/^/S["/; s/!.*/"]=/
67432p
67433g
67434s/^[^!]*!//
67435:repl
67436t repl
67437s/'"$ac_delim"'$//
67438t delim
67439:nl
67440h
67441s/\(.\{148\}\)..*/\1/
67442t more1
67443s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67444p
67445n
67446b repl
67447:more1
67448s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67449p
67450g
67451s/.\{148\}//
67452t nl
67453:delim
67454h
67455s/\(.\{148\}\)..*/\1/
67456t more2
67457s/["\\]/\\&/g; s/^/"/; s/$/"/
67458p
67459b
67460:more2
67461s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67462p
67463g
67464s/.\{148\}//
67465t delim
67466' <conf$$subs.awk | sed '
67467/^[^""]/{
67468  N
67469  s/\n//
67470}
67471' >>$CONFIG_STATUS || ac_write_fail=1
67472rm -f conf$$subs.awk
67473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67474_ACAWK
67475cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67476  for (key in S) S_is_set[key] = 1
67477  FS = ""
67478
67479}
67480{
67481  line = $ 0
67482  nfields = split(line, field, "@")
67483  substed = 0
67484  len = length(field[1])
67485  for (i = 2; i < nfields; i++) {
67486    key = field[i]
67487    keylen = length(key)
67488    if (S_is_set[key]) {
67489      value = S[key]
67490      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67491      len += length(value) + length(field[++i])
67492      substed = 1
67493    } else
67494      len += 1 + keylen
67495  }
67496
67497  print line
67498}
67499
67500_ACAWK
67501_ACEOF
67502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67503if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67504  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67505else
67506  cat
67507fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67508  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67509_ACEOF
67510
67511# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67512# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67513# trailing colons and then remove the whole line if VPATH becomes empty
67514# (actually we leave an empty line to preserve line numbers).
67515if test "x$srcdir" = x.; then
67516  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67517h
67518s///
67519s/^/:/
67520s/[	 ]*$/:/
67521s/:\$(srcdir):/:/g
67522s/:\${srcdir}:/:/g
67523s/:@srcdir@:/:/g
67524s/^:*//
67525s/:*$//
67526x
67527s/\(=[	 ]*\).*/\1/
67528G
67529s/\n//
67530s/^[^=]*=[	 ]*$//
67531}'
67532fi
67533
67534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67535fi # test -n "$CONFIG_FILES"
67536
67537
67538eval set X "  :F $CONFIG_FILES      "
67539shift
67540for ac_tag
67541do
67542  case $ac_tag in
67543  :[FHLC]) ac_mode=$ac_tag; continue;;
67544  esac
67545  case $ac_mode$ac_tag in
67546  :[FHL]*:*);;
67547  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67548  :[FH]-) ac_tag=-:-;;
67549  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67550  esac
67551  ac_save_IFS=$IFS
67552  IFS=:
67553  set x $ac_tag
67554  IFS=$ac_save_IFS
67555  shift
67556  ac_file=$1
67557  shift
67558
67559  case $ac_mode in
67560  :L) ac_source=$1;;
67561  :[FH])
67562    ac_file_inputs=
67563    for ac_f
67564    do
67565      case $ac_f in
67566      -) ac_f="$ac_tmp/stdin";;
67567      *) # Look for the file first in the build tree, then in the source tree
67568	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67569	 # because $ac_f cannot contain `:'.
67570	 test -f "$ac_f" ||
67571	   case $ac_f in
67572	   [\\/$]*) false;;
67573	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67574	   esac ||
67575	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67576      esac
67577      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67578      as_fn_append ac_file_inputs " '$ac_f'"
67579    done
67580
67581    # Let's still pretend it is `configure' which instantiates (i.e., don't
67582    # use $as_me), people would be surprised to read:
67583    #    /* config.h.  Generated by config.status.  */
67584    configure_input='Generated from '`
67585	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67586	`' by configure.'
67587    if test x"$ac_file" != x-; then
67588      configure_input="$ac_file.  $configure_input"
67589      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67590$as_echo "$as_me: creating $ac_file" >&6;}
67591    fi
67592    # Neutralize special characters interpreted by sed in replacement strings.
67593    case $configure_input in #(
67594    *\&* | *\|* | *\\* )
67595       ac_sed_conf_input=`$as_echo "$configure_input" |
67596       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67597    *) ac_sed_conf_input=$configure_input;;
67598    esac
67599
67600    case $ac_tag in
67601    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67602      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67603    esac
67604    ;;
67605  esac
67606
67607  ac_dir=`$as_dirname -- "$ac_file" ||
67608$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67609	 X"$ac_file" : 'X\(//\)[^/]' \| \
67610	 X"$ac_file" : 'X\(//\)$' \| \
67611	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67612$as_echo X"$ac_file" |
67613    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67614	    s//\1/
67615	    q
67616	  }
67617	  /^X\(\/\/\)[^/].*/{
67618	    s//\1/
67619	    q
67620	  }
67621	  /^X\(\/\/\)$/{
67622	    s//\1/
67623	    q
67624	  }
67625	  /^X\(\/\).*/{
67626	    s//\1/
67627	    q
67628	  }
67629	  s/.*/./; q'`
67630  as_dir="$ac_dir"; as_fn_mkdir_p
67631  ac_builddir=.
67632
67633case "$ac_dir" in
67634.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67635*)
67636  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67637  # A ".." for each directory in $ac_dir_suffix.
67638  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67639  case $ac_top_builddir_sub in
67640  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67641  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67642  esac ;;
67643esac
67644ac_abs_top_builddir=$ac_pwd
67645ac_abs_builddir=$ac_pwd$ac_dir_suffix
67646# for backward compatibility:
67647ac_top_builddir=$ac_top_build_prefix
67648
67649case $srcdir in
67650  .)  # We are building in place.
67651    ac_srcdir=.
67652    ac_top_srcdir=$ac_top_builddir_sub
67653    ac_abs_top_srcdir=$ac_pwd ;;
67654  [\\/]* | ?:[\\/]* )  # Absolute name.
67655    ac_srcdir=$srcdir$ac_dir_suffix;
67656    ac_top_srcdir=$srcdir
67657    ac_abs_top_srcdir=$srcdir ;;
67658  *) # Relative name.
67659    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67660    ac_top_srcdir=$ac_top_build_prefix$srcdir
67661    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67662esac
67663ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67664
67665
67666  case $ac_mode in
67667  :F)
67668  #
67669  # CONFIG_FILE
67670  #
67671
67672_ACEOF
67673
67674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67675# If the template does not know about datarootdir, expand it.
67676# FIXME: This hack should be removed a few years after 2.60.
67677ac_datarootdir_hack=; ac_datarootdir_seen=
67678ac_sed_dataroot='
67679/datarootdir/ {
67680  p
67681  q
67682}
67683/@datadir@/p
67684/@docdir@/p
67685/@infodir@/p
67686/@localedir@/p
67687/@mandir@/p'
67688case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67689*datarootdir*) ac_datarootdir_seen=yes;;
67690*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67691  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67692$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67693_ACEOF
67694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67695  ac_datarootdir_hack='
67696  s&@datadir@&$datadir&g
67697  s&@docdir@&$docdir&g
67698  s&@infodir@&$infodir&g
67699  s&@localedir@&$localedir&g
67700  s&@mandir@&$mandir&g
67701  s&\\\${datarootdir}&$datarootdir&g' ;;
67702esac
67703_ACEOF
67704
67705# Neutralize VPATH when `$srcdir' = `.'.
67706# Shell code in configure.ac might set extrasub.
67707# FIXME: do we really want to maintain this feature?
67708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67709ac_sed_extra="$ac_vpsub
67710$extrasub
67711_ACEOF
67712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67713:t
67714/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67715s|@configure_input@|$ac_sed_conf_input|;t t
67716s&@top_builddir@&$ac_top_builddir_sub&;t t
67717s&@top_build_prefix@&$ac_top_build_prefix&;t t
67718s&@srcdir@&$ac_srcdir&;t t
67719s&@abs_srcdir@&$ac_abs_srcdir&;t t
67720s&@top_srcdir@&$ac_top_srcdir&;t t
67721s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67722s&@builddir@&$ac_builddir&;t t
67723s&@abs_builddir@&$ac_abs_builddir&;t t
67724s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67725$ac_datarootdir_hack
67726"
67727eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67728  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67729
67730test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67731  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67732  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67733      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67734  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67735which seems to be undefined.  Please make sure it is defined" >&5
67736$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67737which seems to be undefined.  Please make sure it is defined" >&2;}
67738
67739  rm -f "$ac_tmp/stdin"
67740  case $ac_file in
67741  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67742  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67743  esac \
67744  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67745 ;;
67746
67747
67748
67749  esac
67750
67751done # for ac_tag
67752
67753
67754as_fn_exit 0
67755_ACEOF
67756ac_clean_files=$ac_clean_files_save
67757
67758test $ac_write_fail = 0 ||
67759  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67760
67761
67762# configure is writing to config.log, and then calls config.status.
67763# config.status does its own redirection, appending to config.log.
67764# Unfortunately, on DOS this fails, as config.log is still kept open
67765# by configure, so config.status won't be able to write to it; its
67766# output is simply discarded.  So we exec the FD to /dev/null,
67767# effectively closing config.log, so it can be properly (re)opened and
67768# appended to by config.status.  When coming back to configure, we
67769# need to make the FD available again.
67770if test "$no_create" != yes; then
67771  ac_cs_success=:
67772  ac_config_status_args=
67773  test "$silent" = yes &&
67774    ac_config_status_args="$ac_config_status_args --quiet"
67775  exec 5>/dev/null
67776  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67777  exec 5>>config.log
67778  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67779  # would make configure fail if this is the last instruction.
67780  $ac_cs_success || as_fn_exit 1
67781fi
67782if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67783  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67784$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67785fi
67786
67787
67788# After AC_OUTPUT, we need to do final work
67789
67790
67791  # Try to move config.log (generated by autoconf) to the configure-support directory.
67792  if test -e ./config.log; then
67793    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67794  fi
67795
67796  # Rotate our log file (configure.log)
67797  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67798    $RM -f "$OUTPUT_ROOT/configure.log.old"
67799  fi
67800  if test -e "$OUTPUT_ROOT/configure.log"; then
67801    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67802  fi
67803
67804  # Move configure.log from current directory to the build output root
67805  if test -e ./configure.log; then
67806    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67807  fi
67808
67809  # Make the compare script executable
67810  $CHMOD +x $OUTPUT_ROOT/compare.sh
67811
67812
67813# Finally output some useful information to the user
67814
67815  # Finally output some useful information to the user
67816
67817  printf "\n"
67818  printf "====================================================\n"
67819  if test "x$no_create" != "xyes"; then
67820    if test "x$IS_RECONFIGURE" != "xyes"; then
67821      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67822    else
67823      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67824    fi
67825  else
67826    if test "x$IS_RECONFIGURE" != "xyes"; then
67827      printf "A configuration has been successfully checked but not created\n"
67828    else
67829      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67830    fi
67831  fi
67832  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67833    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67834  else
67835    printf "using default settings.\n"
67836  fi
67837
67838  printf "\n"
67839  printf "Configuration summary:\n"
67840  printf "* Debug level:    $DEBUG_LEVEL\n"
67841  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67842  printf "* JDK variant:    $JDK_VARIANT\n"
67843  printf "* JVM variants:   $JVM_VARIANTS\n"
67844  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67845  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67846
67847  printf "\n"
67848  printf "Tools summary:\n"
67849  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67850    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67851  fi
67852  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67853  if test "x$TOOLCHAIN_VERSION" != "x"; then
67854    print_version=" $TOOLCHAIN_VERSION"
67855  fi
67856  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67857  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67858  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67859
67860  printf "\n"
67861  printf "Build performance summary:\n"
67862  printf "* Cores to use:   $JOBS\n"
67863  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67864  if test "x$CCACHE_STATUS" != "x"; then
67865    printf "* ccache status:  $CCACHE_STATUS\n"
67866  fi
67867  printf "\n"
67868
67869  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67870    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67871    printf "will result in longer build times.\n"
67872    printf "\n"
67873  fi
67874
67875  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67876    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67877    printf "These are not respected, and will be ignored. It is recommended\n"
67878    printf "that you clean your environment. The following variables are set:\n"
67879    printf "$FOUND_ALT_VARIABLES\n"
67880    printf "\n"
67881  fi
67882
67883  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67884    printf "WARNING: Your build output directory is not on a local disk.\n"
67885    printf "This will severely degrade build performance!\n"
67886    printf "It is recommended that you create an output directory on a local disk,\n"
67887    printf "and run the configure script again from that directory.\n"
67888    printf "\n"
67889  fi
67890
67891  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67892    printf "WARNING: The result of this configuration has overridden an older\n"
67893    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67894    printf "proper build. Failure to do so might result in strange build problems.\n"
67895    printf "\n"
67896  fi
67897
67898  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67899    printf "WARNING: The result of this configuration was not saved.\n"
67900    printf "You should run without '--no-create | -n' to create the configuration.\n"
67901    printf "\n"
67902  fi
67903
67904
67905
67906  # Locate config.log.
67907  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67908    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67909  elif test -e "./config.log"; then
67910    CONFIG_LOG_PATH="."
67911  fi
67912
67913  if test -e "$CONFIG_LOG_PATH/config.log"; then
67914    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67915    if test $? -eq 0; then
67916      printf "The following warnings were produced. Repeated here for convenience:\n"
67917      # We must quote sed expression (using []) to stop m4 from eating the [].
67918      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67919      printf "\n"
67920    fi
67921  fi
67922
67923